Fix Forge support

This commit is contained in:
Brady 2023-07-01 17:28:23 -05:00
parent 2f7dc2397e
commit 14b5a0cec3
No known key found for this signature in database
GPG Key ID: 73A788379A197567
2 changed files with 3 additions and 5 deletions

View File

@ -40,7 +40,4 @@ public abstract class MixinEntity {
@Shadow
public float rotationYaw;
@Shadow
public abstract void moveRelative(float strafe, float up, float forward, float friction);
}

View File

@ -117,7 +117,8 @@ public abstract class MixinEntityLivingBase extends MixinEntity {
private void onMoveRelative(EntityLivingBase self, float strafe, float up, float forward, float friction) {
Optional<IBaritone> baritone = this.getBaritone();
if (!baritone.isPresent()) {
this.moveRelative(strafe, up, forward, friction);
// If a shadow is used here it breaks on Forge
self.moveRelative(strafe, up, forward, friction);
return;
}
@ -127,7 +128,7 @@ public abstract class MixinEntityLivingBase extends MixinEntity {
this.rotationYaw = event.getYaw();
this.rotationPitch = event.getPitch();
this.moveRelative(strafe, up, forward, friction);
self.moveRelative(strafe, up, forward, friction);
this.rotationYaw = event.getOriginal().getYaw();
this.rotationPitch = event.getOriginal().getPitch();