@Override public String getUnlocalizedName(ItemStack stack) { PortalFrames frame = PortalFrames.get(stack.getItemDamage()); String name = "unknown"; if (frame != null) name = frame.getName(); return super.getUnlocalizedName() + "." + name; }
@Override public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List list) { for (int i = 0; i < PortalFrames.count(); i++) list.add(new ItemStack(par1, 1, i)); }