Fixed flowing water propagation

master
Wynd 2025-04-06 12:07:38 +03:00
parent 7ca1d5adad
commit b3f268efe2
4 changed files with 28 additions and 3 deletions

View File

@ -0,0 +1,15 @@
package xyz.pixelatedw.finalbeta.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import net.minecraft.tile.FlowingFluidTile;
@Mixin(FlowingFluidTile.class)
public class FlowingFluidTileMixin {
@ModifyArg(method = "onScheduledTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/level/Level;getTileMeta(III)I"), index = 1)
private int updateFlowingWater(int y) {
return y - 1;
}
}

View File

@ -18,7 +18,16 @@ import xyz.pixelatedw.finalbeta.ModConfig;
public class SnowballMixin { public class SnowballMixin {
// Note, this is actually the "fireball" used by Ghasts. I guess they didn't have the fire charges done yet // Note, this is actually the "fireball" used by Ghasts. I guess they didn't have the fire charges done yet
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/Entity;I)Z", shift = At.Shift.BEFORE), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true) @Inject(
method = "tick",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/Entity;I)Z",
shift = At.Shift.BEFORE
),
locals = LocalCapture.CAPTURE_FAILHARD,
cancellable = true
)
private void newDamageRouter(CallbackInfo ci, Vec3d _v1, Vec3d _v2, HitResult result) { private void newDamageRouter(CallbackInfo ci, Vec3d _v1, Vec3d _v2, HitResult result) {
Snowball fireball = ((Snowball)(Object)this); Snowball fireball = ((Snowball)(Object)this);
if (ModConfig.ENABLE_GHASTS_INSTA_DEATH.get() && result != null && !fireball.level.isClient) { if (ModConfig.ENABLE_GHASTS_INSTA_DEATH.get() && result != null && !fireball.level.isClient) {

View File

@ -49,7 +49,8 @@
"ItemTypeAccessor", "ItemTypeAccessor",
"PressurePlateTileMixin", "PressurePlateTileMixin",
"LeavesTileMixin", "LeavesTileMixin",
"StillFluidTileMixin" "StillFluidTileMixin",
"FlowingFluidTileMixin"
], ],
"injectors": { "injectors": {
"defaultRequire": -1 "defaultRequire": -1