From 45f69a0f335b9a1c17363376bdb2f024cfaefd42 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Wed, 22 Aug 2018 12:28:35 -0700 Subject: [PATCH] fix illegalaccessexception in mc player reference --- src/main/java/baritone/launch/mixins/MixinEntity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/baritone/launch/mixins/MixinEntity.java b/src/main/java/baritone/launch/mixins/MixinEntity.java index 0901f295..3f98c70b 100644 --- a/src/main/java/baritone/launch/mixins/MixinEntity.java +++ b/src/main/java/baritone/launch/mixins/MixinEntity.java @@ -20,7 +20,7 @@ package baritone.launch.mixins; import baritone.bot.Baritone; import baritone.bot.event.events.RelativeMoveEvent; import baritone.bot.event.events.type.EventState; -import baritone.bot.utils.Helper; +import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -40,7 +40,7 @@ public class MixinEntity { ) private void preMoveRelative(float strafe, float up, float forward, float friction, CallbackInfo ci) { Entity _this = (Entity) (Object) this; - if (_this == Helper.mc.player) + if (_this == Minecraft.getMinecraft().player) Baritone.INSTANCE.getGameEventHandler().onPlayerRelativeMove(new RelativeMoveEvent(EventState.PRE)); } @@ -50,7 +50,7 @@ public class MixinEntity { ) private void postMoveRelative(float strafe, float up, float forward, float friction, CallbackInfo ci) { Entity _this = (Entity) (Object) this; - if (_this == Helper.mc.player) + if (_this == Minecraft.getMinecraft().player) Baritone.INSTANCE.getGameEventHandler().onPlayerRelativeMove(new RelativeMoveEvent(EventState.POST)); } }