aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch b/patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch
new file mode 100644
index 0000000000..59cb55a612
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/SculkShriekerBlock.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
++++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
+@@ -63,6 +63,7 @@
+ EntityPlayer entityplayer = SculkShriekerBlockEntity.tryGetPlayer(entity);
+
+ if (entityplayer != null) {
++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityplayer, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null).isCancelled()) return; // CraftBukkit
+ worldserver.getBlockEntity(blockposition, TileEntityTypes.SCULK_SHRIEKER).ifPresent((sculkshriekerblockentity) -> {
+ sculkshriekerblockentity.tryShriek(worldserver, entityplayer);
+ });
+@@ -147,10 +148,17 @@
+ @Override
+ public void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
+ super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
++ // CraftBukkit start - Delegate to getExpDrop
++ }
++
++ @Override
++ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
+ if (flag) {
+- this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
++ return this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
+ }
+
++ return 0;
++ // CraftBukkit end
+ }
+
+ @Nullable