Merge pull request #12 from tomevoll/patch-5
Fixes index out of bounds and prevent list from being modified by other threads on the client while rendering
This commit is contained in:
		| @@ -111,7 +111,7 @@ public class GuiGrid extends GuiBase { | ||||
|     @Override | ||||
|     public void drawForeground(int mouseX, int mouseY) { | ||||
|         scrollbar.update(this, mouseX, mouseY); | ||||
|  | ||||
|     synchronized (grid.getController()) {     | ||||
|         drawString(7, 7, t("gui.refinedstorage:grid")); | ||||
|  | ||||
|         if (grid.getType() == EnumGridType.CRAFTING) { | ||||
| @@ -133,7 +133,7 @@ public class GuiGrid extends GuiBase { | ||||
|  | ||||
|         for (int i = 0; i < 9 * getVisibleRows(); ++i) { | ||||
|             if (slot < items.size()) { | ||||
|                 int qty = items.get(slot).getQuantity(); | ||||
|             	int qty = items.get(slot).getQuantity(); | ||||
|  | ||||
|                 String text; | ||||
|  | ||||
| @@ -190,6 +190,7 @@ public class GuiGrid extends GuiBase { | ||||
|             drawTooltip(mouseX, mouseY, t("misc.refinedstorage:clear")); | ||||
|         } | ||||
|     } | ||||
|     } | ||||
|  | ||||
|     public List<StorageItem> getItems() { | ||||
|         List<StorageItem> items = new ArrayList<StorageItem>(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Raoul
					Raoul