aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
new file mode 100644
index 0000000000..d73f7a4bfa
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
@@ -0,0 +1,38 @@
+--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
++++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
+@@ -65,9 +62,10 @@
+ ServerLevel serverlevel = (ServerLevel) level;
+ ServerPlayer serverplayer = SculkShriekerBlockEntity.tryGetPlayer(entity);
+
+- if (serverplayer != null) {
+- serverlevel.getBlockEntity(blockpos, BlockEntityType.SCULK_SHRIEKER).ifPresent((sculkshriekerblockentity) -> {
+- sculkshriekerblockentity.tryShriek(serverlevel, serverplayer);
++ if (entityplayer != null) {
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityplayer, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null).isCancelled()) return; // CraftBukkit
++ worldserver.getBlockEntity(pos, BlockEntityType.SCULK_SHRIEKER).ifPresent((sculkshriekerblockentity) -> {
++ sculkshriekerblockentity.tryShriek(worldserver, entityplayer);
+ });
+ }
+ }
+@@ -152,9 +146,9 @@
+ }
+
+ @Override
+- @Override
+- public FluidState getFluidState(BlockState blockstate) {
+- return (Boolean) blockstate.getValue(SculkShriekerBlock.WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockstate);
++ public void spawnAfterBreak(IBlockData state, ServerLevel level, BlockPos pos, ItemStack stack, boolean dropExperience) {
++ super.spawnAfterBreak(state, level, pos, stack, dropExperience);
++ // CraftBukkit start - Delegate to getExpDrop
+ }
+
+ @Override
+@@ -165,6 +157,8 @@
+ this.tryDropExperience(serverlevel, blockpos, itemstack, ConstantInt.of(5));
+ }
+
++ return 0;
++ // CraftBukkit end
+ }
+
+ @Nullable