@Override
public ItemOverrideList getOverrides()
{
return new ItemOverrideList(Collections.emptyList())
{
@Override
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
{
ModelHandle mh = ModelHandle.of(BASE_MODEL);
if (state != null)
{
mh = mh.state(state);
}
NBTTagCompound tag = stack.getTagCompound();
if (tag != null)
{
String book = tag.getString("Book");
BookDocument bookDocument = BookRegistry.get(new ResourceLocation(book));
if (bookDocument != null)
{
ResourceLocation cover = bookDocument.getBookCover();
if (cover != null)
mh = mh.replace("#CoverGraphics", cover.toString());
}
}
return mh.get();
}
};
}
BookBakedModel.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:Guidebook
作者:
评论列表
文章目录