@@ -15,14 +15,14 @@
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -38,6 +44,7 @@
|
||||
private final PathPoint[] bR = new PathPoint[24];
|
||||
private final int[] bS = new int[24];
|
||||
private final Path bT = new Path();
|
||||
+ private Explosion explosionSource = new Explosion(null, this, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
private final PathPoint[] bQ = new PathPoint[24];
|
||||
private final int[] bR = new int[24];
|
||||
private final Path bS = new Path();
|
||||
+ private Explosion explosionSource = new Explosion(null, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
|
||||
|
||||
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
|
||||
super(EntityTypes.ENDER_DRAGON, world);
|
||||
@@ -177,7 +184,7 @@
|
||||
@@ -175,7 +182,7 @@
|
||||
|
||||
Vec3D vec3d1 = idragoncontroller.g();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
d0 = vec3d1.x - this.locX();
|
||||
d1 = vec3d1.y - this.locY();
|
||||
d2 = vec3d1.z - this.locZ();
|
||||
@@ -315,7 +322,14 @@
|
||||
@@ -313,7 +320,14 @@
|
||||
if (this.currentEnderCrystal.dead) {
|
||||
this.currentEnderCrystal = null;
|
||||
} else if (this.ticksLived % 10 == 0 && this.getHealth() < this.getMaxHealth()) {
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,6 +404,9 @@
|
||||
@@ -388,6 +402,9 @@
|
||||
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
for (int k1 = i; k1 <= l; ++k1) {
|
||||
for (int l1 = j; l1 <= i1; ++l1) {
|
||||
@@ -400,7 +417,11 @@
|
||||
@@ -398,7 +415,11 @@
|
||||
|
||||
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
|
||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
|
||||
@@ -70,7 +70,7 @@
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
@@ -409,6 +430,51 @@
|
||||
@@ -407,6 +428,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,12 +105,12 @@
|
||||
+ Block nmsBlock = craftBlock.getNMS().getBlock();
|
||||
+ if (nmsBlock.a(explosionSource)) {
|
||||
+ TileEntity tileentity = nmsBlock.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
|
||||
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
||||
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.b).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
|
||||
+
|
||||
+ craftBlock.getNMS().a(loottableinfo_builder).forEach((itemstack) -> {
|
||||
+ Block.a(world, blockposition, itemstack);
|
||||
+ });
|
||||
+ craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.a);
|
||||
+ craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.b);
|
||||
+ }
|
||||
+ nmsBlock.wasExploded(world, blockposition, explosionSource);
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user