mirror of https://github.com/cabaletta/baritone
Update to 1.16.4
This commit is contained in:
parent
a92675e125
commit
dcc0b82210
|
@ -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'
|
||||
|
|
|
@ -32,7 +32,7 @@ public enum BlockById implements IDatatypeFor<Block> {
|
|||
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;
|
||||
|
|
|
@ -32,7 +32,7 @@ public enum EntityClassById implements IDatatypeFor<EntityType> {
|
|||
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;
|
||||
|
|
|
@ -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<String, Block> copy = new HashMap<>(resourceCache); // read only copy is safe, wont throw concurrentmodification
|
||||
copy.put(name, block);
|
||||
resourceCache = copy;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue