aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch')
-rw-r--r--patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch b/patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch
new file mode 100644
index 0000000000..d8d6c1e3a0
--- /dev/null
+++ b/patch-remap/og/net/minecraft/world/level/block/BlockLectern.patch
@@ -0,0 +1,17 @@
+--- a/net/minecraft/world/level/block/BlockLectern.java
++++ b/net/minecraft/world/level/block/BlockLectern.java
+@@ -207,12 +207,13 @@
+ }
+
+ private void popBook(IBlockData iblockdata, World world, BlockPosition blockposition) {
+- TileEntity tileentity = world.getBlockEntity(blockposition);
++ TileEntity tileentity = world.getBlockEntity(blockposition, false); // CraftBukkit - don't validate, type may be changed already
+
+ if (tileentity instanceof TileEntityLectern) {
+ TileEntityLectern tileentitylectern = (TileEntityLectern) tileentity;
+ EnumDirection enumdirection = (EnumDirection) iblockdata.getValue(BlockLectern.FACING);
+ ItemStack itemstack = tileentitylectern.getBook().copy();
++ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5500
+ float f = 0.25F * (float) enumdirection.getStepX();
+ float f1 = 0.25F * (float) enumdirection.getStepZ();
+ EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + 0.5D + (double) f, (double) (blockposition.getY() + 1), (double) blockposition.getZ() + 0.5D + (double) f1, itemstack);