use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer in project Armourers-Workshop by RiskyKen.
the class MessageClientGuiSetSkin method onMessage.
@Override
public IMessage onMessage(MessageClientGuiSetSkin message, MessageContext ctx) {
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
if (player == null) {
return null;
}
Container container = player.openContainer;
if (container == null) {
return null;
}
if (container != null && container instanceof ContainerArmourer) {
TileEntityArmourer armourerBrain = ((ContainerArmourer) container).getTileEntity();
armourerBrain.setTexture(message.playerTexture);
}
return null;
}
use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer in project Armourers-Workshop by RiskyKen.
the class MessageClientGuiSetArmourerSkinType method onMessage.
@Override
public IMessage onMessage(MessageClientGuiSetArmourerSkinType message, MessageContext ctx) {
EntityPlayerMP player = ctx.getServerHandler().playerEntity;
if (player == null) {
return null;
}
Container container = player.openContainer;
if (container != null && container instanceof ContainerArmourer) {
TileEntityArmourer te = ((ContainerArmourer) container).getTileEntity();
te.setSkinType(message.skinType);
}
if (container != null && container instanceof ContainerMiniArmourerBuilding) {
TileEntityMiniArmourer te = ((ContainerMiniArmourerBuilding) container).getTileEntity();
te.setSkinType(message.skinType);
}
return null;
}
use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer in project Armourers-Workshop by RiskyKen.
the class MessageClientLoadArmour method onMessage.
@Override
public IMessage onMessage(MessageClientLoadArmour 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();
armourerBrain.saveArmourItem(player, message.name, message.tags);
}
return null;
}
use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer in project Armourers-Workshop by RiskyKen.
the class MessageClientGuiArmourerBlockUtil method onMessage.
@Override
public IMessage onMessage(MessageClientGuiArmourerBlockUtil 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();
boolean clearBlocks = message.option1;
boolean clearPaint = message.option2;
boolean clearMarkers = message.option3;
if (message.utilType.equals("clear")) {
if (clearBlocks) {
armourerBrain.clearArmourCubes(message.partType1);
}
if (clearPaint) {
armourerBrain.clearPaintData(true);
}
if (clearMarkers) {
if (!clearBlocks) {
armourerBrain.clearMarkers(message.partType1);
}
}
}
if (message.utilType.equals("copy")) {
armourerBrain.copySkinCubes(player, message.partType1, message.partType2, message.option1);
}
}
return null;
}
use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer 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;
}
Aggregations