Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I figured this was a problem with forge due to the crash log not saying anything about my mod

 

i have tested this with both 497 and 499 forge builds

 

the eclipse output code

 

 

2013-01-19 19:33:54 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Rendering screen

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1013)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:882)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:771)

2013-01-19 19:33:54 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:722)

2013-01-19 19:33:54 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.item.ItemStack.<init>(ItemStack.java:64)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.creativetab.CreativeTabs.getIconItemStack(CreativeTabs.java:209)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainerCreative.renderCreativeTab(GuiContainerCreative.java:833)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:660)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:88)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:591)

2013-01-19 19:33:54 [iNFO] [sTDERR] at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1004)

2013-01-19 19:33:54 [iNFO] [sTDERR] ... 3 more

 

 

 

here's my code for my creative tabs

part in core file

 

 

  public static CreativeTabs McExtTabBlock = new mcextcorecreativetabs.McExtCoreBlockTab(CreativeTabs.getNextID(), "MC EXT Blocks");

   

    public static CreativeTabs McExtTabArmour = new mcextcorecreativetabs.McExtCoreArmourTab(CreativeTabs.getNextID(),"MC EXT Armour");

 

    public static CreativeTabs McExtTabItem = new mcextcorecreativetabs.McExtCoreItemTab(CreativeTabs.getNextID(),"MC EXT Items");

 

 

 

individual files

 

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.creativetab.CreativeTabs;

import mcextcoreitems.ItemChestPlate;

 

public class McExtCoreArmourTab extends CreativeTabs {

    public McExtCoreArmourTab(int par1, String par2Str)

    {

        super(par1, par2Str);

    }

    @SideOnly(Side.CLIENT)

    public int getTabIconItemIndex()

    {

    return mcextcore.Core.ItemChestPlateID;

    }

   

    public String getTranslatedTabLabel()

    {

    return "MC Extended Armour";

    }

}

 

 

 

 

 

package mcextcorecreativetabs;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.creativetab.CreativeTabs;

 

public final class McExtCoreBlockTab extends CreativeTabs 

{

    public McExtCoreBlockTab(int par1, String par2Str)

    {

        super(par1, par2Str);

    }

    @SideOnly(Side.CLIENT)

    public int getTabIconItemIndex()

    {

    return mcextcore.Core.OresID;

    }

   

    public String getTranslatedTabLabel()

    {

    return "MC Extended Blocks";

    }

 

 

}

 

 

 

 

 

package mcextcorecreativetabs;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.creativetab.CreativeTabs;

 

public final class McExtCoreItemTab extends CreativeTabs 

{

    public McExtCoreItemTab(int par1, String par2Str)

    {

        super(par1, par2Str);

    }

    @SideOnly(Side.CLIENT)

    public int getTabIconItemIndex()

    {

    return mcextcore.Core.HotCoalID;

    }

   

    public String getTranslatedTabLabel()

    {

    return "MC Extended Items";

    }

 

 

}

 

 

 

note: eclipse is not detecting errors and the game doesnt crash until i attempt to go to tab 2 of the creative inventory

First,you don't need to do the nextID() thing because the CreativeTabs do it automatically.

Just construct it with only the label parameter.

 

 

 

Secondly,the erros is can be because the item isn't exists,that's why it says null at CreativeTabs.java:209,

getIconItemStack() creates an itemstack from your item.

 

What does this mean?

Within your getTabIconItemIndex you are using an variable that stores the id of the things.

Because they are items you need to make it shifted.

 

So

@SideOnly(Side.CLIENT)
    public int getTabIconItemIndex()
    {
       return mcextcore.Core.ItemChestPlateID + 256; 
    }

 

I hope i helped you.

  • Author

Thanks for tthe help, all i needed to do was the + 256 thing, also i had to keep the get next id in because it had to be (int, string) and not just (string)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.