mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
@@ -11,7 +11,7 @@
|
||||
|
||||
public class EntityCreeper extends EntityMonster {
|
||||
|
||||
@@ -119,7 +123,7 @@
|
||||
@@ -123,7 +127,7 @@
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
@@ -20,7 +20,7 @@
|
||||
if (this.world.getGameRules().getBoolean("doMobLoot")) {
|
||||
if (damagesource.getEntity() instanceof EntitySkeleton) {
|
||||
int i = Item.getId(Items.RECORD_13);
|
||||
@@ -132,6 +136,7 @@
|
||||
@@ -136,6 +140,7 @@
|
||||
this.a(new ItemStack(Items.SKULL, 1, 4), 0.0F);
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -158,9 +163,19 @@
|
||||
@@ -162,9 +167,19 @@
|
||||
|
||||
public void onLightningStrike(EntityLightning entitylightning) {
|
||||
super.onLightningStrike(entitylightning);
|
||||
@@ -48,19 +48,19 @@
|
||||
+
|
||||
protected boolean a(EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack) {
|
||||
if (itemstack != null && itemstack.getItem() == Items.FLINT_AND_STEEL) {
|
||||
this.world.a(entityhuman, this.locX, this.locY, this.locZ, SoundEffects.bx, this.bA(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
|
||||
@@ -180,9 +195,17 @@
|
||||
this.world.a(entityhuman, this.locX, this.locY, this.locZ, SoundEffects.by, this.bC(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
|
||||
@@ -184,9 +199,17 @@
|
||||
boolean flag = this.world.getGameRules().getBoolean("mobGriefing");
|
||||
float f = this.isPowered() ? 2.0F : 1.0F;
|
||||
|
||||
- this.aU = true;
|
||||
- this.aV = true;
|
||||
- this.world.explode(this, this.locX, this.locY, this.locZ, (float) this.explosionRadius * f, flag);
|
||||
- this.die();
|
||||
+ // CraftBukkit start
|
||||
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), this.explosionRadius * f, false);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.aU = true;
|
||||
+ this.aV = true;
|
||||
+ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), flag);
|
||||
+ this.die();
|
||||
+ } else {
|
||||
|
Reference in New Issue
Block a user