Skip to content

Commit 0ecbfdc

Browse files
authored
Merge pull request #4692 from rfresh2/1.21.5
1.21.5
2 parents 3fdb743 + d59ae28 commit 0ecbfdc

39 files changed

+410
-268
lines changed

SETUP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The recommended Java versions by Minecraft version are
5656
| 1.12.2 - 1.16.5 | 8 |
5757
| 1.17.1 | 16 |
5858
| 1.18.2 - 1.20.4 | 17 |
59-
| 1.20.5 - 1.21.4 | 21 |
59+
| 1.20.5 - 1.21.5 | 21 |
6060

6161
Download java: https://adoptium.net/
6262

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ allprojects {
9292
mappings {
9393
intermediary()
9494
mojmap()
95-
parchment("1.20.6", "2024.05.01")
95+
parchment("1.21.4", "2025.03.23")
9696

9797
devFallbackNamespace "official"
9898
}

fabric/src/main/resources/fabric.mod.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"contact": {
1212
"homepage": "https://github.com/cabaletta/baritone",
1313
"sources": "https://github.com/cabaletta/baritone",
14-
"issues": "https://github.com/cabaletta/baritone/issues"
14+
"issues": "https://github.com/cabaletta/baritone/issues"
1515
},
1616

1717
"license": "LGPL-3.0",
@@ -23,10 +23,9 @@
2323
"mixins": [
2424
"mixins.baritone.json"
2525
],
26-
2726
"depends": {
2827
"fabricloader": ">=0.14.22",
29-
"minecraft": ["1.21.4"]
28+
"minecraft": ["1.21.5"]
3029
},
3130
"custom": {
3231
"modmenu": {

forge/src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ A Minecraft pathfinder bot.
3535
modId="minecraft"
3636
mandatory=true
3737
# This version range declares a minimum of the current minecraft version up to but not including the next major version
38-
versionRange="[1.21.4]"
38+
versionRange="[1.21.5]"
3939
ordering="NONE"
4040
side="BOTH"

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
org.gradle.jvmargs=-Xmx4G
22

3-
available_loaders=fabric,forge,neoforge,tweaker
3+
available_loaders=fabric,neoforge,forge,tweaker
44

5-
mod_version=1.13.0
5+
mod_version=1.14.0
66
maven_group=baritone
77
archives_base_name=baritone
88

99
java_version=21
1010

11-
minecraft_version=1.21.4
11+
minecraft_version=1.21.5
1212

13-
forge_version=54.0.5
13+
forge_version=55.0.9
1414

15-
neoforge_version=9-beta
15+
neoforge_version=63-beta
1616

17-
fabric_version=0.16.9
17+
fabric_version=0.16.10
1818

1919
nether_pathfinder_version=1.4.1
2020

neoforge/src/main/resources/META-INF/neoforge.mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ A Minecraft pathfinder bot.
3535
modId="minecraft"
3636
type="required"
3737
# This version range declares a minimum of the current minecraft version up to but not including the next major version
38-
versionRange="[1.21.4]"
38+
versionRange="[1.21.5]"
3939
ordering="NONE"
4040
side="BOTH"

scripts/proguard.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# setting names are reflected from field names, so keep field names
4343
-keepclassmembers class baritone.api.Settings {
44-
public <fields>;
44+
public <fields>;
4545
}
4646

4747
# need to keep mixin names
@@ -346,4 +346,4 @@
346346
public int length();
347347
public java.lang.String substring(int);
348348
public java.lang.String substring(int,int);
349-
}
349+
}

src/api/java/baritone/api/command/helpers/Paginator.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,16 @@
2121
import baritone.api.command.exception.CommandException;
2222
import baritone.api.command.exception.CommandInvalidTypeException;
2323
import baritone.api.utils.Helper;
24-
25-
import java.awt.*;
26-
import java.util.Arrays;
27-
import java.util.List;
28-
import java.util.function.Function;
2924
import net.minecraft.ChatFormatting;
3025
import net.minecraft.network.chat.ClickEvent;
3126
import net.minecraft.network.chat.Component;
3227
import net.minecraft.network.chat.HoverEvent;
3328
import net.minecraft.network.chat.MutableComponent;
3429

30+
import java.util.Arrays;
31+
import java.util.List;
32+
import java.util.function.Function;
33+
3534
public class Paginator<E> implements Helper {
3635

3736
public final List<E> entries;
@@ -78,12 +77,10 @@ public void display(Function<E, Component> transform, String commandPrefix) {
7877
MutableComponent prevPageComponent = Component.literal("<<");
7978
if (hasPrevPage) {
8079
prevPageComponent.setStyle(prevPageComponent.getStyle()
81-
.withClickEvent(new ClickEvent(
82-
ClickEvent.Action.RUN_COMMAND,
80+
.withClickEvent(new ClickEvent.RunCommand(
8381
String.format("%s %d", commandPrefix, page - 1)
8482
))
85-
.withHoverEvent(new HoverEvent(
86-
HoverEvent.Action.SHOW_TEXT,
83+
.withHoverEvent(new HoverEvent.ShowText(
8784
Component.literal("Click to view previous page")
8885
)));
8986
} else {
@@ -92,9 +89,8 @@ public void display(Function<E, Component> transform, String commandPrefix) {
9289
MutableComponent nextPageComponent = Component.literal(">>");
9390
if (hasNextPage) {
9491
nextPageComponent.setStyle(nextPageComponent.getStyle()
95-
.withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, String.format("%s %d", commandPrefix, page + 1)))
96-
.withHoverEvent(new HoverEvent(
97-
HoverEvent.Action.SHOW_TEXT,
92+
.withClickEvent(new ClickEvent.RunCommand(String.format("%s %d", commandPrefix, page + 1)))
93+
.withHoverEvent(new HoverEvent.ShowText(
9894
Component.literal("Click to view next page")
9995
)));
10096
} else {

src/launch/java/baritone/launch/mixins/MixinClientPlayerEntity.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import baritone.api.event.events.SprintStateEvent;
2424
import baritone.api.event.events.type.EventState;
2525
import baritone.behavior.LookBehavior;
26-
import net.minecraft.client.KeyMapping;
2726
import net.minecraft.client.player.LocalPlayer;
2827
import net.minecraft.world.entity.player.Abilities;
28+
import net.minecraft.world.entity.player.Input;
2929
import org.spongepowered.asm.mixin.Mixin;
3030
import org.spongepowered.asm.mixin.Unique;
3131
import org.spongepowered.asm.mixin.injection.At;
@@ -110,13 +110,13 @@ private boolean onMayFlyNeoforge(LocalPlayer instance) throws Throwable {
110110
method = "aiStep",
111111
at = @At(
112112
value = "INVOKE",
113-
target = "net/minecraft/client/KeyMapping.isDown()Z"
113+
target = "Lnet/minecraft/world/entity/player/Input;sprint()Z"
114114
)
115115
)
116-
private boolean isKeyDown(KeyMapping keyBinding) {
116+
private boolean redirectSprintInput(final Input instance) {
117117
IBaritone baritone = BaritoneAPI.getProvider().getBaritoneForPlayer((LocalPlayer) (Object) this);
118118
if (baritone == null) {
119-
return keyBinding.isDown();
119+
return instance.sprint();
120120
}
121121
SprintStateEvent event = new SprintStateEvent();
122122
baritone.getGameEventHandler().onPlayerSprintState(event);
@@ -127,7 +127,7 @@ private boolean isKeyDown(KeyMapping keyBinding) {
127127
// hitting control shouldn't make all bots sprint
128128
return false;
129129
}
130-
return keyBinding.isDown();
130+
return instance.sprint();
131131
}
132132

133133
@Inject(
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* This file is part of Baritone.
3+
*
4+
* Baritone is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Lesser General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* Baritone is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public License
15+
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
16+
*/
17+
18+
package baritone.launch.mixins;
19+
20+
import baritone.utils.accessor.IRenderPipelines;
21+
import com.mojang.blaze3d.pipeline.RenderPipeline;
22+
import net.minecraft.client.renderer.RenderPipelines;
23+
import org.spongepowered.asm.mixin.Final;
24+
import org.spongepowered.asm.mixin.Mixin;
25+
import org.spongepowered.asm.mixin.Shadow;
26+
27+
@Mixin(RenderPipelines.class)
28+
public class MixinRenderPipelines implements IRenderPipelines {
29+
@Final @Shadow
30+
private static RenderPipeline.Snippet LINES_SNIPPET;
31+
32+
public RenderPipeline.Snippet getLinesSnippet() {
33+
return LINES_SNIPPET;
34+
}
35+
}

0 commit comments

Comments
 (0)