Fixed #1223 - "Crash while trying to autocraft"

This commit is contained in:
raoulvdberge
2017-05-17 14:26:11 +02:00
parent afe9b5bd0e
commit 75b92dafb6
3 changed files with 6 additions and 9 deletions

View File

@@ -4,6 +4,7 @@
- Performance improvement to network scanning (raoulvdberge) - Performance improvement to network scanning (raoulvdberge)
- Removed debug output from 1.4.5 (raoulvdberge) - Removed debug output from 1.4.5 (raoulvdberge)
- Fixed Wrench opening GUIs while performing action (raoulvdberge) - Fixed Wrench opening GUIs while performing action (raoulvdberge)
- Fixed client Grid GUI clearing and causing crashes after starting an autocrafting request (raoulvdberge)
### 1.4.5 ### 1.4.5
- Updated Forge to 2296 (raoulvdberge) - Updated Forge to 2296 (raoulvdberge)

View File

@@ -680,13 +680,4 @@ public class GuiGrid extends GuiBase implements IGridDisplay {
oredictPattern.setIsChecked(checked); oredictPattern.setIsChecked(checked);
} }
} }
@Override
public void onGuiClosed() {
super.onGuiClosed();
ITEMS.clear();
FLUIDS.clear();
STACKS.clear();
}
} }

View File

@@ -125,6 +125,11 @@ public class PortableGrid implements IGrid, IPortableGrid {
RSUtils.readItems(disk, 4, stack.getTagCompound()); RSUtils.readItems(disk, 4, stack.getTagCompound());
drainEnergy(RS.INSTANCE.config.portableGridOpenUsage); drainEnergy(RS.INSTANCE.config.portableGridOpenUsage);
// If there is no disk onContentsChanged isn't called and the update isn't sent
if (!player.getEntityWorld().isRemote && disk.getStackInSlot(0).isEmpty()) {
cache.invalidate();
}
} }
public ItemStack getStack() { public ItemStack getStack() {