@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java
|
||||
@@ -21,6 +21,11 @@
|
||||
@@ -19,6 +19,11 @@
|
||||
import net.minecraft.world.level.block.BlockFireAbstract;
|
||||
import net.minecraft.world.level.dimension.end.EnderDragonBattle;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class EntityEnderCrystal extends Entity {
|
||||
|
||||
private static final DataWatcherObject<Optional<BlockPosition>> DATA_BEAM_TARGET = DataWatcher.defineId(EntityEnderCrystal.class, DataWatcherRegistry.OPTIONAL_BLOCK_POS);
|
||||
@@ -56,7 +61,11 @@
|
||||
@@ -54,7 +59,11 @@
|
||||
BlockPosition blockposition = this.blockPosition();
|
||||
|
||||
if (((WorldServer) this.level).dragonFight() != null && this.level.getBlockState(blockposition).isAir()) {
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,9 +105,22 @@
|
||||
@@ -94,11 +103,24 @@
|
||||
return false;
|
||||
} else {
|
||||
if (!this.isRemoved() && !this.level.isClientSide) {
|
||||
@@ -36,7 +36,9 @@
|
||||
+ // CraftBukkit end
|
||||
this.remove(Entity.RemovalReason.KILLED);
|
||||
if (!damagesource.isExplosion()) {
|
||||
- this.level.explode((Entity) null, this.getX(), this.getY(), this.getZ(), 6.0F, Explosion.Effect.DESTROY);
|
||||
DamageSource damagesource1 = damagesource.getEntity() != null ? DamageSource.explosion(this, damagesource.getEntity()) : null;
|
||||
|
||||
- this.level.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), 6.0F, false, World.a.BLOCK);
|
||||
+ // CraftBukkit start
|
||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
@@ -44,7 +46,7 @@
|
||||
+ this.unsetRemoved();
|
||||
+ return false;
|
||||
+ }
|
||||
+ this.level.explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
|
||||
+ this.level.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.BLOCK);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
+++ b/net/minecraft/world/entity/boss/wither/EntityWither.java
|
||||
@@ -55,6 +55,17 @@
|
||||
@@ -54,6 +54,17 @@
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
|
||||
@@ -18,21 +18,21 @@
|
||||
public class EntityWither extends EntityMonster implements PowerableMob, IRangedEntity {
|
||||
|
||||
private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
|
||||
@@ -249,16 +260,40 @@
|
||||
@@ -247,15 +258,40 @@
|
||||
i = this.getInvulnerableTicks() - 1;
|
||||
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
|
||||
if (i <= 0) {
|
||||
Explosion.Effect explosion_effect = this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? Explosion.Effect.DESTROY : Explosion.Effect.NONE;
|
||||
- this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, World.a.MOB);
|
||||
+ // CraftBukkit start
|
||||
+ // this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, explosion_effect);
|
||||
+ // this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, World.a.MOB);
|
||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
|
||||
+ this.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), explosion_effect);
|
||||
+ this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
- this.level.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, explosion_effect);
|
||||
+
|
||||
if (!this.isSilent()) {
|
||||
- this.level.globalLevelEvent(1023, this.blockPosition(), 0);
|
||||
+ // CraftBukkit start - Use relative location for far away sounds
|
||||
@@ -62,7 +62,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -303,6 +338,7 @@
|
||||
@@ -300,6 +336,7 @@
|
||||
if (!list.isEmpty()) {
|
||||
EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
this.setAlternativeTarget(i, entityliving1.getId());
|
||||
}
|
||||
}
|
||||
@@ -333,6 +369,11 @@
|
||||
@@ -330,6 +367,11 @@
|
||||
IBlockData iblockdata = this.level.getBlockState(blockposition);
|
||||
|
||||
if (canDestroy(iblockdata)) {
|
||||
@@ -82,7 +82,7 @@
|
||||
flag = this.level.destroyBlock(blockposition, true, this) || flag;
|
||||
}
|
||||
}
|
||||
@@ -346,7 +387,7 @@
|
||||
@@ -343,7 +385,7 @@
|
||||
}
|
||||
|
||||
if (this.tickCount % 20 == 0) {
|
||||
|
||||
Reference in New Issue
Block a user