default public void initModel(ModelRegistryEvent e)
{
System.out.println(((IForgeRegistryEntry<?>) this).getRegistryName());
if (this instanceof Item)
ModelLoader.setCustomModelResourceLocation((Item) this, 0,
new ModelResourceLocation(((IForgeRegistryEntry<?>) this).getRegistryName(), "inventory"));
else if (this instanceof Block)
{
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock((Block) this), 0,
new ModelResourceLocation(((IForgeRegistryEntry<?>) this).getRegistryName(), "inventory"));
System.out.println("block");
}
else
throw new IllegalArgumentException("No/invalid object for model");
}
IHasModel.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:modName
作者:
评论列表
文章目录