This commit is contained in:
Noah van der Aa 2024-10-22 20:09:28 +02:00
parent 9ece54ccdd
commit 8e550effe8

View file

@ -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
}