diff --git a/changelog.md b/changelog.md index 6521a89d..8c765008 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +------------------------------------------------------ +Version 0.8.2 +------------------------------------------------------ +**Fixes** +- Fixed a random crash caused by fake players existing or something + ------------------------------------------------------ Version 0.8.1 ------------------------------------------------------ diff --git a/gradle.properties b/gradle.properties index b98343c0..899c237f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,7 +20,7 @@ org.gradle.jvmargs = -Xmx5G mod_name = Automatone -mod_version = 0.8.1 +mod_version = 0.8.2 maven_group = io.github.ladysnake minecraft_version=1.19 diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index c90dae14..e687acc0 100644 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -82,7 +82,6 @@ public class Baritone implements IBaritone { private final BaritoneCommandManager commandManager; private final IEntityContext playerContext; - private final WorldProvider worldProvider; private final @Nullable ClientPathingBehaviour clientPathingBehaviour; @@ -116,7 +115,6 @@ public Baritone(LivingEntity player) { this.pathingControlManager.registerProcess(farmProcess = new FarmProcess(this)); } - this.worldProvider = (WorldProvider) IWorldProvider.KEY.get(player.world); this.commandManager = new BaritoneCommandManager(this); this.execControlProcess = DefaultCommands.controlCommands.registerProcess(this); this.clientPathingBehaviour = player.world.isClient ? new ClientPathingBehaviour(player) : null; @@ -194,7 +192,7 @@ public PathingBehavior getPathingBehavior() { @Override public WorldProvider getWorldProvider() { - return this.worldProvider; + return (WorldProvider) IWorldProvider.KEY.get(this.getPlayerContext().world()); } @Override