Fixes #579 "Server Crash on startup"

This commit is contained in:
Raoul Van den Berge
2016-11-05 14:03:58 +01:00
parent 1d2dcb5d57
commit be2f038c18
2 changed files with 6 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
- Added support for JEI R and U keys in Grids (raoulvdberge)
- Fixed crafting upgrade having weird behavior (raoulvdberge)
- Fixed external storage not updating when loading chunk (raoulvdberge)
- Fixed external storage crash (raoulvdberge)
- Fixed weird autocrafting behavior (way2muchnoise)
- Removed controller explosions when multiple controllers are connected to the same network (raoulvdberge)
- You can now decompose storage disks if the item count is below zero by any chance (raoulvdberge)

View File

@@ -58,10 +58,12 @@ public abstract class ItemStorageExternal implements IItemStorage {
// In that case, we remove the items that have been removed due to the shrinkage
if (cache.size() > newStacks.size()) {
for (int i = newStacks.size(); i < cache.size(); ++i) {
ItemStack change = ItemHandlerHelper.copyStackWithSize(cache.get(i), -cache.get(i).stackSize);
if (cache.get(i) != null) {
ItemStack change = ItemHandlerHelper.copyStackWithSize(cache.get(i), -cache.get(i).stackSize);
if (change != null) {
changes.add(change);
if (change != null) {
changes.add(change);
}
}
}
}