Java 类net.minecraft.util.math.Rotations 实例源码

项目:Backmemed    文件:EntityArmorStand.java   
/**
 * Saves the pose to an NBTTagCompound.
 */
private void writePoseToNBT(NBTTagCompound tagCompound)
{
    NBTTagList nbttaglist = tagCompound.getTagList("Head", 5);
    this.setHeadRotation(nbttaglist.hasNoTags() ? DEFAULT_HEAD_ROTATION : new Rotations(nbttaglist));
    NBTTagList nbttaglist1 = tagCompound.getTagList("Body", 5);
    this.setBodyRotation(nbttaglist1.hasNoTags() ? DEFAULT_BODY_ROTATION : new Rotations(nbttaglist1));
    NBTTagList nbttaglist2 = tagCompound.getTagList("LeftArm", 5);
    this.setLeftArmRotation(nbttaglist2.hasNoTags() ? DEFAULT_LEFTARM_ROTATION : new Rotations(nbttaglist2));
    NBTTagList nbttaglist3 = tagCompound.getTagList("RightArm", 5);
    this.setRightArmRotation(nbttaglist3.hasNoTags() ? DEFAULT_RIGHTARM_ROTATION : new Rotations(nbttaglist3));
    NBTTagList nbttaglist4 = tagCompound.getTagList("LeftLeg", 5);
    this.setLeftLegRotation(nbttaglist4.hasNoTags() ? DEFAULT_LEFTLEG_ROTATION : new Rotations(nbttaglist4));
    NBTTagList nbttaglist5 = tagCompound.getTagList("RightLeg", 5);
    this.setRightLegRotation(nbttaglist5.hasNoTags() ? DEFAULT_RIGHTLEG_ROTATION : new Rotations(nbttaglist5));
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
/**
 * Saves the pose to an NBTTagCompound.
 */
private void writePoseToNBT(NBTTagCompound tagCompound)
{
    NBTTagList nbttaglist = tagCompound.getTagList("Head", 5);
    this.setHeadRotation(nbttaglist.hasNoTags() ? DEFAULT_HEAD_ROTATION : new Rotations(nbttaglist));
    NBTTagList nbttaglist1 = tagCompound.getTagList("Body", 5);
    this.setBodyRotation(nbttaglist1.hasNoTags() ? DEFAULT_BODY_ROTATION : new Rotations(nbttaglist1));
    NBTTagList nbttaglist2 = tagCompound.getTagList("LeftArm", 5);
    this.setLeftArmRotation(nbttaglist2.hasNoTags() ? DEFAULT_LEFTARM_ROTATION : new Rotations(nbttaglist2));
    NBTTagList nbttaglist3 = tagCompound.getTagList("RightArm", 5);
    this.setRightArmRotation(nbttaglist3.hasNoTags() ? DEFAULT_RIGHTARM_ROTATION : new Rotations(nbttaglist3));
    NBTTagList nbttaglist4 = tagCompound.getTagList("LeftLeg", 5);
    this.setLeftLegRotation(nbttaglist4.hasNoTags() ? DEFAULT_LEFTLEG_ROTATION : new Rotations(nbttaglist4));
    NBTTagList nbttaglist5 = tagCompound.getTagList("RightLeg", 5);
    this.setRightLegRotation(nbttaglist5.hasNoTags() ? DEFAULT_RIGHTLEG_ROTATION : new Rotations(nbttaglist5));
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
/**
 * Saves the pose to an NBTTagCompound.
 */
private void writePoseToNBT(NBTTagCompound tagCompound)
{
    NBTTagList nbttaglist = tagCompound.getTagList("Head", 5);
    this.setHeadRotation(nbttaglist.hasNoTags() ? DEFAULT_HEAD_ROTATION : new Rotations(nbttaglist));
    NBTTagList nbttaglist1 = tagCompound.getTagList("Body", 5);
    this.setBodyRotation(nbttaglist1.hasNoTags() ? DEFAULT_BODY_ROTATION : new Rotations(nbttaglist1));
    NBTTagList nbttaglist2 = tagCompound.getTagList("LeftArm", 5);
    this.setLeftArmRotation(nbttaglist2.hasNoTags() ? DEFAULT_LEFTARM_ROTATION : new Rotations(nbttaglist2));
    NBTTagList nbttaglist3 = tagCompound.getTagList("RightArm", 5);
    this.setRightArmRotation(nbttaglist3.hasNoTags() ? DEFAULT_RIGHTARM_ROTATION : new Rotations(nbttaglist3));
    NBTTagList nbttaglist4 = tagCompound.getTagList("LeftLeg", 5);
    this.setLeftLegRotation(nbttaglist4.hasNoTags() ? DEFAULT_LEFTLEG_ROTATION : new Rotations(nbttaglist4));
    NBTTagList nbttaglist5 = tagCompound.getTagList("RightLeg", 5);
    this.setRightLegRotation(nbttaglist5.hasNoTags() ? DEFAULT_RIGHTLEG_ROTATION : new Rotations(nbttaglist5));
}
项目:Backmemed    文件:EntityArmorStand.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    super.onUpdate();
    Rotations rotations = (Rotations)this.dataManager.get(HEAD_ROTATION);

    if (!this.headRotation.equals(rotations))
    {
        this.setHeadRotation(rotations);
    }

    Rotations rotations1 = (Rotations)this.dataManager.get(BODY_ROTATION);

    if (!this.bodyRotation.equals(rotations1))
    {
        this.setBodyRotation(rotations1);
    }

    Rotations rotations2 = (Rotations)this.dataManager.get(LEFT_ARM_ROTATION);

    if (!this.leftArmRotation.equals(rotations2))
    {
        this.setLeftArmRotation(rotations2);
    }

    Rotations rotations3 = (Rotations)this.dataManager.get(RIGHT_ARM_ROTATION);

    if (!this.rightArmRotation.equals(rotations3))
    {
        this.setRightArmRotation(rotations3);
    }

    Rotations rotations4 = (Rotations)this.dataManager.get(LEFT_LEG_ROTATION);

    if (!this.leftLegRotation.equals(rotations4))
    {
        this.setLeftLegRotation(rotations4);
    }

    Rotations rotations5 = (Rotations)this.dataManager.get(RIGHT_LEG_ROTATION);

    if (!this.rightLegRotation.equals(rotations5))
    {
        this.setRightLegRotation(rotations5);
    }

    boolean flag = this.hasMarker();

    if (this.wasMarker != flag)
    {
        this.updateBoundingBox(flag);
        this.preventEntitySpawning = !flag;
        this.wasMarker = flag;
    }
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setHeadRotation(Rotations vec)
{
    this.headRotation = vec;
    this.dataManager.set(HEAD_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setBodyRotation(Rotations vec)
{
    this.bodyRotation = vec;
    this.dataManager.set(BODY_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setLeftArmRotation(Rotations vec)
{
    this.leftArmRotation = vec;
    this.dataManager.set(LEFT_ARM_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setRightArmRotation(Rotations vec)
{
    this.rightArmRotation = vec;
    this.dataManager.set(RIGHT_ARM_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setLeftLegRotation(Rotations vec)
{
    this.leftLegRotation = vec;
    this.dataManager.set(LEFT_LEG_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public void setRightLegRotation(Rotations vec)
{
    this.rightLegRotation = vec;
    this.dataManager.set(RIGHT_LEG_ROTATION, vec);
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getHeadRotation()
{
    return this.headRotation;
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getBodyRotation()
{
    return this.bodyRotation;
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getLeftArmRotation()
{
    return this.leftArmRotation;
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getRightArmRotation()
{
    return this.rightArmRotation;
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getLeftLegRotation()
{
    return this.leftLegRotation;
}
项目:Backmemed    文件:EntityArmorStand.java   
public Rotations getRightLegRotation()
{
    return this.rightLegRotation;
}
项目:Backmemed    文件:DataSerializers.java   
public void write(PacketBuffer buf, Rotations value)
{
    buf.writeFloat(value.getX());
    buf.writeFloat(value.getY());
    buf.writeFloat(value.getZ());
}
项目:Backmemed    文件:DataSerializers.java   
public Rotations read(PacketBuffer buf) throws IOException
{
    return new Rotations(buf.readFloat(), buf.readFloat(), buf.readFloat());
}
项目:Backmemed    文件:DataSerializers.java   
public DataParameter<Rotations> createKey(int id)
{
    return new DataParameter(id, this);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    super.onUpdate();
    Rotations rotations = (Rotations)this.dataManager.get(HEAD_ROTATION);

    if (!this.headRotation.equals(rotations))
    {
        this.setHeadRotation(rotations);
    }

    Rotations rotations1 = (Rotations)this.dataManager.get(BODY_ROTATION);

    if (!this.bodyRotation.equals(rotations1))
    {
        this.setBodyRotation(rotations1);
    }

    Rotations rotations2 = (Rotations)this.dataManager.get(LEFT_ARM_ROTATION);

    if (!this.leftArmRotation.equals(rotations2))
    {
        this.setLeftArmRotation(rotations2);
    }

    Rotations rotations3 = (Rotations)this.dataManager.get(RIGHT_ARM_ROTATION);

    if (!this.rightArmRotation.equals(rotations3))
    {
        this.setRightArmRotation(rotations3);
    }

    Rotations rotations4 = (Rotations)this.dataManager.get(LEFT_LEG_ROTATION);

    if (!this.leftLegRotation.equals(rotations4))
    {
        this.setLeftLegRotation(rotations4);
    }

    Rotations rotations5 = (Rotations)this.dataManager.get(RIGHT_LEG_ROTATION);

    if (!this.rightLegRotation.equals(rotations5))
    {
        this.setRightLegRotation(rotations5);
    }

    boolean flag = this.hasMarker();

    if (!this.wasMarker && flag)
    {
        this.updateBoundingBox(false);
        this.preventEntitySpawning = false;
    }
    else
    {
        if (!this.wasMarker || flag)
        {
            return;
        }

        this.updateBoundingBox(true);
        this.preventEntitySpawning = true;
    }

    this.wasMarker = flag;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setHeadRotation(Rotations vec)
{
    this.headRotation = vec;
    this.dataManager.set(HEAD_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setBodyRotation(Rotations vec)
{
    this.bodyRotation = vec;
    this.dataManager.set(BODY_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setLeftArmRotation(Rotations vec)
{
    this.leftArmRotation = vec;
    this.dataManager.set(LEFT_ARM_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setRightArmRotation(Rotations vec)
{
    this.rightArmRotation = vec;
    this.dataManager.set(RIGHT_ARM_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setLeftLegRotation(Rotations vec)
{
    this.leftLegRotation = vec;
    this.dataManager.set(LEFT_LEG_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public void setRightLegRotation(Rotations vec)
{
    this.rightLegRotation = vec;
    this.dataManager.set(RIGHT_LEG_ROTATION, vec);
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public Rotations getHeadRotation()
{
    return this.headRotation;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
public Rotations getBodyRotation()
{
    return this.bodyRotation;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
@SideOnly(Side.CLIENT)
public Rotations getLeftArmRotation()
{
    return this.leftArmRotation;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
@SideOnly(Side.CLIENT)
public Rotations getRightArmRotation()
{
    return this.rightArmRotation;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
@SideOnly(Side.CLIENT)
public Rotations getLeftLegRotation()
{
    return this.leftLegRotation;
}
项目:CustomWorldGen    文件:EntityArmorStand.java   
@SideOnly(Side.CLIENT)
public Rotations getRightLegRotation()
{
    return this.rightLegRotation;
}
项目:CustomWorldGen    文件:DataSerializers.java   
public void write(PacketBuffer buf, Rotations value)
{
    buf.writeFloat(value.getX());
    buf.writeFloat(value.getY());
    buf.writeFloat(value.getZ());
}
项目:CustomWorldGen    文件:DataSerializers.java   
public Rotations read(PacketBuffer buf)
{
    return new Rotations(buf.readFloat(), buf.readFloat(), buf.readFloat());
}
项目:CustomWorldGen    文件:DataSerializers.java   
public DataParameter<Rotations> createKey(int id)
{
    return new DataParameter(id, this);
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
/**
 * Called to update the entity's position/logic.
 */
public void onUpdate()
{
    super.onUpdate();
    Rotations rotations = (Rotations)this.dataManager.get(HEAD_ROTATION);

    if (!this.headRotation.equals(rotations))
    {
        this.setHeadRotation(rotations);
    }

    Rotations rotations1 = (Rotations)this.dataManager.get(BODY_ROTATION);

    if (!this.bodyRotation.equals(rotations1))
    {
        this.setBodyRotation(rotations1);
    }

    Rotations rotations2 = (Rotations)this.dataManager.get(LEFT_ARM_ROTATION);

    if (!this.leftArmRotation.equals(rotations2))
    {
        this.setLeftArmRotation(rotations2);
    }

    Rotations rotations3 = (Rotations)this.dataManager.get(RIGHT_ARM_ROTATION);

    if (!this.rightArmRotation.equals(rotations3))
    {
        this.setRightArmRotation(rotations3);
    }

    Rotations rotations4 = (Rotations)this.dataManager.get(LEFT_LEG_ROTATION);

    if (!this.leftLegRotation.equals(rotations4))
    {
        this.setLeftLegRotation(rotations4);
    }

    Rotations rotations5 = (Rotations)this.dataManager.get(RIGHT_LEG_ROTATION);

    if (!this.rightLegRotation.equals(rotations5))
    {
        this.setRightLegRotation(rotations5);
    }

    boolean flag = this.hasMarker();

    if (!this.wasMarker && flag)
    {
        this.updateBoundingBox(false);
        this.preventEntitySpawning = false;
    }
    else
    {
        if (!this.wasMarker || flag)
        {
            return;
        }

        this.updateBoundingBox(true);
        this.preventEntitySpawning = true;
    }

    this.wasMarker = flag;
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
public void setHeadRotation(Rotations vec)
{
    this.headRotation = vec;
    this.dataManager.set(HEAD_ROTATION, vec);
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
public void setBodyRotation(Rotations vec)
{
    this.bodyRotation = vec;
    this.dataManager.set(BODY_ROTATION, vec);
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
public void setLeftArmRotation(Rotations vec)
{
    this.leftArmRotation = vec;
    this.dataManager.set(LEFT_ARM_ROTATION, vec);
}
项目:ExpandedRailsMod    文件:EntityArmorStand.java   
public void setRightArmRotation(Rotations vec)
{
    this.rightArmRotation = vec;
    this.dataManager.set(RIGHT_ARM_ROTATION, vec);
}