2020-01-06 02:12:34 +01:00
|
|
|
--- a/net/minecraft/server/BlockLectern.java
|
|
|
|
+++ b/net/minecraft/server/BlockLectern.java
|
2020-06-25 02:00:00 +02:00
|
|
|
@@ -165,12 +165,13 @@
|
2020-01-06 02:12:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private void d(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
|
|
|
- TileEntity tileentity = world.getTileEntity(blockposition);
|
|
|
|
+ TileEntity tileentity = world.getTileEntity(blockposition, false); // CraftBukkit - don't validate, type may be changed already
|
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityLectern) {
|
|
|
|
TileEntityLectern tileentitylectern = (TileEntityLectern) tileentity;
|
|
|
|
EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockLectern.a);
|
|
|
|
ItemStack itemstack = tileentitylectern.getBook().cloneItemStack();
|
|
|
|
+ if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5500
|
|
|
|
float f = 0.25F * (float) enumdirection.getAdjacentX();
|
|
|
|
float f1 = 0.25F * (float) enumdirection.getAdjacentZ();
|
|
|
|
EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + 0.5D + (double) f, (double) (blockposition.getY() + 1), (double) blockposition.getZ() + 0.5D + (double) f1, itemstack);
|