2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockLectern.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockLectern.java
|
2023-12-05 17:40:00 +01:00
|
|
|
@@ -207,12 +207,13 @@
|
2020-01-06 02:12:34 +01:00
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
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
|
2020-01-06 02:12:34 +01:00
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityLectern) {
|
|
|
|
TileEntityLectern tileentitylectern = (TileEntityLectern) tileentity;
|
2021-11-21 23:00:00 +01:00
|
|
|
EnumDirection enumdirection = (EnumDirection) iblockdata.getValue(BlockLectern.FACING);
|
|
|
|
ItemStack itemstack = tileentitylectern.getBook().copy();
|
2020-01-06 02:12:34 +01:00
|
|
|
+ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5500
|
2021-11-21 23:00:00 +01:00
|
|
|
float f = 0.25F * (float) enumdirection.getStepX();
|
|
|
|
float f1 = 0.25F * (float) enumdirection.getStepZ();
|
2020-01-06 02:12:34 +01:00
|
|
|
EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + 0.5D + (double) f, (double) (blockposition.getY() + 1), (double) blockposition.getZ() + 0.5D + (double) f1, itemstack);
|