/** * Event called when the part is activated (right clicked) * * @param player Player that right clicked the part * @param item Item that was used to click it * @return Whether or not an action occurred */ @Override public boolean onActivated(EntityPlayer player, ItemStack item) { if (world == null) return false; if (!world.isRemote) { if (item != null && item.getItem() == Items.dye) { if (item.getItemDamage() < 16) { color = TubeColor.values()[item.getItemDamage()]; updateConnections(); notifyUpdate(); return true; } } else if (item != null) { logic.injectStack(item, ForgeDirection.DOWN, TubeColor.NONE, false); } } return false; }