当前位置: 首页>>代码示例>>Java>>正文


Java Rotations类代码示例

本文整理汇总了Java中net.minecraft.util.math.Rotations的典型用法代码示例。如果您正苦于以下问题:Java Rotations类的具体用法?Java Rotations怎么用?Java Rotations使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Rotations类属于net.minecraft.util.math包,在下文中一共展示了Rotations类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writePoseToNBT

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:EntityArmorStand.java

示例2: onUpdate

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
/**
 * 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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:58,代码来源:EntityArmorStand.java

示例3: setHeadRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setHeadRotation(Rotations vec)
{
    this.headRotation = vec;
    this.dataManager.set(HEAD_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例4: setBodyRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setBodyRotation(Rotations vec)
{
    this.bodyRotation = vec;
    this.dataManager.set(BODY_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例5: setLeftArmRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setLeftArmRotation(Rotations vec)
{
    this.leftArmRotation = vec;
    this.dataManager.set(LEFT_ARM_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例6: setRightArmRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setRightArmRotation(Rotations vec)
{
    this.rightArmRotation = vec;
    this.dataManager.set(RIGHT_ARM_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例7: setLeftLegRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setLeftLegRotation(Rotations vec)
{
    this.leftLegRotation = vec;
    this.dataManager.set(LEFT_LEG_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例8: setRightLegRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void setRightLegRotation(Rotations vec)
{
    this.rightLegRotation = vec;
    this.dataManager.set(RIGHT_LEG_ROTATION, vec);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:EntityArmorStand.java

示例9: getHeadRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getHeadRotation()
{
    return this.headRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例10: getBodyRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getBodyRotation()
{
    return this.bodyRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例11: getLeftArmRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getLeftArmRotation()
{
    return this.leftArmRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例12: getRightArmRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getRightArmRotation()
{
    return this.rightArmRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例13: getLeftLegRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getLeftLegRotation()
{
    return this.leftLegRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例14: getRightLegRotation

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public Rotations getRightLegRotation()
{
    return this.rightLegRotation;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:EntityArmorStand.java

示例15: write

import net.minecraft.util.math.Rotations; //导入依赖的package包/类
public void write(PacketBuffer buf, Rotations value)
{
    buf.writeFloat(value.getX());
    buf.writeFloat(value.getY());
    buf.writeFloat(value.getZ());
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:DataSerializers.java


注:本文中的net.minecraft.util.math.Rotations类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。