Java 类net.minecraft.client.renderer.block.model.ItemTransformVec3f 实例源码

项目:Infernum    文件:ModelSpellPage.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    if (baseSpellPageModel instanceof IPerspectiveAwareModel) {
        Matrix4f matrix4f = ((IPerspectiveAwareModel) baseSpellPageModel).handlePerspective(cameraTransformType)
                .getRight();
        return Pair.of(this, matrix4f);
    }
    ItemCameraTransforms itemCameraTransforms = baseSpellPageModel.getItemCameraTransforms();
    ItemTransformVec3f itemTransformVec3f = itemCameraTransforms.getTransform(cameraTransformType);
    TRSRTransformation tr = new TRSRTransformation(itemTransformVec3f);
    Matrix4f mat = null;
    if (tr != null) {
        mat = tr.getMatrix();
    }
    return Pair.of(this, mat);
}
项目:Infernum    文件:ModelKnowledgeBook.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    if (baseKnowledgeBookModel instanceof IPerspectiveAwareModel) {
        Matrix4f matrix4f = ((IPerspectiveAwareModel) baseKnowledgeBookModel).handlePerspective(cameraTransformType)
                .getRight();
        return Pair.of(this, matrix4f);
    }
    ItemCameraTransforms itemCameraTransforms = baseKnowledgeBookModel.getItemCameraTransforms();
    ItemTransformVec3f itemTransformVec3f = itemCameraTransforms.getTransform(cameraTransformType);
    TRSRTransformation tr = new TRSRTransformation(itemTransformVec3f);
    Matrix4f mat = null;
    if (tr != null) {
        mat = tr.getMatrix();
    }
    return Pair.of(this, mat);
}
项目:Infernum    文件:BakedModelKnowledgeBook.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    if (parentModel instanceof IPerspectiveAwareModel) {
        Matrix4f matrix4f = ((IPerspectiveAwareModel) parentModel).handlePerspective(cameraTransformType)
                .getRight();
        return Pair.of(this, matrix4f);
    }
    ItemCameraTransforms itemCameraTransforms = parentModel.getItemCameraTransforms();
    ItemTransformVec3f itemTransformVec3f = itemCameraTransforms.getTransform(cameraTransformType);
    TRSRTransformation tr = new TRSRTransformation(itemTransformVec3f);
    Matrix4f mat = null;
    if (tr != null) {
        mat = tr.getMatrix();
    }
    return Pair.of(this, mat);
}
项目:Infernum    文件:BakedModelSpellPage.java   
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType) {
    if (parentModel instanceof IPerspectiveAwareModel) {
        Matrix4f matrix4f = ((IPerspectiveAwareModel) parentModel).handlePerspective(cameraTransformType)
                .getRight();
        return Pair.of(this, matrix4f);
    }
    ItemCameraTransforms itemCameraTransforms = parentModel.getItemCameraTransforms();
    ItemTransformVec3f itemTransformVec3f = itemCameraTransforms.getTransform(cameraTransformType);
    TRSRTransformation tr = new TRSRTransformation(itemTransformVec3f);
    Matrix4f mat = null;
    if (tr != null) {
        mat = tr.getMatrix();
    }
    return Pair.of(this, mat);
}
项目:NOVA-Core    文件:FWSmartItemModel.java   
@SuppressWarnings("deprecation")
public FWSmartItemModel(Item item) {
    super();
    this.item = item;
    // Change the default transforms to the default Item transforms
    this.itemCameraTransforms = new ItemCameraTransforms(
        new ItemTransformVec3f(new Vector3f(0, -90, 130), new Vector3f(0, 1f / 24f, -2.75f / 16f), new Vector3f(0.9f, 0.9f, 0.9f)), // Third Person
        new ItemTransformVec3f(new Vector3f(0, -135, 25/*-135/*-25*/), new Vector3f(0, 0.25f, 0.125f/*0.5f, 0.25f*/), new Vector3f(1.7f, 1.7f, 1.7f)), // First Person
        ItemTransformVec3f.DEFAULT, // Head
        new ItemTransformVec3f(new Vector3f(-30, 135, 0), new Vector3f(), new Vector3f(1.6F, 1.6F, 1.6F))); // GUI
}
项目:NOVA-Core    文件:FWSmartBlockModel.java   
@SuppressWarnings("deprecation")
public FWSmartBlockModel(Block block, Optional<Item> item) {
    super();
    this.block = block;
    this.item = item;
    // Change the default transforms to the default full Block transforms
    this.itemCameraTransforms = new ItemCameraTransforms(
        new ItemTransformVec3f(new Vector3f(10, -45, 170), new Vector3f(0, 0.09375f, -0.171875f), new Vector3f(0.375f, 0.375f, 0.375f)), // Third Person
        ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT, ItemTransformVec3f.DEFAULT);
}
项目:SasaLib    文件:SimpleIconLoader.java   
public static ItemTransformVec3f parseVec3(ItemTransformVec3f itemTransformVec3f)
{
    Vector3f vector3f = itemTransformVec3f.rotation;
    Vector3f vector3f1 = itemTransformVec3f.translation;
    vector3f1.scale(0.0625F);
    MathHelper.clamp_double((double) vector3f1.x, -1.5D, 1.5D);
    MathHelper.clamp_double((double)vector3f1.y, -1.5D, 1.5D);
    MathHelper.clamp_double((double)vector3f1.z, -1.5D, 1.5D);
    Vector3f vector3f2 = itemTransformVec3f.scale;
    MathHelper.clamp_double((double)vector3f2.x, -1.5D, 1.5D);
    MathHelper.clamp_double((double)vector3f2.y, -1.5D, 1.5D);
    MathHelper.clamp_double((double)vector3f2.z, -1.5D, 1.5D);
    return new ItemTransformVec3f(vector3f, vector3f1, vector3f2);
}
项目:iChunUtil    文件:GuiItemRendererSetter.java   
@Override
public void update()
{
    super.update();
    try
    {
        ItemTransformVec3f vec = new ItemTransformVec3f(new Vector3f((float)Double.parseDouble(rotation.textFields.get(0).getText()), (float)Double.parseDouble(rotation.textFields.get(1).getText()), (float)Double.parseDouble(rotation.textFields.get(2).getText())), new Vector3f((float)Double.parseDouble(position.textFields.get(0).getText()), (float)Double.parseDouble(position.textFields.get(1).getText()), (float)Double.parseDouble(position.textFields.get(2).getText())), new Vector3f((float)Double.parseDouble(scale.textFields.get(0).getText()), (float)Double.parseDouble(scale.textFields.get(1).getText()), (float)Double.parseDouble(scale.textFields.get(2).getText())));
        itemTransformVec3f = vec;
    }
    catch(Exception ignored){}
}
项目:DecompiledMinecraft    文件:RenderItem.java   
private boolean func_183005_a(ItemTransformVec3f p_183005_1_)
{
    return p_183005_1_.scale.x < 0.0F ^ p_183005_1_.scale.y < 0.0F ^ p_183005_1_.scale.z < 0.0F;
}
项目:BaseClient    文件:RenderItem.java   
private boolean func_183005_a(ItemTransformVec3f p_183005_1_)
{
    return p_183005_1_.scale.x < 0.0F ^ p_183005_1_.scale.y < 0.0F ^ p_183005_1_.scale.z < 0.0F;
}
项目:BaseClient    文件:RenderItem.java   
private boolean func_183005_a(ItemTransformVec3f p_183005_1_)
{
    return p_183005_1_.scale.x < 0.0F ^ p_183005_1_.scale.y < 0.0F ^ p_183005_1_.scale.z < 0.0F;
}
项目:Backmemed    文件:RenderItem.java   
/**
 * Return true if only one scale is negative
 */
private boolean isThereOneNegativeScale(ItemTransformVec3f itemTranformVec)
{
    return itemTranformVec.scale.x < 0.0F ^ itemTranformVec.scale.y < 0.0F ^ itemTranformVec.scale.z < 0.0F;
}
项目:CustomWorldGen    文件:RenderItem.java   
/**
 * Return true if only one scale is negative
 */
private boolean isThereOneNegativeScale(ItemTransformVec3f itemTranformVec)
{
    return itemTranformVec.scale.x < 0.0F ^ itemTranformVec.scale.y < 0.0F ^ itemTranformVec.scale.z < 0.0F;
}
项目:SasaLib    文件:ModelBlockWrapper.java   
public ItemTransformVec3f getThirdPersonTransform()
{
    return this.parent != null && this.cameraTransforms.thirdPerson == ItemTransformVec3f.DEFAULT ? this.parent.getThirdPersonTransform() : this.cameraTransforms.thirdPerson;
}
项目:SasaLib    文件:ModelBlockWrapper.java   
public ItemTransformVec3f getFirstPersonTransform()
{
    return this.parent != null && this.cameraTransforms.firstPerson == ItemTransformVec3f.DEFAULT ? this.parent.getFirstPersonTransform() : this.cameraTransforms.firstPerson;
}
项目:SasaLib    文件:ModelBlockWrapper.java   
public ItemTransformVec3f getHeadTransform()
{
    return this.parent != null && this.cameraTransforms.head == ItemTransformVec3f.DEFAULT ? this.parent.getHeadTransform() : this.cameraTransforms.head;
}
项目:SasaLib    文件:ModelBlockWrapper.java   
public ItemTransformVec3f getInGuiTransform()
{
    return this.parent != null && this.cameraTransforms.gui == ItemTransformVec3f.DEFAULT ? this.parent.getInGuiTransform() : this.cameraTransforms.gui;
}
项目:ExpandedRailsMod    文件:RenderItem.java   
/**
 * Return true if only one scale is negative
 */
private boolean isThereOneNegativeScale(ItemTransformVec3f itemTranformVec)
{
    return itemTranformVec.scale.x < 0.0F ^ itemTranformVec.scale.y < 0.0F ^ itemTranformVec.scale.z < 0.0F;
}