Search in sources :

Example 1 with ContainerMannequin

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

the class MessageClientGuiBipedRotations method onMessage.

@Override
public IMessage onMessage(MessageClientGuiBipedRotations message, MessageContext ctx) {
    EntityPlayerMP player = ctx.getServerHandler().playerEntity;
    if (player == null) {
        return null;
    }
    Container container = player.openContainer;
    if (container != null && container instanceof ContainerMannequin) {
        TileEntityMannequin tileEntity = ((ContainerMannequin) container).getTileEntity();
        tileEntity.setBipedRotations(message.bipedRotations);
    }
    return null;
}
Also used : ContainerMannequin(riskyken.armourersWorkshop.common.inventory.ContainerMannequin) Container(net.minecraft.inventory.Container) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) TileEntityMannequin(riskyken.armourersWorkshop.common.tileentities.TileEntityMannequin)

Example 2 with ContainerMannequin

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

the class MessageClientGuiMannequinData method onMessage.

@Override
public IMessage onMessage(MessageClientGuiMannequinData message, MessageContext ctx) {
    EntityPlayerMP player = ctx.getServerHandler().playerEntity;
    if (player == null) {
        return null;
    }
    Container container = player.openContainer;
    if (container != null && container instanceof ContainerMannequin) {
        TileEntityMannequin tileEntity = ((ContainerMannequin) container).getTileEntity();
        tileEntity.gotUpdateFromClient(message.xOffset, message.yOffset, message.zOffset, message.skinColour, message.hairColour, message.username, message.renderExtras, message.flying, message.visible, message.textureType);
    }
    return null;
}
Also used : ContainerMannequin(riskyken.armourersWorkshop.common.inventory.ContainerMannequin) Container(net.minecraft.inventory.Container) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) TileEntityMannequin(riskyken.armourersWorkshop.common.tileentities.TileEntityMannequin)

Aggregations

EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 Container (net.minecraft.inventory.Container)2 ContainerMannequin (riskyken.armourersWorkshop.common.inventory.ContainerMannequin)2 TileEntityMannequin (riskyken.armourersWorkshop.common.tileentities.TileEntityMannequin)2