use of riskyken.armourersWorkshop.common.tileentities.TileEntityColourMixer in project Armourers-Workshop by RiskyKen.
the class MessageClientGuiButton method onMessage.
@Override
public IMessage onMessage(MessageClientGuiButton message, MessageContext ctx) {
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
if (player == null) {
return null;
}
Container container = player.openContainer;
if (container != null && container instanceof ContainerArmourer) {
TileEntityArmourer armourerBrain = ((ContainerArmourer) container).getTileEntity();
if (message.buttonId == 14) {
armourerBrain.loadArmourItem(player);
}
if (message.buttonId == 7) {
armourerBrain.toggleGuides();
}
if (message.buttonId == 9) {
armourerBrain.toggleOverlay();
}
if (message.buttonId == 6) {
armourerBrain.toggleHelper();
}
if (message.buttonId == 11) {
// armourerBrain.cloneToSide(ForgeDirection.WEST);
}
if (message.buttonId == 12) {
// armourerBrain.cloneToSide(ForgeDirection.EAST);
}
}
if (container != null && container instanceof ContainerColourMixer) {
TileEntityColourMixer colourMixer = ((ContainerColourMixer) container).getTileEntity();
colourMixer.setColourFamily(ColourFamily.values()[message.buttonId]);
}
if (container instanceof IButtonPress) {
((IButtonPress) container).buttonPressed(message.buttonId);
}
return null;
}
use of riskyken.armourersWorkshop.common.tileentities.TileEntityColourMixer in project Armourers-Workshop by RiskyKen.
the class MessageClientGuiColourUpdate method onMessage.
@Override
public IMessage onMessage(MessageClientGuiColourUpdate message, MessageContext ctx) {
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
if (player == null) {
return null;
}
Container container = player.openContainer;
if (container != null && container instanceof ContainerColourMixer) {
TileEntityColourMixer colourMixer = ((ContainerColourMixer) container).getTileEntity();
colourMixer.receiveColourUpdateMessage(message.colour, message.item, message.paintType);
}
return null;
}
Aggregations