@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
+++ b/net/minecraft/world/entity/item/EntityTNTPrimed.java
|
||||
@@ -17,6 +17,12 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
@@ -24,6 +24,12 @@
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.portal.DimensionTransition;
|
||||
|
||||
+// CraftBukkit start;
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
@@ -13,16 +13,16 @@
|
||||
public class EntityTNTPrimed extends Entity implements TraceableEntity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_FUSE_ID = DataWatcher.defineId(EntityTNTPrimed.class, DataWatcherRegistry.INT);
|
||||
@@ -26,6 +32,8 @@
|
||||
public static final String TAG_FUSE = "fuse";
|
||||
@@ -45,6 +51,8 @@
|
||||
@Nullable
|
||||
public EntityLiving owner;
|
||||
private boolean usedPortal;
|
||||
+ public float yield = 4; // CraftBukkit - add field
|
||||
+ public boolean isIncendiary = false; // CraftBukkit - add field
|
||||
|
||||
public EntityTNTPrimed(EntityTypes<? extends EntityTNTPrimed> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
@@ -79,10 +87,13 @@
|
||||
@@ -99,10 +107,13 @@
|
||||
|
||||
this.setFuse(i);
|
||||
if (i <= 0) {
|
||||
@@ -37,7 +37,7 @@
|
||||
} else {
|
||||
this.updateInWaterStateAndDoFluidPushing();
|
||||
if (this.level().isClientSide) {
|
||||
@@ -93,9 +104,14 @@
|
||||
@@ -113,9 +124,14 @@
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -46,9 +46,9 @@
|
||||
+ // float f = 4.0F;
|
||||
+ ExplosionPrimeEvent event = CraftEventFactory.callExplosionPrimeEvent((org.bukkit.entity.Explosive)this.getBukkitEntity());
|
||||
|
||||
- this.level().explode(this, this.getX(), this.getY(0.0625D), this.getZ(), 4.0F, World.a.TNT);
|
||||
- this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? EntityTNTPrimed.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), 4.0F, false, World.a.TNT);
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.level().explode(this, this.getX(), this.getY(0.0625D), this.getZ(), event.getRadius(), event.getFire(), World.a.TNT);
|
||||
+ this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? EntityTNTPrimed.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), event.getRadius(), event.getFire(), World.a.TNT);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user