diff --git a/paper-server/nms-patches/EntityTNTPrimed.patch b/paper-server/nms-patches/EntityTNTPrimed.patch index 47d45cff27..349d19cf2d 100644 --- a/paper-server/nms-patches/EntityTNTPrimed.patch +++ b/paper-server/nms-patches/EntityTNTPrimed.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/EntityTNTPrimed.java +++ b/net/minecraft/server/EntityTNTPrimed.java -@@ -1,6 +1,7 @@ +@@ -1,13 +1,16 @@ package net.minecraft.server; import javax.annotation.Nullable; @@ -8,9 +8,10 @@ public class EntityTNTPrimed extends Entity { -@@ -8,6 +9,8 @@ + private static final DataWatcherObject FUSE_TICKS = DataWatcher.a(EntityTNTPrimed.class, DataWatcherRegistry.b); @Nullable - private EntityLiving source; +- private EntityLiving source; ++ public EntityLiving source; // PAIL private -> public private int fuseTicks; + public float yield = 4; // CraftBukkit - add field + public boolean isIncendiary = false; // CraftBukkit - add field diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java index 4ef91a37d7..e01f44563e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java @@ -5,6 +5,7 @@ import net.minecraft.server.EntityTNTPrimed; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.TNTPrimed; public class CraftTNTPrimed extends CraftEntity implements TNTPrimed { @@ -64,4 +65,13 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed { return (source != null) ? source.getBukkitEntity() : null; } + + @Override + public void setSource(Entity source) { + if (source instanceof LivingEntity) { + getHandle().source = ((CraftLivingEntity) source).getHandle(); + } else { + getHandle().source = null; + } + } }