diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /nms-patches/EntitySmallFireball.patch | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-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/EntitySmallFireball.patch')
-rw-r--r-- | nms-patches/EntitySmallFireball.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/nms-patches/EntitySmallFireball.patch b/nms-patches/EntitySmallFireball.patch new file mode 100644 index 00000000..7d2e7589 --- /dev/null +++ b/nms-patches/EntitySmallFireball.patch @@ -0,0 +1,39 @@ +--- ../work/decompile-bb26c12b/net/minecraft/server/EntitySmallFireball.java 2014-11-27 08:59:46.729421723 +1100 ++++ src/main/java/net/minecraft/server/EntitySmallFireball.java 2014-11-27 08:42:10.152850911 +1100 +@@ -1,5 +1,7 @@ + package net.minecraft.server; + ++import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit ++ + public class EntitySmallFireball extends EntityFireball { + + public EntitySmallFireball(World world) { +@@ -26,7 +28,14 @@ + if (flag) { + this.a(this.shooter, movingobjectposition.entity); + if (!movingobjectposition.entity.isFireProof()) { +- movingobjectposition.entity.setOnFire(5); ++ // CraftBukkit start - Entity damage by entity event + combust event ++ EntityCombustByEntityEvent event = new EntityCombustByEntityEvent((org.bukkit.entity.Projectile) this.getBukkitEntity(), movingobjectposition.entity.getBukkitEntity(), 5); ++ movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event); ++ ++ if (!event.isCancelled()) { ++ movingobjectposition.entity.setOnFire(event.getDuration()); ++ } ++ // CraftBukkit end + } + } + } else { +@@ -39,7 +48,11 @@ + BlockPosition blockposition = movingobjectposition.a().shift(movingobjectposition.direction); + + if (this.world.isEmpty(blockposition)) { +- this.world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData()); ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this).isCancelled()) { ++ this.world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData()); ++ } ++ // CraftBukkit end + } + } + } |