Skip to content

Commit

Permalink
Update BoatEntityMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
2No2Name committed Jul 14, 2023
1 parent 38244ef commit 903ebf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/mendedminecarts/mixin/boat/BoatEntityMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public BoatEntityMixin(EntityType<?> type, World world) {
cancellable = true
)
private void setCartPosLikeOtherEntities(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate, CallbackInfo ci) {
if (this.world.isClient && (MendedMinecartsMod.ACCURATE_CLIENT_BOATS.isEnabled())) {
if (this.getWorld().isClient && (MendedMinecartsMod.ACCURATE_CLIENT_BOATS.isEnabled())) {
ci.cancel();
super.updateTrackedPositionAndAngles(x, y, z, yaw, pitch, interpolationSteps, interpolate);
}
Expand All @@ -36,7 +36,7 @@ private void setCartPosLikeOtherEntities(double x, double y, double z, float yaw
method = "tick",
at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/vehicle/BoatEntity;isLogicalSideForUpdatingMovement()Z"))
private boolean simulateCartsOnClientLikeOnServer(BoatEntity instance) {
if (this.world.isClient && (MendedMinecartsMod.ACCURATE_CLIENT_BOATS.isEnabled())) {
if (this.getWorld().isClient && (MendedMinecartsMod.ACCURATE_CLIENT_BOATS.isEnabled())) {
return true;
} else {
return instance.isLogicalSideForUpdatingMovement();
Expand Down

0 comments on commit 903ebf7

Please sign in to comment.