2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/ItemFireball.java
|
|
|
|
+++ b/net/minecraft/server/ItemFireball.java
|
2015-02-26 23:41:06 +01:00
|
|
|
@@ -15,6 +15,14 @@
|
2016-02-29 22:32:46 +01:00
|
|
|
return EnumInteractionResult.FAIL;
|
2014-11-25 22:32:16 +01:00
|
|
|
} else {
|
2016-02-29 22:32:46 +01:00
|
|
|
if (world.getType(blockposition).getMaterial() == Material.AIR) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // 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;
|
|
|
|
+ }
|
2016-02-29 22:32:46 +01:00
|
|
|
+ return EnumInteractionResult.PASS;
|
2014-11-25 22:32:16 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2016-03-30 21:50:59 +02:00
|
|
|
world.a((EntityHuman) null, blockposition, SoundEffects.bm, SoundCategory.BLOCKS, 1.0F, (ItemFireball.j.nextFloat() - ItemFireball.j.nextFloat()) * 0.2F + 1.0F);
|
2014-11-25 22:32:16 +01:00
|
|
|
world.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData());
|
|
|
|
}
|