@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegistry)
{
// Grab the subtypes array for this item (some will contain one and others many).
SubItemsArchive[] subItemsArray = this.getRegisteredItem().getSubItems();
if (subItemsArray != null)
{
// Loop through all sub-items and grab rendering pass data.
for (SubItemsArchive subItem : subItemsArray)
{
// Grab all of the render passes that this sub-item will need.
RenderPassArchive[] itemRenderPasses = subItem.getRenderPassArchive();
// Associate via mapping render passes to a given registered icon.
for (RenderPassArchive renderPassObject : itemRenderPasses)
{
// // Register a single icon for those items which have but one.
// if (this.getRegisteredItem().getRenderPassCount() == 1 && renderPassObject.getRenderPass() == 0)
// {
// // Use the zero index (first) item in the icon archive that should be primary icon even if no sub-types.
// this.itemIcon = iconRegistry.registerIcon(MadMod.ID + ":" + renderPassObject.getIconPath());
// this.iconString = itemIcon.getIconName();
// }
// Items with multiple render passes have their icons registered in a mapping local to the item instance.
clientRegisteredIcons.put( subItem.getItemName() + "_" +
renderPassObject.getRenderPass(),
iconRegistry.registerIcon( ModMetadata.ID +
":" +
renderPassObject.getIconPath() ) );
}
}
}
}
ItemBasePrefab.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:MC-MineAPI.Java
作者:
评论列表
文章目录