summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityEnderCrystal.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-11-26 08:32:16 +1100
committermd_5 <git@md-5.net>2014-11-28 17:16:30 +1100
commit24557bc2b37deb6a0edf497d547471832457b1dd (patch)
treec560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/EntityEnderCrystal.patch
parenta4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff)
downloadcraftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz
craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'nms-patches/EntityEnderCrystal.patch')
-rw-r--r--nms-patches/EntityEnderCrystal.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/nms-patches/EntityEnderCrystal.patch b/nms-patches/EntityEnderCrystal.patch
new file mode 100644
index 00000000..0bf41baa
--- /dev/null
+++ b/nms-patches/EntityEnderCrystal.patch
@@ -0,0 +1,43 @@
+--- ../work/decompile-bb26c12b/net/minecraft/server/EntityEnderCrystal.java 2014-11-27 08:59:46.665422005 +1100
++++ src/main/java/net/minecraft/server/EntityEnderCrystal.java 2014-11-27 08:42:10.172850872 +1100
+@@ -1,5 +1,10 @@
+ package net.minecraft.server;
+
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.ExplosionPrimeEvent;
++// CraftBukkit end
++
+ public class EntityEnderCrystal extends Entity {
+
+ public int a;
+@@ -32,7 +37,11 @@
+ int k = MathHelper.floor(this.locZ);
+
+ if (this.world.worldProvider instanceof WorldProviderTheEnd && this.world.getType(new BlockPosition(i, j, k)).getBlock() != Blocks.FIRE) {
+- this.world.setTypeUpdate(new BlockPosition(i, j, k), Blocks.FIRE.getBlockData());
++ // CraftBukkit start
++ if (!CraftEventFactory.callBlockIgniteEvent(this.world, i, j, k, this).isCancelled()) {
++ this.world.setTypeUpdate(new BlockPosition(i, j, k), Blocks.FIRE.getBlockData());
++ }
++ // CraftBukkit end
+ }
+
+ }
+@@ -54,7 +63,15 @@
+ if (this.b <= 0) {
+ this.die();
+ if (!this.world.isStatic) {
+- this.world.explode((Entity) null, this.locX, this.locY, this.locZ, 6.0F, true);
++ // CraftBukkit start
++ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
++ this.world.getServer().getPluginManager().callEvent(event);
++ if (event.isCancelled()) {
++ this.dead = false;
++ return false;
++ }
++ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), true);
++ // CraftBukkit end
+ }
+ }
+ }