{
TileEntity tile = message.coord4D.getTileEntity(PacketHandler.getPlayer(context).worldObj);
if(tile instanceof IInvConfiguration)
{
IInvConfiguration config = (IInvConfiguration)tile;
if(message.packetType == ConfigurationPacket.EJECT)
{
config.getEjector().setEjecting(!config.getEjector().isEjecting());
}
else if(message.packetType == ConfigurationPacket.SIDE_DATA)
{
if(message.clickType == 0)
{
MekanismUtils.incrementOutput((IInvConfiguration)tile, message.configIndex);
}
else if(message.clickType == 1)
{
MekanismUtils.decrementOutput((IInvConfiguration)tile, message.configIndex);
}
else if(message.clickType == 2)
{
((IInvConfiguration)tile).getConfiguration()[message.configIndex] = 0;
}
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), new Range4D(message.coord4D));
}
else if(message.packetType == ConfigurationPacket.EJECT_COLOR)
{
if(message.clickType == 0)
{
config.getEjector().setOutputColor(TransporterUtils.increment(config.getEjector().getOutputColor()));
}
else if(message.clickType == 1)
{
config.getEjector().setOutputColor(TransporterUtils.decrement(config.getEjector().getOutputColor()));
}
else if(message.clickType == 2)
{
config.getEjector().setOutputColor(null);
}
}
else if(message.packetType == ConfigurationPacket.INPUT_COLOR)
{
ForgeDirection side = ForgeDirection.getOrientation(message.inputSide);
if(message.clickType == 0)
{
config.getEjector().setInputColor(side, TransporterUtils.increment(config.getEjector().getInputColor(side)));
}
else if(message.clickType == 1)
{
config.getEjector().setInputColor(side, TransporterUtils.decrement(config.getEjector().getInputColor(side)));
}
else if(message.clickType == 2)
{
config.getEjector().setInputColor(side, null);
}
}
else if(message.packetType == ConfigurationPacket.STRICT_INPUT)
{
config.getEjector().setStrictInput(!config.getEjector().hasStrictInput());
}
for(EntityPlayer p : ((TileEntityBasicBlock)config).playersUsing)
{
Mekanism.packetHandler.sendTo(new TileEntityMessage(message.coord4D, ((ITileNetwork)tile).getNetworkedData(new ArrayList())), (EntityPlayerMP)p);