diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/ItemFireball.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/ItemFireball.patch')
-rw-r--r-- | nms-patches/ItemFireball.patch | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nms-patches/ItemFireball.patch b/nms-patches/ItemFireball.patch index dc040d9f..6cf934f3 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 @@ - return false; + return EnumInteractionResult.FAIL; } else { - if (world.getType(blockposition).getBlock().getMaterial() == Material.AIR) { + 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; + } -+ return false; ++ return EnumInteractionResult.PASS; + } + // CraftBukkit end - world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "item.fireCharge.use", 1.0F, (ItemFireball.g.nextFloat() - ItemFireball.g.nextFloat()) * 0.2F + 1.0F); + world.a((EntityHuman) null, blockposition, SoundEffects.bl, SoundCategory.BLOCKS, 1.0F, (ItemFireball.i.nextFloat() - ItemFireball.i.nextFloat()) * 0.2F + 1.0F); world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData()); } |