Skip to content

Commit a174170

Browse files
committed
Fixes
1 parent 126f19b commit a174170

4 files changed

Lines changed: 15 additions & 36 deletions

File tree

build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ dependencies {
6262
// Xaero's Mods
6363
modCompileOnly "maven.modrinth:xaeros-world-map:${project.xwm_fabric_version}" // Xaero's World Map
6464
modCompileOnly "maven.modrinth:xaeros-minimap:${project.xmm_fabric_version}" // Xaero's Minimap
65-
66-
// Litematica
67-
modImplementation "curse.maven:litematica-${project.litematica_projectid}:${project.litematica_fileid}"
68-
modImplementation "curse.maven:litematica-${project.malilib_projectid}:${project.malilib_fileid}"
69-
65+
7066
// Chest Tracker
7167
modImplementation("red.jackf:whereisit:${project.where_is_it_version}")
7268
modImplementation("maven.modrinth:chest-tracker:${project.chest_tracker}")

src/main/java/nekiplay/meteorplus/mixin/meteorclient/modules/FreecamMixin.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ private void Work(Cancellable event) {
153153
if (state.isAir()) return;
154154
isBlinkMoving = true;
155155
GoalBlock goal = new GoalBlock(tryGetValidPos(clicked));
156-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(null);
157-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(goal);
156+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("stop");
157+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goto " + goal.x + " " + goal.y + " " + goal.z);
158158

159159
event.cancel();
160160
}
@@ -174,8 +174,8 @@ private void Work(Cancellable event) {
174174

175175

176176
GoalBlock goal = new GoalBlock(tryGetValidPos(clicked));
177-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(null);
178-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(goal);
177+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("stop");
178+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goto " + goal.x + " " + goal.y + " " + goal.z);
179179

180180
event.cancel();
181181
}

src/main/java/nekiplay/meteorplus/mixin/xaero/worldmap/GuiMapMixin.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ public void onAction(Screen screen) {
9999
@Override
100100
public void onAction(Screen screen) {
101101
GoalBlock goal = new GoalBlock(new BlockPos(rightClickX, rightClickY, rightClickZ).up());
102-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(goal);
102+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goal " + goal.x + " " + goal.y + " " + goal.z);
103103
}
104104
},
105105
new RightClickOption(I18n.translate("gui.world_map.baritone_path_here"), options.size(), guiMap) {
106106
@Override
107107
public void onAction(Screen screen) {
108108
GoalBlock goal = new GoalBlock(new BlockPos(rightClickX, rightClickY, rightClickZ).up());
109-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(goal);
109+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goto " + goal.x + " " + goal.y + " " + goal.z);
110110
}
111111
}
112112
));
@@ -117,13 +117,8 @@ public void onAction(Screen screen) {
117117
@Override
118118
public void onAction(Screen screen) {
119119
GoalBlock goal = new GoalBlock(new BlockPos(rightClickX, rightClickY, rightClickZ).up());
120-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(goal);
121-
for (IBaritone baritone : BaritoneAPI.getProvider().getAllBaritones()) {
122-
if (!baritone.getCommandManager().getRegistry().stream().filter((a) -> a.getNames().get(0).equalsIgnoreCase("elytra")).findAny().isEmpty()) {
123-
baritone.getCommandManager().execute("elytra");
124-
break;
125-
}
126-
}
120+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goal " + goal.x + " " + goal.y + " " + goal.z);
121+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("elytra");
127122
}
128123
}
129124
));
@@ -138,13 +133,8 @@ public void onAction(Screen screen) {
138133
@Override
139134
public void onAction(Screen screen) {
140135
GoalBlock goal = new GoalBlock(new BlockPos(rightClickX, rightClickY, rightClickZ).up());
141-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(goal);
142-
for (IBaritone baritone : BaritoneAPI.getProvider().getAllBaritones()) {
143-
if (!baritone.getCommandManager().getRegistry().stream().filter((a) -> a.getNames().get(0).equalsIgnoreCase("elytra")).findAny().isEmpty()) {
144-
baritone.getCommandManager().execute("elytra");
145-
break;
146-
}
147-
}
136+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goal " + goal.x + " " + goal.y + " " + goal.z);
137+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("elytra");
148138
}
149139
}
150140
));

src/main/java/nekiplay/meteorplus/mixin/xaero/worldmap/WaypointRendererMixin.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void onAction(Screen screen) {
5555
rightClickOptions.add((new RightClickOption("gui.world_map.baritone_goal_here", rightClickOptions.size(), target) {
5656
public void onAction(Screen screen) {
5757
GoalBlock goal = new GoalBlock(new BlockPos(element.getX(), element.getY(), element.getZ()));
58-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(goal);
58+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goal " + goal.x + " " + goal.y + " " + goal.z);
5959
}
6060

6161
public boolean isActive() {
@@ -66,7 +66,7 @@ public boolean isActive() {
6666
rightClickOptions.add((new RightClickOption("gui.world_map.baritone_path_here", rightClickOptions.size(), target) {
6767
public void onAction(Screen screen) {
6868
GoalBlock goal = new GoalBlock(new BlockPos(element.getX(), element.getY(), element.getZ()));
69-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoalAndPath(goal);
69+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goto " + goal.x + " " + goal.y + " " + goal.z);
7070
}
7171

7272
public boolean isActive() {
@@ -78,15 +78,8 @@ public boolean isActive() {
7878
rightClickOptions.add((new RightClickOption("gui.world_map.baritone_elytra_here", rightClickOptions.size(), target) {
7979
public void onAction(Screen screen) {
8080
GoalBlock goal = new GoalBlock(new BlockPos(element.getX(), element.getY(), element.getZ()));
81-
if (goal.getGoalPos().getY() > 0 && goal.getGoalPos().getY() < 128) {
82-
BaritoneAPI.getProvider().getPrimaryBaritone().getCustomGoalProcess().setGoal(goal);
83-
for (IBaritone baritone : BaritoneAPI.getProvider().getAllBaritones()) {
84-
if (!baritone.getCommandManager().getRegistry().stream().filter((a) -> a.getNames().get(0).equalsIgnoreCase("elytra")).findAny().isEmpty()) {
85-
baritone.getCommandManager().execute("elytra");
86-
break;
87-
}
88-
}
89-
}
81+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("goal " + goal.x + " " + goal.y + " " + goal.z);
82+
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute("elytra");
9083
}
9184

9285
public boolean isActive() {

0 commit comments

Comments
 (0)