Fixes nullPointer in GuiGrid ?
Think instead of all these null checks, maybe not set that list from the network packet as that is another thread, and instead set a temporary list that the gui forground then pull into the main list before rendering.
This commit is contained in:
@@ -133,7 +133,9 @@ public class GuiGrid extends GuiBase {
|
||||
|
||||
for (int i = 0; i < 9 * getVisibleRows(); ++i) {
|
||||
if (slot < items.size()) {
|
||||
int qty = items.get(slot).getQuantity();
|
||||
StorageItem storageItem = items.get(slot);
|
||||
if(storageItem == null) continue;
|
||||
int qty = storageItem.getQuantity();
|
||||
|
||||
String text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user