summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemFireball.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
committermd_5 <git@md-5.net>2016-11-17 12:41:03 +1100
commitc25ddf063a808e3adb749e22017661f403c5fb7e (patch)
treeb2efcff512be12fd3e38cf8c36386148ce6ab4ae /nms-patches/ItemFireball.patch
parent51263e97187a84338f89698eef187284055a682a (diff)
downloadcraftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.gz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.lz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.tar.xz
craftbukkit-c25ddf063a808e3adb749e22017661f403c5fb7e.zip
Update to Minecraft 1.11
Diffstat (limited to 'nms-patches/ItemFireball.patch')
-rw-r--r--nms-patches/ItemFireball.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/ItemFireball.patch b/nms-patches/ItemFireball.patch
index ca644d64..f60e3955 100644
--- a/nms-patches/ItemFireball.patch
+++ b/nms-patches/ItemFireball.patch
@@ -1,17 +1,17 @@
--- a/net/minecraft/server/ItemFireball.java
+++ b/net/minecraft/server/ItemFireball.java
-@@ -15,6 +15,14 @@
+@@ -17,6 +17,14 @@
return EnumInteractionResult.FAIL;
} else {
if (world.getType(blockposition).getMaterial() == Material.AIR) {
+ // CraftBukkit start - fire BlockIgniteEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, entityhuman).isCancelled()) {
+ if (!entityhuman.abilities.canInstantlyBuild) {
-+ --itemstack.count;
++ itemstack.subtract(1);
+ }
+ return EnumInteractionResult.PASS;
+ }
+ // CraftBukkit end
- world.a((EntityHuman) null, blockposition, SoundEffects.bn, SoundCategory.BLOCKS, 1.0F, (ItemFireball.j.nextFloat() - ItemFireball.j.nextFloat()) * 0.2F + 1.0F);
+ world.a((EntityHuman) null, blockposition, SoundEffects.bx, SoundCategory.BLOCKS, 1.0F, (ItemFireball.j.nextFloat() - ItemFireball.j.nextFloat()) * 0.2F + 1.0F);
world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData());
}