Add nullCheck for 'protoStack[0]' to prevent crash when there is a removal of an item from the modpack. (#28)

This commit is contained in:
Pétrus Pradella authored and GitHub committed 2024-03-11 10:53:12 +01:00
1 parent 87d5f7673a
commit ae9cb8ccf5
1 file changed
+1 -1
@@ -566,7 +566,7 @@ public class TileEntityDrawersComp extends TileEntityDrawers {
@Override
public int getMaxCapacity(int slot) {
if (protoStack[slot] == null || convRate == null || convRate[slot] == 0) return 0;
if (protoStack[slot] == null || protoStack[0] == null || convRate == null || convRate[slot] == 0) return 0;
if (TileEntityDrawersComp.this.isUnlimited() || TileEntityDrawersComp.this.isVending()) {
if (convRate == null || protoStack[slot] == null || convRate[slot] == 0) return Integer.MAX_VALUE;