use of forestry.core.gui.IContainerSocketed in project ForestryMC by ForestryMC.
the class SocketWidget method handleMouseClick.
@Override
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
ItemStack itemstack = manager.minecraft.player.inventory.getItemStack();
if (itemstack.isEmpty()) {
return;
}
Item held = itemstack.getItem();
Container container = manager.gui.inventorySlots;
if (!(container instanceof IContainerSocketed)) {
return;
}
IContainerSocketed containerSocketed = (IContainerSocketed) container;
// Insert chipsets
if (held instanceof ItemCircuitBoard) {
containerSocketed.handleChipsetClick(slot);
} else if (held instanceof ISolderingIron) {
containerSocketed.handleSolderingIronClick(slot);
}
}
Aggregations