Java 类net.minecraft.client.resources.model.ModelRotation 实例源码

项目:DecompiledMinecraft    文件:FaceBakery.java   
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade);
    EnumFacing enumfacing = getFacingFromVertexData(aint);

    if (uvLocked)
    {
        this.func_178409_a(aint, enumfacing, face.blockFaceUV, sprite);
    }

    if (partRotation == null)
    {
        this.func_178408_a(aint, enumfacing);
    }

    return new BakedQuad(aint, face.tintIndex, enumfacing);
}
项目:BaseClient    文件:FaceBakery.java   
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade);
    EnumFacing enumfacing = getFacingFromVertexData(aint);

    if (uvLocked)
    {
        this.func_178409_a(aint, enumfacing, face.blockFaceUV, sprite);
    }

    if (partRotation == null)
    {
        this.func_178408_a(aint, enumfacing);
    }

    return new BakedQuad(aint, face.tintIndex, enumfacing, sprite);
}
项目:BaseClient    文件:FaceBakery.java   
public BakedQuad makeBakedQuad(Vector3f posFrom, Vector3f posTo, BlockPartFace face, TextureAtlasSprite sprite, EnumFacing facing, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = this.makeQuadVertexData(face, sprite, facing, this.getPositionsDiv16(posFrom, posTo), modelRotationIn, partRotation, uvLocked, shade);
    EnumFacing enumfacing = getFacingFromVertexData(aint);

    if (uvLocked)
    {
        this.func_178409_a(aint, enumfacing, face.blockFaceUV, sprite);
    }

    if (partRotation == null)
    {
        this.func_178408_a(aint, enumfacing);
    }

    return new BakedQuad(aint, face.tintIndex, enumfacing, sprite);
}
项目:DecompiledMinecraft    文件:ModelBlockDefinition.java   
public Variant(ResourceLocation modelLocationIn, ModelRotation modelRotationIn, boolean uvLockIn, int weightIn)
{
    this.modelLocation = modelLocationIn;
    this.modelRotation = modelRotationIn;
    this.uvLock = uvLockIn;
    this.weight = weightIn;
}
项目:DecompiledMinecraft    文件:ModelBlockDefinition.java   
public ModelBlockDefinition.Variant deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    String s = this.parseModel(jsonobject);
    ModelRotation modelrotation = this.parseRotation(jsonobject);
    boolean flag = this.parseUvLock(jsonobject);
    int i = this.parseWeight(jsonobject);
    return new ModelBlockDefinition.Variant(this.makeModelLocation(s), modelrotation, flag, i);
}
项目:DecompiledMinecraft    文件:ModelBlockDefinition.java   
protected ModelRotation parseRotation(JsonObject p_178428_1_)
{
    int i = JsonUtils.getInt(p_178428_1_, "x", 0);
    int j = JsonUtils.getInt(p_178428_1_, "y", 0);
    ModelRotation modelrotation = ModelRotation.getModelRotation(i, j);

    if (modelrotation == null)
    {
        throw new JsonParseException("Invalid BlockModelRotation x: " + i + ", y: " + j);
    }
    else
    {
        return modelrotation;
    }
}
项目:DecompiledMinecraft    文件:FaceBakery.java   
private int[] makeQuadVertexData(BlockPartFace partFace, TextureAtlasSprite sprite, EnumFacing facing, float[] p_178405_4_, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = new int[28];

    for (int i = 0; i < 4; ++i)
    {
        this.fillVertexData(aint, i, facing, partFace, p_178405_4_, sprite, modelRotationIn, partRotation, uvLocked, shade);
    }

    return aint;
}
项目:DecompiledMinecraft    文件:FaceBakery.java   
private void fillVertexData(int[] faceData, int vertexIndex, EnumFacing facing, BlockPartFace partFace, float[] p_178402_5_, TextureAtlasSprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    EnumFacing enumfacing = modelRotationIn.rotateFace(facing);
    int i = shade ? this.getFaceShadeColor(enumfacing) : -1;
    EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).func_179025_a(vertexIndex);
    Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.field_179184_a], p_178402_5_[enumfacedirection$vertexinformation.field_179182_b], p_178402_5_[enumfacedirection$vertexinformation.field_179183_c]);
    this.func_178407_a(vector3f, partRotation);
    int j = this.rotateVertex(vector3f, facing, vertexIndex, modelRotationIn, uvLocked);
    this.storeVertexData(faceData, j, vertexIndex, vector3f, i, sprite, partFace.blockFaceUV);
}
项目:DecompiledMinecraft    文件:FaceBakery.java   
public int rotateVertex(Vector3f position, EnumFacing facing, int vertexIndex, ModelRotation modelRotationIn, boolean uvLocked)
{
    if (modelRotationIn == ModelRotation.X0_Y0)
    {
        return vertexIndex;
    }
    else
    {
        this.rotateScale(position, new Vector3f(0.5F, 0.5F, 0.5F), modelRotationIn.getMatrix4d(), new Vector3f(1.0F, 1.0F, 1.0F));
        return modelRotationIn.rotateVertex(facing, vertexIndex);
    }
}
项目:BaseClient    文件:BlockModelUtils.java   
private static BakedQuad makeBakedQuad(EnumFacing p_makeBakedQuad_0_, TextureAtlasSprite p_makeBakedQuad_1_, int p_makeBakedQuad_2_)
{
    Vector3f vector3f = new Vector3f(0.0F, 0.0F, 0.0F);
    Vector3f vector3f1 = new Vector3f(16.0F, 16.0F, 16.0F);
    BlockFaceUV blockfaceuv = new BlockFaceUV(new float[] {0.0F, 0.0F, 16.0F, 16.0F}, 0);
    BlockPartFace blockpartface = new BlockPartFace(p_makeBakedQuad_0_, p_makeBakedQuad_2_, "#" + p_makeBakedQuad_0_.getName(), blockfaceuv);
    ModelRotation modelrotation = ModelRotation.X0_Y0;
    BlockPartRotation blockpartrotation = null;
    boolean flag = false;
    boolean flag1 = true;
    FaceBakery facebakery = new FaceBakery();
    BakedQuad bakedquad = facebakery.makeBakedQuad(vector3f, vector3f1, blockpartface, p_makeBakedQuad_1_, p_makeBakedQuad_0_, modelrotation, blockpartrotation, flag, flag1);
    return bakedquad;
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public Variant(ResourceLocation modelLocationIn, ModelRotation modelRotationIn, boolean uvLockIn, int weightIn)
{
    this.modelLocation = modelLocationIn;
    this.modelRotation = modelRotationIn;
    this.uvLock = uvLockIn;
    this.weight = weightIn;
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public ModelBlockDefinition.Variant deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    String s = this.parseModel(jsonobject);
    ModelRotation modelrotation = this.parseRotation(jsonobject);
    boolean flag = this.parseUvLock(jsonobject);
    int i = this.parseWeight(jsonobject);
    return new ModelBlockDefinition.Variant(this.makeModelLocation(s), modelrotation, flag, i);
}
项目:BaseClient    文件:ModelBlockDefinition.java   
protected ModelRotation parseRotation(JsonObject p_178428_1_)
{
    int i = JsonUtils.getInt(p_178428_1_, "x", 0);
    int j = JsonUtils.getInt(p_178428_1_, "y", 0);
    ModelRotation modelrotation = ModelRotation.getModelRotation(i, j);

    if (modelrotation == null)
    {
        throw new JsonParseException("Invalid BlockModelRotation x: " + i + ", y: " + j);
    }
    else
    {
        return modelrotation;
    }
}
项目:BaseClient    文件:FaceBakery.java   
private int[] makeQuadVertexData(BlockPartFace partFace, TextureAtlasSprite sprite, EnumFacing facing, float[] p_178405_4_, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = new int[28];

    for (int i = 0; i < 4; ++i)
    {
        this.fillVertexData(aint, i, facing, partFace, p_178405_4_, sprite, modelRotationIn, partRotation, uvLocked, shade);
    }

    return aint;
}
项目:BaseClient    文件:FaceBakery.java   
private void fillVertexData(int[] faceData, int vertexIndex, EnumFacing facing, BlockPartFace partFace, float[] p_178402_5_, TextureAtlasSprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    EnumFacing enumfacing = modelRotationIn.rotateFace(facing);
    int i = shade ? this.getFaceShadeColor(enumfacing) : -1;
    EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).func_179025_a(vertexIndex);
    Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.field_179184_a], p_178402_5_[enumfacedirection$vertexinformation.field_179182_b], p_178402_5_[enumfacedirection$vertexinformation.field_179183_c]);
    this.func_178407_a(vector3f, partRotation);
    int j = this.rotateVertex(vector3f, facing, vertexIndex, modelRotationIn, uvLocked);
    this.storeVertexData(faceData, j, vertexIndex, vector3f, i, sprite, partFace.blockFaceUV);
}
项目:BaseClient    文件:FaceBakery.java   
public int rotateVertex(Vector3f position, EnumFacing facing, int vertexIndex, ModelRotation modelRotationIn, boolean uvLocked)
{
    if (modelRotationIn == ModelRotation.X0_Y0)
    {
        return vertexIndex;
    }
    else
    {
        this.rotateScale(position, new Vector3f(0.5F, 0.5F, 0.5F), modelRotationIn.getMatrix4d(), new Vector3f(1.0F, 1.0F, 1.0F));
        return modelRotationIn.rotateVertex(facing, vertexIndex);
    }
}
项目:BaseClient    文件:BlockModelUtils.java   
private static BakedQuad makeBakedQuad(EnumFacing p_makeBakedQuad_0_, TextureAtlasSprite p_makeBakedQuad_1_, int p_makeBakedQuad_2_)
{
    Vector3f vector3f = new Vector3f(0.0F, 0.0F, 0.0F);
    Vector3f vector3f1 = new Vector3f(16.0F, 16.0F, 16.0F);
    BlockFaceUV blockfaceuv = new BlockFaceUV(new float[] {0.0F, 0.0F, 16.0F, 16.0F}, 0);
    BlockPartFace blockpartface = new BlockPartFace(p_makeBakedQuad_0_, p_makeBakedQuad_2_, "#" + p_makeBakedQuad_0_.getName(), blockfaceuv);
    ModelRotation modelrotation = ModelRotation.X0_Y0;
    BlockPartRotation blockpartrotation = null;
    boolean flag = false;
    boolean flag1 = true;
    FaceBakery facebakery = new FaceBakery();
    BakedQuad bakedquad = facebakery.makeBakedQuad(vector3f, vector3f1, blockpartface, p_makeBakedQuad_1_, p_makeBakedQuad_0_, modelrotation, blockpartrotation, flag, flag1);
    return bakedquad;
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public Variant(ResourceLocation modelLocationIn, ModelRotation modelRotationIn, boolean uvLockIn, int weightIn)
{
    this.modelLocation = modelLocationIn;
    this.modelRotation = modelRotationIn;
    this.uvLock = uvLockIn;
    this.weight = weightIn;
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public ModelBlockDefinition.Variant deserialize(JsonElement p_deserialize_1_, Type p_deserialize_2_, JsonDeserializationContext p_deserialize_3_) throws JsonParseException
{
    JsonObject jsonobject = p_deserialize_1_.getAsJsonObject();
    String s = this.parseModel(jsonobject);
    ModelRotation modelrotation = this.parseRotation(jsonobject);
    boolean flag = this.parseUvLock(jsonobject);
    int i = this.parseWeight(jsonobject);
    return new ModelBlockDefinition.Variant(this.makeModelLocation(s), modelrotation, flag, i);
}
项目:BaseClient    文件:ModelBlockDefinition.java   
protected ModelRotation parseRotation(JsonObject p_178428_1_)
{
    int i = JsonUtils.getInt(p_178428_1_, "x", 0);
    int j = JsonUtils.getInt(p_178428_1_, "y", 0);
    ModelRotation modelrotation = ModelRotation.getModelRotation(i, j);

    if (modelrotation == null)
    {
        throw new JsonParseException("Invalid BlockModelRotation x: " + i + ", y: " + j);
    }
    else
    {
        return modelrotation;
    }
}
项目:BaseClient    文件:FaceBakery.java   
private int[] makeQuadVertexData(BlockPartFace partFace, TextureAtlasSprite sprite, EnumFacing facing, float[] p_178405_4_, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    int[] aint = new int[28];

    for (int i = 0; i < 4; ++i)
    {
        this.fillVertexData(aint, i, facing, partFace, p_178405_4_, sprite, modelRotationIn, partRotation, uvLocked, shade);
    }

    return aint;
}
项目:BaseClient    文件:FaceBakery.java   
private void fillVertexData(int[] faceData, int vertexIndex, EnumFacing facing, BlockPartFace partFace, float[] p_178402_5_, TextureAtlasSprite sprite, ModelRotation modelRotationIn, BlockPartRotation partRotation, boolean uvLocked, boolean shade)
{
    EnumFacing enumfacing = modelRotationIn.rotateFace(facing);
    int i = shade ? this.getFaceShadeColor(enumfacing) : -1;
    EnumFaceDirection.VertexInformation enumfacedirection$vertexinformation = EnumFaceDirection.getFacing(facing).func_179025_a(vertexIndex);
    Vector3f vector3f = new Vector3f(p_178402_5_[enumfacedirection$vertexinformation.field_179184_a], p_178402_5_[enumfacedirection$vertexinformation.field_179182_b], p_178402_5_[enumfacedirection$vertexinformation.field_179183_c]);
    this.func_178407_a(vector3f, partRotation);
    int j = this.rotateVertex(vector3f, facing, vertexIndex, modelRotationIn, uvLocked);
    this.storeVertexData(faceData, j, vertexIndex, vector3f, i, sprite, partFace.blockFaceUV);
}
项目:BaseClient    文件:FaceBakery.java   
public int rotateVertex(Vector3f position, EnumFacing facing, int vertexIndex, ModelRotation modelRotationIn, boolean uvLocked)
{
    if (modelRotationIn == ModelRotation.X0_Y0)
    {
        return vertexIndex;
    }
    else
    {
        this.rotateScale(position, new Vector3f(0.5F, 0.5F, 0.5F), modelRotationIn.getMatrix4d(), new Vector3f(1.0F, 1.0F, 1.0F));
        return modelRotationIn.rotateVertex(facing, vertexIndex);
    }
}
项目:DecompiledMinecraft    文件:ModelBlockDefinition.java   
public ModelRotation getRotation()
{
    return this.modelRotation;
}
项目:BaseClient    文件:CustomItemProperties.java   
private static BakedQuad makeBakedQuad(BlockPart p_makeBakedQuad_0_, BlockPartFace p_makeBakedQuad_1_, TextureAtlasSprite p_makeBakedQuad_2_, EnumFacing p_makeBakedQuad_3_, ModelRotation p_makeBakedQuad_4_, boolean p_makeBakedQuad_5_)
{
    FaceBakery facebakery = new FaceBakery();
    return facebakery.makeBakedQuad(p_makeBakedQuad_0_.positionFrom, p_makeBakedQuad_0_.positionTo, p_makeBakedQuad_1_, p_makeBakedQuad_2_, p_makeBakedQuad_3_, p_makeBakedQuad_4_, p_makeBakedQuad_0_.partRotation, p_makeBakedQuad_5_, p_makeBakedQuad_0_.shade);
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public ModelRotation getRotation()
{
    return this.modelRotation;
}
项目:BaseClient    文件:ModelBlockDefinition.java   
public ModelRotation getRotation()
{
    return this.modelRotation;
}
项目:SasaLib    文件:SimpleIconModel.java   
@Override
public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}
项目:vintagecraft    文件:VCraftModelLoader.java   
public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}