better fix

This commit is contained in:
tomevoll
2016-03-28 09:07:12 +02:00
parent ac930f0d45
commit 4446313ac1

View File

@@ -111,7 +111,7 @@ public class GuiGrid extends GuiBase {
@Override @Override
public void drawForeground(int mouseX, int mouseY) { public void drawForeground(int mouseX, int mouseY) {
scrollbar.update(this, mouseX, mouseY); scrollbar.update(this, mouseX, mouseY);
synchronized (grid.getController()) {
drawString(7, 7, t("gui.refinedstorage:grid")); drawString(7, 7, t("gui.refinedstorage:grid"));
if (grid.getType() == EnumGridType.CRAFTING) { if (grid.getType() == EnumGridType.CRAFTING) {
@@ -133,9 +133,7 @@ public class GuiGrid extends GuiBase {
for (int i = 0; i < 9 * getVisibleRows(); ++i) { for (int i = 0; i < 9 * getVisibleRows(); ++i) {
if (slot < items.size()) { if (slot < items.size()) {
StorageItem storageItem = items.get(slot); int qty = items.get(slot).getQuantity();
if(storageItem == null) continue;
int qty = storageItem.getQuantity();
String text; String text;
@@ -192,6 +190,7 @@ public class GuiGrid extends GuiBase {
drawTooltip(mouseX, mouseY, t("misc.refinedstorage:clear")); drawTooltip(mouseX, mouseY, t("misc.refinedstorage:clear"));
} }
} }
}
public List<StorageItem> getItems() { public List<StorageItem> getItems() {
List<StorageItem> items = new ArrayList<StorageItem>(); List<StorageItem> items = new ArrayList<StorageItem>();