mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-19 20:00:05 +00:00
Merge pull request #8 from GTNewHorizons/fix-npe
fix npe on clientUpdateCount
This commit is contained in:
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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user