Fix SprintStateEvent

This commit is contained in:
Brady
2019-01-19 12:12:26 -06:00
parent aa2e680568
commit f5446cc415
2 changed files with 3 additions and 11 deletions

View File

@@ -98,9 +98,8 @@ public class MixinEntityPlayerSP {
)
)
private boolean isKeyDown(KeyBinding keyBinding) {
EntityPlayerSP self = (EntityPlayerSP) (Object) this;
SprintStateEvent event = new SprintStateEvent(self);
BaritoneAPI.getProvider().getBaritoneForPlayer(self).getGameEventHandler().onPlayerSprintState(event);
SprintStateEvent event = new SprintStateEvent();
BaritoneAPI.getProvider().getBaritoneForPlayer((EntityPlayerSP) (Object) this).getGameEventHandler().onPlayerSprintState(event);
return event.getState() == null ? keyBinding.isKeyDown() : event.getState();
}
}