Search in sources :

Example 6 with ContainerArmourer

use of riskyken.armourersWorkshop.common.inventory.ContainerArmourer in project Armourers-Workshop by RiskyKen.

the class MessageClientGuiSetArmourerSkinProps method onMessage.

@Override
public IMessage onMessage(MessageClientGuiSetArmourerSkinProps 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.setSkinProps(message.skinProps);
    }
    return null;
}
Also used : Container(net.minecraft.inventory.Container) TileEntityArmourer(riskyken.armourersWorkshop.common.tileentities.TileEntityArmourer) ContainerArmourer(riskyken.armourersWorkshop.common.inventory.ContainerArmourer) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP)

Aggregations

EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)6 Container (net.minecraft.inventory.Container)6 ContainerArmourer (riskyken.armourersWorkshop.common.inventory.ContainerArmourer)6 TileEntityArmourer (riskyken.armourersWorkshop.common.tileentities.TileEntityArmourer)6 ContainerColourMixer (riskyken.armourersWorkshop.common.inventory.ContainerColourMixer)1 ContainerMiniArmourerBuilding (riskyken.armourersWorkshop.common.inventory.ContainerMiniArmourerBuilding)1 TileEntityColourMixer (riskyken.armourersWorkshop.common.tileentities.TileEntityColourMixer)1 TileEntityMiniArmourer (riskyken.armourersWorkshop.common.tileentities.TileEntityMiniArmourer)1