mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
16 lines
1.1 KiB
Diff
16 lines
1.1 KiB
Diff
--- a/net/minecraft/world/level/block/BlockLectern.java
|
|
+++ b/net/minecraft/world/level/block/BlockLectern.java
|
|
@@ -207,11 +207,12 @@
|
|
}
|
|
|
|
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) {
|
|
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);
|