mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
15 lines
1.1 KiB
Diff
15 lines
1.1 KiB
Diff
--- a/net/minecraft/world/item/PotionItem.java
|
|
+++ b/net/minecraft/world/item/PotionItem.java
|
|
@@ -42,6 +_,12 @@
|
|
PotionContents potionContents = itemInHand.getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY);
|
|
BlockState blockState = level.getBlockState(clickedPos);
|
|
if (context.getClickedFace() != Direction.DOWN && blockState.is(BlockTags.CONVERTABLE_TO_MUD) && potionContents.is(Potions.WATER)) {
|
|
+ // Paper start
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, clickedPos, Blocks.MUD.defaultBlockState())) {
|
|
+ player.containerMenu.sendAllDataToRemote();
|
|
+ return InteractionResult.PASS;
|
|
+ }
|
|
+ // Paper end
|
|
level.playSound(null, clickedPos, SoundEvents.GENERIC_SPLASH, SoundSource.BLOCKS, 1.0F, 1.0F);
|
|
player.setItemInHand(context.getHand(), ItemUtils.createFilledResult(itemInHand, player, new ItemStack(Items.GLASS_BOTTLE)));
|
|
player.awardStat(Stats.ITEM_USED.get(itemInHand.getItem()));
|