mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-30 21:23:00 +00:00 
			
		
		
		
	Fix crash when lectern has no item
This should never happen in practice, but might happen when using /setblock or after world corruption, so let's be careful here. Closes #2014
This commit is contained in:
		| @@ -119,7 +119,7 @@ public final class CustomLecternBlockEntity extends BlockEntity implements MenuP | ||||
|     @Override | ||||
|     public CompoundTag getUpdateTag() { | ||||
|         var tag = super.getUpdateTag(); | ||||
|         tag.put(NBT_ITEM, item.save(new CompoundTag())); | ||||
|         if (!item.isEmpty()) tag.put(NBT_ITEM, item.save(new CompoundTag())); | ||||
|         return tag; | ||||
|     } | ||||
| 
 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates