compile fixes

This commit is contained in:
Jason Penilla
2024-04-25 20:15:07 -07:00
parent 9c8593cb14
commit af2e3abf87
9 changed files with 12 additions and 25 deletions

View File

@@ -192,7 +192,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
CandleBlock candleblock = (CandleBlock) block;
-
+ // Paper start - call change block event
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(block))) {
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(candleblock))) {
+ player.containerMenu.sendAllDataToRemote(); // update inv because candle could decrease
+ return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
+ }
@@ -234,7 +234,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack);
+ // Paper start - handle cancelled events
+ if (iblockdata1 == null) {
+ return InteractionResult.PASS;
+ return ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION;
+ }
+ // Paper end