@SideOnly(Side.CLIENT)
@Override
public void registerRender() {
ModelResourceLocation[] locations = new ModelResourceLocation[]{
new ModelResourceLocation(this.getRegistryName() + "_empty", "inventory"),
new ModelResourceLocation(this.getRegistryName() + "_chest", "inventory"),
new ModelResourceLocation(this.getRegistryName() + "_storage_core", "inventory")
};
ModelBakery.registerItemVariants(this, locations);
ModelLoader.setCustomMeshDefinition(this, new ItemMeshDefinition() {
@Override
public ModelResourceLocation getModelLocation(ItemStack stack) {
if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("isFull")) {
if(stack.getTagCompound().getBoolean("isChest")) {
return locations[1];
}
if(stack.getTagCompound().getBoolean("isStorageCore")) {
return locations[2];
}
}
return locations[0];
}
});
}
ItemDolly.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:EZStorage2
作者:
评论列表
文章目录