Skip to content

Commit

Permalink
latest forge works yay
Browse files Browse the repository at this point in the history
  • Loading branch information
leijurv committed Feb 5, 2019
1 parent c7ad235 commit 7dd881a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 76 deletions.
4 changes: 3 additions & 1 deletion SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

Not always completely up to date with latest features.

The forge release (currently `baritone-forge-1.1.0.jar`) can simply be added as a Forge mod. However, it is not fully compatible with the latest version of Forge. `freeLook` was broken in Forge 14.23.4.2744. You should use Forge 14.23.4.2743 or **older** with Baritone. Newer versions of Forge "work", sort of, but Baritone's movement becomes unreliable and `freeLook` must be off.
The forge release (currently `baritone-forge-1.1.3.jar`) can simply be added as a Forge mod.

Previously (Baritone v1.1.2 and below), it was not fully compatible with the latest version of Forge. `freeLook` was broken in Forge 14.23.4.2744. Forge 14.23.4.2743 or **older** worked with Baritone v1.1.2 and lower. Newer versions of Forge "worked", sort of, but Baritone's movement became unreliable and `freeLook` must be off.

## Build it yourself
- Clone or download Baritone
Expand Down
74 changes: 0 additions & 74 deletions src/launch/java/baritone/launch/mixins/MixinEntity.java

This file was deleted.

21 changes: 21 additions & 0 deletions src/launch/java/baritone/launch/mixins/MixinEntityLivingBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,25 @@ private float overrideYaw(EntityLivingBase self) {
}
return self.rotationYaw;
}

@Redirect(
method = "travel",
at = @At(
value = "INVOKE",
target = "net/minecraft/entity/EntityLivingBase.moveRelative(FFFF)V"
)
)
private void travel(EntityLivingBase self, float strafe, float up, float forward, float friction) {
// noinspection ConstantConditions
if (!EntityPlayerSP.class.isInstance(this)) {
moveRelative(strafe, up, forward, friction);
return;
}
RotationMoveEvent motionUpdateRotationEvent = new RotationMoveEvent(RotationMoveEvent.Type.MOTION_UPDATE, this.rotationYaw);
BaritoneAPI.getProvider().getBaritoneForPlayer((EntityPlayerSP) (Object) this).getGameEventHandler().onPlayerRotationMove(motionUpdateRotationEvent);
float originalYaw = this.rotationYaw;
this.rotationYaw = motionUpdateRotationEvent.getYaw();
this.moveRelative(strafe, up, forward, friction);
this.rotationYaw = originalYaw;
}
}
1 change: 0 additions & 1 deletion src/launch/resources/mixins.baritone.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"MixinChunkProviderServer",
"MixinChunkRenderContainer",
"MixinChunkRenderWorker",
"MixinEntity",
"MixinEntityLivingBase",
"MixinEntityPlayerSP",
"MixinEntityRenderer",
Expand Down

0 comments on commit 7dd881a

Please sign in to comment.