public IModel loadModel(ResourceLocation modelLocation) throws Exception
{
if(modelLocation.equals(MODEL_MISSING) && loader.missingModel != null)
{
return loader.getMissingModel();
}
String modelPath = modelLocation.getResourcePath();
if(modelLocation.getResourcePath().startsWith("models/"))
{
modelPath = modelPath.substring("models/".length());
}
ResourceLocation armatureLocation = new ResourceLocation(modelLocation.getResourceDomain(), "armatures/" + modelPath + ".json");
ModelBlockAnimation animation = ModelBlockAnimation.loadVanillaAnimation(loader.resourceManager, armatureLocation);
ModelBlock model = loader.loadModel(modelLocation);
IModel iModel = loader.new VanillaModelWrapper(modelLocation, model, false, animation);
if(loader.missingModel == null && modelLocation.equals(MODEL_MISSING))
{
loader.missingModel = iModel;
}
return iModel;
}
ModelLoader.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:CustomWorldGen
作者:
评论列表
文章目录