diff --git a/build.gradle b/build.gradle index 2b9074e69..250465eda 100755 --- a/build.gradle +++ b/build.gradle @@ -88,7 +88,7 @@ task sourceJar(type: Jar, dependsOn: classes) { } minecraft { - mappings channel: 'snapshot', version: '20200813-1.16.1' + mappings channel: 'snapshot', version: '20201028-1.16.3' if (getProject().hasProperty("baritone.forge_build")) { reobfMappings 'searge' @@ -151,7 +151,7 @@ repositories { } dependencies { - minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.2' + minecraft 'com.github.ImpactDevelopment:Vanilla:1.16.4' runtime launchCompile('net.minecraft:launchwrapper:1.12') { exclude module: 'lwjgl' diff --git a/src/api/java/baritone/api/command/datatypes/BlockById.java b/src/api/java/baritone/api/command/datatypes/BlockById.java index 0c8270193..6293f825c 100644 --- a/src/api/java/baritone/api/command/datatypes/BlockById.java +++ b/src/api/java/baritone/api/command/datatypes/BlockById.java @@ -32,7 +32,7 @@ public enum BlockById implements IDatatypeFor { public Block get(IDatatypeContext ctx) throws CommandException { ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString()); Block block; - if ((block = Registry.BLOCK.func_241873_b(id).orElse(null)) == null) { + if ((block = Registry.BLOCK.getOptional(id).orElse(null)) == null) { throw new IllegalArgumentException("no block found by that id"); } return block; diff --git a/src/api/java/baritone/api/command/datatypes/EntityClassById.java b/src/api/java/baritone/api/command/datatypes/EntityClassById.java index 71870ef2e..c6f264c2b 100644 --- a/src/api/java/baritone/api/command/datatypes/EntityClassById.java +++ b/src/api/java/baritone/api/command/datatypes/EntityClassById.java @@ -32,7 +32,7 @@ public enum EntityClassById implements IDatatypeFor { public EntityType get(IDatatypeContext ctx) throws CommandException { ResourceLocation id = new ResourceLocation(ctx.getConsumer().getString()); EntityType entity; - if ((entity = Registry.ENTITY_TYPE.func_241873_b(id).orElse(null)) == null) { + if ((entity = Registry.ENTITY_TYPE.getOptional(id).orElse(null)) == null) { throw new IllegalArgumentException("no entity found by that id"); } return entity; diff --git a/src/api/java/baritone/api/utils/BlockUtils.java b/src/api/java/baritone/api/utils/BlockUtils.java index 3ee95f6af..35f626bd6 100644 --- a/src/api/java/baritone/api/utils/BlockUtils.java +++ b/src/api/java/baritone/api/utils/BlockUtils.java @@ -57,7 +57,7 @@ public class BlockUtils { if (resourceCache.containsKey(name)) { return null; // cached as null } - block = Registry.BLOCK.func_241873_b(ResourceLocation.tryCreate(name.contains(":") ? name : "minecraft:" + name)).orElse(null); + block = Registry.BLOCK.getOptional(ResourceLocation.tryCreate(name.contains(":") ? name : "minecraft:" + name)).orElse(null); Map copy = new HashMap<>(resourceCache); // read only copy is safe, wont throw concurrentmodification copy.put(name, block); resourceCache = copy; diff --git a/src/main/java/baritone/cache/WorldProvider.java b/src/main/java/baritone/cache/WorldProvider.java index ac0ba2070..b4e43964d 100644 --- a/src/main/java/baritone/cache/WorldProvider.java +++ b/src/main/java/baritone/cache/WorldProvider.java @@ -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" - Path dir = DimensionType.func_236031_a_(world, directory).toPath(); + Path dir = DimensionType.getDimensionFolder(world, directory).toPath(); if (!Files.exists(dir)) { try { Files.createDirectories(dir); diff --git a/src/main/java/baritone/utils/BaritoneAutoTest.java b/src/main/java/baritone/utils/BaritoneAutoTest.java index bc72a3627..4037a6fff 100644 --- a/src/main/java/baritone/utils/BaritoneAutoTest.java +++ b/src/main/java/baritone/utils/BaritoneAutoTest.java @@ -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); } } diff --git a/src/main/java/baritone/utils/PathRenderer.java b/src/main/java/baritone/utils/PathRenderer.java index 405199612..dc4b7a368 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -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