Skip to content

Commit

Permalink
another fluid mod Conflict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
baguchi committed Nov 18, 2023
1 parent c7eed8c commit 42dd449
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public EntityItemMixin(World world) {

@Inject(method = "checkAndHandleWater", at = @At("HEAD"), cancellable = true)
public void checkAndHandleWater(CallbackInfoReturnable<Boolean> cir) {
cir.setReturnValue(this.world.isMaterialInBB(this.bb, Material.water));
if (this.world.isMaterialInBB(this.bb, Material.water)) {
cir.setReturnValue(true);
}
}

@Inject(method = "tick", at = @At("TAIL"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public class EntityMixin {

@Inject(method = "checkAndHandleWater", at = @At("HEAD"), cancellable = true)
public void checkAndHandleWater(CallbackInfoReturnable<Boolean> cir) {
cir.setReturnValue(this.world.isMaterialInBB(this.bb, Material.water));
if (this.world.isMaterialInBB(this.bb, Material.water)) {
cir.setReturnValue(true);
}
}

@Inject(method = "baseTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/entity/Entity;checkAndHandleWater()Z", shift = At.Shift.AFTER))
Expand Down

0 comments on commit 42dd449

Please sign in to comment.