Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
18 Zeilen
1.3 KiB
Diff
18 Zeilen
1.3 KiB
Diff
--- /home/matt/mc-dev-private//net/minecraft/server/ItemFireball.java 2015-02-26 22:40:22.807608137 +0000
|
|
+++ src/main/java/net/minecraft/server/ItemFireball.java 2015-02-26 22:40:22.811608137 +0000
|
|
@@ -15,6 +15,14 @@
|
|
return false;
|
|
} else {
|
|
if (world.getType(blockposition).getBlock().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;
|
|
+ }
|
|
+ // 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.setTypeUpdate(blockposition, Blocks.FIRE.getBlockData());
|
|
}
|