Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
--- a/net/minecraft/world/item/ItemFireball.java
|
||||
+++ b/net/minecraft/world/item/ItemFireball.java
|
||||
@@ -40,12 +40,28 @@
|
||||
if (!BlockCampfire.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
|
||||
blockposition = blockposition.relative(itemactioncontext.getClickedFace());
|
||||
if (BlockFireAbstract.canBePlacedAt(world, blockposition, itemactioncontext.getHorizontalDirection())) {
|
||||
+ // CraftBukkit start - fire BlockIgniteEvent
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, itemactioncontext.getPlayer()).isCancelled()) {
|
||||
+ if (!itemactioncontext.getPlayer().getAbilities().instabuild) {
|
||||
+ itemactioncontext.getItemInHand().shrink(1);
|
||||
+ }
|
||||
+ return EnumInteractionResult.PASS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.playSound(world, blockposition);
|
||||
world.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(world, blockposition));
|
||||
world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.BLOCK_PLACE, blockposition);
|
||||
flag = true;
|
||||
}
|
||||
} else {
|
||||
+ // CraftBukkit start - fire BlockIgniteEvent
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, itemactioncontext.getPlayer()).isCancelled()) {
|
||||
+ if (!itemactioncontext.getPlayer().getAbilities().instabuild) {
|
||||
+ itemactioncontext.getItemInHand().shrink(1);
|
||||
+ }
|
||||
+ return EnumInteractionResult.PASS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.playSound(world, blockposition);
|
||||
world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.setValue(BlockProperties.LIT, true));
|
||||
world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.BLOCK_CHANGE, blockposition);
|
||||
Reference in New Issue
Block a user