public void OnOpen(Inventory inventory, int initIndex) { for (int y = 0; y < inventory.Y; y++) { for (int x = 0; x < inventory.X; x++) { Slot s = inventory.getSlot(x, y); if (s == null) { continue; } string texture = Inventory.MagicCubes.ContainsKey(s.item) ? Inventory.MagicCubes[s.item] : VanillaChunk.staticBlock[VanillaChunk.byteToString[s.item]].getItemTexture(); GUI.SetBlockAt(initIndex + x + y * inventory.X, texture, s.amount); } } }
public void OnOpen(Inventory inventory, int initIndex) { for (int y = 0; y < inventory.Y; y++) { for (int x = 0; x < inventory.X; x++) { Slot s = inventory.getSlot(x, y); if (s == null) { continue; } string texture = Inventory.MagicCubes.ContainsKey(s.item) ? Inventory.MagicCubes[s.item] : VanillaChunk.staticBlock[VanillaChunk.byteToString[s.item]].getItemTexture(); GUI.SetBlockAt(initIndex + x + y * inventory.X, texture, s.amount); } } }