From 8e550effe8bd78672daa9dd86b26e5cf2a67bc98 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Tue, 22 Oct 2024 20:09:28 +0200 Subject: [PATCH] oops --- .../Optional-TNT-doesn-t-move-in-water.patch | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/patches/server/Optional-TNT-doesn-t-move-in-water.patch b/patches/server/Optional-TNT-doesn-t-move-in-water.patch index 5d24d07f6f..0fddf14fe6 100644 --- a/patches/server/Optional-TNT-doesn-t-move-in-water.patch +++ b/patches/server/Optional-TNT-doesn-t-move-in-water.patch @@ -8,17 +8,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -@@ -0,0 +0,0 @@ public class PrimedTnt extends Entity implements TraceableEntity { - - @Override - public void tick() { -- if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { return; } // Spigot -+ if (this.level().spigotConfig.maxTntTicksPerTick > 0 && ++this.level().spigotConfig.currentPrimedTnt > this.level().spigotConfig.maxTntTicksPerTick) { -+ return; -+ } // Spigot - this.handlePortal(); - this.applyGravity(); - this.move(MoverType.SELF, this.getDeltaMovement()); @@ -0,0 +0,0 @@ public class PrimedTnt extends Entity implements TraceableEntity { } } @@ -48,15 +37,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private void explode() { @@ -0,0 +0,0 @@ public class PrimedTnt extends Entity implements TraceableEntity { - return entity; + public final boolean hurtServer(ServerLevel world, DamageSource source, float amount) { + return false; } - ++ + // Paper start - Option to prevent TNT from moving in water - @Override -- public final boolean hurtServer(ServerLevel world, DamageSource source, float amount) { -- return false; ++ @Override + public boolean isPushedByFluid() { + return !level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid(); - } ++ } + // Paper end - Option to prevent TNT from moving in water }