Update to 1.16.4
This commit is contained in:
@@ -64,7 +64,7 @@ public class WorldProvider implements IWorldProvider, Helper {
|
||||
|
||||
// If there is an integrated server running (Aka Singleplayer) then do magic to find the world save file
|
||||
if (mc.isSingleplayer()) {
|
||||
directory = DimensionType.func_236031_a_(world, integratedServer.func_240776_a_(FolderName.DOT).toFile());
|
||||
directory = DimensionType.getDimensionFolder(world, integratedServer.func_240776_a_(FolderName.DOT).toFile());
|
||||
|
||||
// Gets the "depth" of this directory relative the the game's run directory, 2 is the location of the world
|
||||
if (directory.toPath().relativize(mc.gameDir.toPath()).getNameCount() != 2) {
|
||||
@@ -90,7 +90,7 @@ public class WorldProvider implements IWorldProvider, Helper {
|
||||
} catch (IOException ignored) {}
|
||||
|
||||
// We will actually store the world data in a subfolder: "DIM<id>"
|
||||
Path dir = DimensionType.func_236031_a_(world, directory).toPath();
|
||||
Path dir = DimensionType.getDimensionFolder(world, directory).toPath();
|
||||
if (!Files.exists(dir)) {
|
||||
try {
|
||||
Files.createDirectories(dir);
|
||||
|
||||
@@ -98,9 +98,9 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper {
|
||||
if (mc.currentScreen instanceof MainMenuScreen) {
|
||||
System.out.println("Beginning Baritone automatic test routine");
|
||||
mc.displayGuiScreen(null);
|
||||
WorldSettings worldsettings = new WorldSettings("BaritoneAutoTest", GameType.SURVIVAL, false, Difficulty.NORMAL, true, new GameRules(), DatapackCodec.field_234880_a_);
|
||||
WorldSettings worldsettings = new WorldSettings("BaritoneAutoTest", GameType.SURVIVAL, false, Difficulty.NORMAL, true, new GameRules(), DatapackCodec.VANILLA_CODEC);
|
||||
final DynamicRegistries.Impl impl = DynamicRegistries.func_239770_b_();
|
||||
mc.func_238192_a_("BaritoneAutoTest", worldsettings, impl, DimensionGeneratorSettings.func_242752_a(impl).create(false, OptionalLong.of(TEST_SEED)));
|
||||
mc.createWorld("BaritoneAutoTest", worldsettings, impl, DimensionGeneratorSettings.func_242752_a(impl).create(false, OptionalLong.of(TEST_SEED)));
|
||||
}
|
||||
|
||||
IntegratedServer server = mc.getIntegratedServer();
|
||||
@@ -121,7 +121,7 @@ public class BaritoneAutoTest implements AbstractGameEventListener, Helper {
|
||||
for (final ServerWorld world : mc.getIntegratedServer().getWorlds()) {
|
||||
// If the world has initialized, set the spawn point to our defined starting position
|
||||
if (world != null) {
|
||||
world.getGameRules().get(GameRules.SPAWN_RADIUS).func_234909_b_("0");
|
||||
world.getGameRules().get(GameRules.SPAWN_RADIUS).parseIntValue("0");
|
||||
world.func_241124_a__(STARTING_POSITION, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@ public final class PathRenderer implements IRenderer, Helper {
|
||||
((GuiClick) Helper.mc.currentScreen).onRender(event.getModelViewStack(), event.getProjectionMatrix());
|
||||
}
|
||||
|
||||
DimensionType thisPlayerDimension = behavior.baritone.getPlayerContext().world().func_230315_m_();
|
||||
DimensionType currentRenderViewDimension = BaritoneAPI.getProvider().getPrimaryBaritone().getPlayerContext().world().func_230315_m_();
|
||||
DimensionType thisPlayerDimension = behavior.baritone.getPlayerContext().world().getDimensionType();
|
||||
DimensionType currentRenderViewDimension = BaritoneAPI.getProvider().getPrimaryBaritone().getPlayerContext().world().getDimensionType();
|
||||
|
||||
if (thisPlayerDimension != currentRenderViewDimension) {
|
||||
// this is a path for a bot in a different dimension, don't render it
|
||||
|
||||
Reference in New Issue
Block a user