fix npe on clientUpdateCount

This commit is contained in:
Skiftcha committed 2021-06-14 06:23:46 +03:00
1 parent 9df127f9df
commit 8e31c6bb9b
1 file changed
+4
@@ -802,6 +802,10 @@ public abstract class TileEntityDrawers extends BaseTileEntity implements IDrawe
public void clientUpdateCount (int slot, int count) {
IDrawer drawer = getDrawer(slot);
if (drawer == null) {
FMLLog.log(StorageDrawers.MOD_ID, Level.ERROR, "Drawer at (" + this.xCoord + "," + this.yCoord + "," + this.zCoord + ") has no slot " + slot + ". Drawers.length is " + drawers.length);
return;
}
if (drawer.getStoredItemCount() != count) {
drawer.setStoredItemCount(count);