use of mcjty.lib.container.GhostOutputSlot in project RFTools by McJty.
the class GuiStorageScanner method mouseClicked.
@Override
protected void mouseClicked(int x, int y, int button) throws IOException {
super.mouseClicked(x, y, button);
craftingGrid.getWindow().mouseClicked(x, y, button);
if (button == 1) {
Slot slot = getSlotAtPosition(x, y);
if (slot instanceof GhostOutputSlot) {
sendServerCommand(RFToolsMessages.INSTANCE, StorageScannerTileEntity.CMD_CLEARGRID);
}
}
}
use of mcjty.lib.container.GhostOutputSlot in project RFTools by McJty.
the class GuiModularStorage method mouseClicked.
@Override
protected void mouseClicked(int x, int y, int button) throws IOException {
if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) {
Slot slot = getSlotAtPosition(x, y);
if (slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack();
Item item = stack.getItem();
if (item instanceof ItemBlock) {
Block block = ((ItemBlock) item).getBlock();
dumpClasses("Block", block);
} else {
dumpClasses("Item", item);
}
}
}
super.mouseClicked(x, y, button);
craftingGrid.getWindow().mouseClicked(x, y, button);
if (button == 1) {
Slot slot = getSlotAtPosition(x, y);
if (slot instanceof GhostOutputSlot) {
if (tileEntity != null) {
sendServerCommand(RFToolsMessages.INSTANCE, ModularStorageTileEntity.CMD_CLEARGRID);
} else {
sendServerCommand(RFTools.MODID, CommandHandler.CMD_CLEAR_GRID);
}
}
}
}
Aggregations