blob: fdab04fae050bedd3e5c974de7165ec18b9f330e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--- a/net/minecraft/server/ItemFireball.java
+++ b/net/minecraft/server/ItemFireball.java
@@ -15,6 +15,14 @@
BlockPosition blockposition = itemactioncontext.getClickPosition().shift(itemactioncontext.getClickedFace());
if (world.getType(blockposition).isAir()) {
+ // CraftBukkit start - fire BlockIgniteEvent
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, itemactioncontext.getEntity()).isCancelled()) {
+ if (!itemactioncontext.getEntity().abilities.canInstantlyBuild) {
+ itemactioncontext.getItemStack().subtract(1);
+ }
+ return EnumInteractionResult.PASS;
+ }
+ // CraftBukkit end
world.a((EntityHuman) null, blockposition, SoundEffects.ITEM_FIRECHARGE_USE, SoundCategory.BLOCKS, 1.0F, (ItemFireball.k.nextFloat() - ItemFireball.k.nextFloat()) * 0.2F + 1.0F);
world.setTypeUpdate(blockposition, ((BlockFire) Blocks.FIRE).a((IBlockAccess) world, blockposition));
}
|