Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
18 Zeilen
1.1 KiB
Diff
18 Zeilen
1.1 KiB
Diff
--- a/net/minecraft/server/ItemFireball.java
|
|
+++ b/net/minecraft/server/ItemFireball.java
|
|
@@ -15,6 +15,14 @@
|
|
return EnumInteractionResult.FAIL;
|
|
} else {
|
|
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 EnumInteractionResult.PASS;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
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());
|
|
}
|