Posted March 7, 201510 yr public static CreativeTabs BloodyTabBlock = new CreativeTabs("BloodyTabBlock"){ public ItemStack getIconItemStack(){ return new ItemStack(bloodyStone, 1, 0); } @Override public Item getTabIconItem() { return null; } When I start the game everything is normal but when I try to get to the second page in the Creative inventory, the game crashes. Crash report java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:265) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419) at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:968) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:795) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) at net.minecraft.client.Minecraft.run(Minecraft.java:951) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:85) at GradleStart.main(GradleStart.java:45) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.ItemStack.getItemDamage(ItemStack.java:265) at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:419) -- Item being rendered -- Details: Item Type: null Item Aux: ~~ERROR~~ NullPointerException: null Item NBT: null Item Foil: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:968) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawGuiContainerBackgroundLayer(GuiContainerCreative.java:795) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:93) at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (501, 142). Absolute: (1002, 703) Screen size: Scaled: (840, 494). Absolute: (1680, 988). Scale factor of 2
March 7, 201510 yr Why are you overriding this: public ItemStack getIconItemStack(){ return new ItemStack(bloodyStone, 1, 0); } There is really no point unless you want to use metadata as your icon-definition. @Override public Item getTabIconItem() { return InitItems.bloodyStone; } Will make your bloodystone as tab icon. Also - is bloodyStone locally saved? (you have direct reference to it). Have look at super class (CreativeTabs). 1.7.10 is no longer supported by forge, you are on your own.
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.