@Override public ItemStack getIconItemStack() { final IDefinitions definitions = AEApi.instance().definitions(); final IBlocks blocks = definitions.blocks(); final IItems items = definitions.items(); final IMaterials materials = definitions.materials(); return this.findFirst( blocks.controller(), blocks.chest(), blocks.cellWorkbench(), blocks.fluixBlock(), items.cell1k(), items.networkTool(), materials.fluixCrystal(), materials.certusQuartzCrystal(), materials.skyDust() ); }
@Override protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) throws IOException { Slot slot = getSlotAtPosition(mouseX, mouseY); if (slot != null) { ItemStack itemStack = slot.getStack(); if (itemStack != null && itemStack.isItemEqual(AEApi.instance().definitions().items().networkTool().maybeStack(1).get())) { return; } } super.mouseClicked(mouseX, mouseY, mouseBtn); }
@Override protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) throws IOException { Slot slot = getSlotAtPosition(mouseX, mouseY); if (slot != null && slot.getStack() != null && AEApi.instance().definitions().items().networkTool().isSameAs(slot.getStack())) { return; } super.mouseClicked(mouseX, mouseY, mouseBtn); }
@Override protected void mouseClicked(int mouseX, int mouseY, int mouseBtn) throws IOException { Slot slot = getSlotAtPosition(mouseX, mouseY); if (slot != null && slot.getStack() != null && AEApi.instance().definitions().items().networkTool().isSameAs(slot.getStack())) { return; } super.mouseClicked(mouseX, mouseY, mouseBtn); }
public void bindUpgradeInventory(InventoryPlayer inv, IUpgradeable upgradeable) { IInventory upgradeInventory = upgradeable.getUpgradeInventory(); for (int i = 0; i < upgradeInventory.getSizeInventory(); i++) { addSlotToContainer(new SlotRespective(upgradeInventory, i, 187, i * 18 + 8)); } IItemDefinition networkToolDefinition = AEApi.instance().definitions().items().networkTool(); for (int i = 0; i < inv.getSizeInventory(); i++) { ItemStack stack = inv.getStackInSlot(i); if (stack != null && networkToolDefinition.isSameAs(stack)) { lockPlayerInventorySlot(i); DimensionalCoord coord = upgradeable.getLocation(); IGuiItem guiItem = (IGuiItem) stack.getItem(); INetworkTool networkTool = (INetworkTool) guiItem.getGuiObject(stack, coord.getWorld(), coord.getPos()); for (int j = 0; j < 3; j++) { for (int k = 0; k < 3; k++) { addSlotToContainer(new SlotNetworkTool(networkTool, k + j * 3, 187 + k * 18, j * 18 + 102)); } } return; } } }