Merge pull request #8 from GTNewHorizons/fix-npe

fix npe on clientUpdateCount
This commit is contained in:
Skiftcha authored and GitHub committed 2021-06-14 07:04:21 +03:00
commit dbdf5b8f05
1 file changed
+4
@@ -833,6 +833,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);