Java 类net.minecraftforge.client.model.IModelState 实例源码

项目:SasaLib    文件:SimpleIconModel.java   
@Override
public IFlexibleBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{
    if(!Attributes.moreSpecific(format, Attributes.DEFAULT_BAKED_FORMAT))
    {
        throw new IllegalArgumentException("can't bake vanilla models to the format that doesn't fit into the default one: " + format);
    }

    ItemIconModel test = new ItemIconModel(this, state, bakedTextureGetter);

    return test;
}
项目:SasaLib    文件:ItemIconModel.java   
public ItemIconModel(IModel modelCls, IModelState state, Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter)
{
    super(false, false, null, Attributes.DEFAULT_BAKED_FORMAT, bakedTextureGetter);
    this.textureLocation = null;

    this.state = state;
    this.iModel = modelCls;
}
项目:SasaLib    文件:SimpleIconModel.java   
@Override
public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}
项目:vintagecraft    文件:VCraftModelLoader.java   
public IFlexibleBakedModel bake(IModelState state, VertexFormat format, Function<ResourceLocation, TextureAtlasSprite> textures)
{
    return new VCraftBakedModel(textures.apply(dummyTexture));
}
项目:vintagecraft    文件:VCraftModelLoader.java   
public IModelState getDefaultState()
{
    return ModelRotation.X0_Y0;
}