mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
20 lines
1.5 KiB
Diff
20 lines
1.5 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/ItemFireball.java 2014-11-28 17:43:43.225707432 +0000
|
|
+++ src/main/java/net/minecraft/server/ItemFireball.java 2014-11-28 17:38:23.000000000 +0000
|
|
@@ -15,7 +15,15 @@
|
|
return false;
|
|
} else {
|
|
if (world.getType(blockposition).getBlock().getMaterial() == Material.AIR) {
|
|
- 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);
|
|
+ // 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;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+ world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "item.fireCharge.use", 1.0F, (g.nextFloat() - g.nextFloat()) * 0.2F + 1.0F);
|
|
world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData());
|
|
}
|
|
|