}
TileEntity te = world.getBlockTileEntity(x, y, z);
if(te instanceof TileEntityRedNetCable)
{
TileEntityRedNetCable cable = (TileEntityRedNetCable)te;
int subHit = getPartClicked(player, 3.0F, cable);
if(subHit < 0)
{
return false;
}
side = _partSideMappings[subHit];
ItemStack s = player.inventory.getCurrentItem();
if(side >= 0)
{
if(MFRUtil.isHoldingHammer(player))
{
if(!world.isRemote)
{
int nextColor;
if(!player.isSneaking())
{
nextColor = cable.getSideColor(ForgeDirection.getOrientation(side)) + 1;
if(nextColor > 15) nextColor = 0;
}
else
{
nextColor = cable.getSideColor(ForgeDirection.getOrientation(side)) - 1;
if(nextColor < 0) nextColor = 15;
}
cable.setSideColor(ForgeDirection.getOrientation(side), nextColor);
world.markBlockForUpdate(x, y, z);
return true;
}
}
else if(s != null && s.itemID == Item.dyePowder.itemID)
{
if(!world.isRemote)
{
cable.setSideColor(ForgeDirection.getOrientation(side), 15 - s.getItemDamage());
world.markBlockForUpdate(x, y, z);
return true;
}
}
}
else if(MFRUtil.isHoldingHammer(player))
{
byte mode = cable.getMode();
mode++;
if(mode > 2)
{
mode = 0;
}
cable.setMode(mode);
if(!world.isRemote)
{
PacketDispatcher.sendPacketToAllAround(x, y, z, 50, world.provider.dimensionId, cable.getDescriptionPacket());
if(mode == 0)
{
player.sendChatToPlayer("Set cable to standard connection mode");
}
else if(mode == 1)