@Override
public void execute(EntityPlayer player, Side side) throws ProtocolException
{
if (side.isServer())
{
TileEntityBusFluidImport tile = (TileEntityBusFluidImport) world.getBlockTileEntity(x, y, z);
switch (action)
{
case 0:
if (tile != null)
PacketDispatcher.sendPacketToAllPlayers(tile.getDescriptionPacket());
break;
case 1:
if (tile.getRedstoneMode().ordinal() >= 3)
{
tile.setRedstoneMode(RedstoneModeInput.values()[0]);
} else
{
tile.setRedstoneMode(RedstoneModeInput.values()[tile.getRedstoneMode().ordinal() + 1]);
}
if (tile != null)
PacketDispatcher.sendPacketToAllPlayers(tile.getDescriptionPacket());
break;
case 2:
if (tile.getFluidMode().ordinal() >= 2)
{
tile.setFluidMode(FluidMode.values()[0]);
} else
{
tile.setFluidMode(FluidMode.values()[tile.getFluidMode().ordinal() + 1]);
}
if (tile != null)
PacketDispatcher.sendPacketToAllPlayers(tile.getDescriptionPacket());
break;
}
}
}