From c5e9a169fa564f3b8119b6666f8df59d5a9b45c3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 10 May 2016 21:47:39 +1000 Subject: Minecraft 1.9.4 --- nms-patches/EntityCreeper.patch | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nms-patches/EntityCreeper.patch') diff --git a/nms-patches/EntityCreeper.patch b/nms-patches/EntityCreeper.patch index 05a4dd21..72fa1d23 100644 --- a/nms-patches/EntityCreeper.patch +++ b/nms-patches/EntityCreeper.patch @@ -1,17 +1,17 @@ --- a/net/minecraft/server/EntityCreeper.java +++ b/net/minecraft/server/EntityCreeper.java -@@ -1,5 +1,10 @@ +@@ -1,6 +1,10 @@ package net.minecraft.server; + import javax.annotation.Nullable; +// CraftBukkit start +import org.bukkit.craftbukkit.event.CraftEventFactory; +import org.bukkit.event.entity.ExplosionPrimeEvent; +// CraftBukkit end -+ + public class EntityCreeper extends EntityMonster { - private static final DataWatcherObject a = DataWatcher.a(EntityCreeper.class, DataWatcherRegistry.b); -@@ -117,7 +122,7 @@ +@@ -119,7 +123,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); -@@ -130,6 +135,7 @@ +@@ -132,6 +136,7 @@ this.a(new ItemStack(Items.SKULL, 1, 4), 0.0F); } } @@ -28,7 +28,7 @@ } -@@ -155,8 +161,18 @@ +@@ -158,8 +163,18 @@ public void onLightningStrike(EntityLightning entitylightning) { super.onLightningStrike(entitylightning); @@ -45,20 +45,20 @@ } + // CraftBukkit end - protected boolean a(EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack) { + protected boolean a(EntityHuman entityhuman, EnumHand enumhand, @Nullable ItemStack itemstack) { if (itemstack != null && itemstack.getItem() == Items.FLINT_AND_STEEL) { -@@ -177,9 +193,17 @@ +@@ -180,9 +195,17 @@ boolean flag = this.world.getGameRules().getBoolean("mobGriefing"); float f = this.isPowered() ? 2.0F : 1.0F; -- this.aT = true; +- this.aU = 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.aT = true; ++ this.aU = true; + this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), flag); + this.die(); + } else { -- cgit v1.2.3