本文整理汇总了Java中net.minecraft.client.renderer.block.model.ModelManager.getMissingModel方法的典型用法代码示例。如果您正苦于以下问题:Java ModelManager.getMissingModel方法的具体用法?Java ModelManager.getMissingModel怎么用?Java ModelManager.getMissingModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.block.model.ModelManager
的用法示例。
在下文中一共展示了ModelManager.getMissingModel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeModel
import net.minecraft.client.renderer.block.model.ModelManager; //导入方法依赖的package包/类
public static IBakedModel makeModel(String p_makeModel_0_, TextureAtlasSprite p_makeModel_1_, TextureAtlasSprite p_makeModel_2_)
{
if (p_makeModel_1_ != null && p_makeModel_2_ != null)
{
ModelManager modelmanager = Config.getModelManager();
if (modelmanager == null)
{
return null;
}
else
{
ModelResourceLocation modelresourcelocation = new ModelResourceLocation(p_makeModel_0_, "normal");
IBakedModel ibakedmodel = modelmanager.getModel(modelresourcelocation);
if (ibakedmodel != null && ibakedmodel != modelmanager.getMissingModel())
{
IBakedModel ibakedmodel1 = ModelUtils.duplicateModel(ibakedmodel);
EnumFacing[] aenumfacing = EnumFacing.VALUES;
for (int i = 0; i < aenumfacing.length; ++i)
{
EnumFacing enumfacing = aenumfacing[i];
List<BakedQuad> list = ibakedmodel1.getQuads((IBlockState)null, enumfacing, 0L);
replaceTexture(list, p_makeModel_1_, p_makeModel_2_);
}
List<BakedQuad> list1 = ibakedmodel1.getQuads((IBlockState)null, (EnumFacing)null, 0L);
replaceTexture(list1, p_makeModel_1_, p_makeModel_2_);
return ibakedmodel1;
}
else
{
return null;
}
}
}
else
{
return null;
}
}
示例2: getModelCull
import net.minecraft.client.renderer.block.model.ModelManager; //导入方法依赖的package包/类
static IBakedModel getModelCull(String p_getModelCull_0_, List p_getModelCull_1_)
{
ModelManager modelmanager = Config.getModelManager();
if (modelmanager == null)
{
return null;
}
else
{
ResourceLocation resourcelocation = new ResourceLocation("blockstates/" + p_getModelCull_0_ + "_leaves.json");
if (Config.getDefiningResourcePack(resourcelocation) != Config.getDefaultResourcePack())
{
return null;
}
else
{
ResourceLocation resourcelocation1 = new ResourceLocation("models/block/" + p_getModelCull_0_ + "_leaves.json");
if (Config.getDefiningResourcePack(resourcelocation1) != Config.getDefaultResourcePack())
{
return null;
}
else
{
ModelResourceLocation modelresourcelocation = new ModelResourceLocation(p_getModelCull_0_ + "_leaves", "normal");
IBakedModel ibakedmodel = modelmanager.getModel(modelresourcelocation);
if (ibakedmodel != null && ibakedmodel != modelmanager.getMissingModel())
{
List list = ibakedmodel.getQuads((IBlockState)null, (EnumFacing)null, 0L);
if (list.size() == 0)
{
return ibakedmodel;
}
else if (list.size() != 6)
{
return null;
}
else
{
for (Object bakedquad : list)
{
List list1 = ibakedmodel.getQuads((IBlockState)null, ((BakedQuad) bakedquad).getFace(), 0L);
if (list1.size() > 0)
{
return null;
}
list1.add(bakedquad);
}
list.clear();
p_getModelCull_1_.add(p_getModelCull_0_ + "_leaves");
return ibakedmodel;
}
}
else
{
return null;
}
}
}
}
}