Search in sources :

Example 1 with MessageClientGuiBipedRotations

use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiBipedRotations in project Armourers-Workshop by RiskyKen.

the class GuiMannequinTabRotations method checkAndSendRotationValues.

public void checkAndSendRotationValues() {
    BipedPart activePart = bipedRotations.getPartForIndex(activeBipedPart);
    activePart.setRotationsDegrees((float) -bipedRotXslider.getValue(), (float) -bipedRotYslider.getValue(), (float) -bipedRotZslider.getValue());
    if (!this.bipedRotations.equals(this.lastBipedRotations)) {
        NBTTagCompound compound = new NBTTagCompound();
        this.bipedRotations.saveNBTData(compound);
        this.lastBipedRotations.loadNBTData(compound);
        MessageClientGuiBipedRotations message = new MessageClientGuiBipedRotations(bipedRotations);
        PacketHandler.networkWrapper.sendToServer(message);
    }
}
Also used : MessageClientGuiBipedRotations(riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiBipedRotations) BipedPart(riskyken.armourersWorkshop.common.data.BipedRotations.BipedPart) NBTTagCompound(net.minecraft.nbt.NBTTagCompound)

Aggregations

NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 BipedPart (riskyken.armourersWorkshop.common.data.BipedRotations.BipedPart)1 MessageClientGuiBipedRotations (riskyken.armourersWorkshop.common.network.messages.client.MessageClientGuiBipedRotations)1