comment to explain weird thing
This commit is contained in:
parent
a6dc156a79
commit
82417f4f85
@ -40,6 +40,8 @@ public class MixinEntityLivingBase {
|
|||||||
)
|
)
|
||||||
private void preJump(CallbackInfo ci) {
|
private void preJump(CallbackInfo ci) {
|
||||||
EntityLivingBase _this = (EntityLivingBase) (Object) this;
|
EntityLivingBase _this = (EntityLivingBase) (Object) this;
|
||||||
|
// This uses Class.isInstance instead of instanceof since proguard optimizes out the instanceof (since MixinEntityLivingBase could never be instanceof EntityLivingBase in normal java)
|
||||||
|
// but proguard isn't smart enough to optimize out this Class.isInstance =)
|
||||||
if (EntityPlayerSP.class.isInstance(_this))
|
if (EntityPlayerSP.class.isInstance(_this))
|
||||||
Baritone.INSTANCE.getGameEventHandler().onPlayerRotationMove(new RotationMoveEvent((EntityPlayerSP) _this, EventState.PRE, RotationMoveEvent.Type.JUMP));
|
Baritone.INSTANCE.getGameEventHandler().onPlayerRotationMove(new RotationMoveEvent((EntityPlayerSP) _this, EventState.PRE, RotationMoveEvent.Type.JUMP));
|
||||||
}
|
}
|
||||||
@ -50,6 +52,7 @@ public class MixinEntityLivingBase {
|
|||||||
)
|
)
|
||||||
private void postJump(CallbackInfo ci) {
|
private void postJump(CallbackInfo ci) {
|
||||||
EntityLivingBase _this = (EntityLivingBase) (Object) this;
|
EntityLivingBase _this = (EntityLivingBase) (Object) this;
|
||||||
|
// See above
|
||||||
if (EntityPlayerSP.class.isInstance(_this))
|
if (EntityPlayerSP.class.isInstance(_this))
|
||||||
Baritone.INSTANCE.getGameEventHandler().onPlayerRotationMove(new RotationMoveEvent((EntityPlayerSP) _this, EventState.POST, RotationMoveEvent.Type.JUMP));
|
Baritone.INSTANCE.getGameEventHandler().onPlayerRotationMove(new RotationMoveEvent((EntityPlayerSP) _this, EventState.POST, RotationMoveEvent.Type.JUMP));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user