Jump to content

1.7.10 CreativeTabs crash


Dark_Pred

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • This is a known issue caused by Mojang abruptly removing one of their domain names. Download a fresh copy of the installer and it should be fixed. More details in the announcements channel of the new Forge Discord server: https://discord.com/channels/1129059589325852724/1129077934330744882/1212091927038533662 https://discord.com/channels/1129059589325852724/1129077934330744882/1212138871907684382 Invite link: https://discord.minecraftforge.net
    • This is a known issue caused by Mojang abruptly removing one of their domain names. Download a fresh copy of the installer and it should be fixed. More details in the announcements channel of the new Forge Discord server: https://discord.com/channels/1129059589325852724/1129077934330744882/1212091927038533662 https://discord.com/channels/1129059589325852724/1129077934330744882/1212138871907684382 Invite link: https://discord.minecraftforge.net
    • This is a known issue caused by Mojang abruptly removing one of their domain names. Download a fresh copy of the installer and it should be fixed. More details in the announcements channel of the new Forge Discord server: https://discord.com/channels/1129059589325852724/1129077934330744882/1212091927038533662 https://discord.com/channels/1129059589325852724/1129077934330744882/1212138871907684382 Invite link: https://discord.minecraftforge.net 
    • This is a known issue caused by Mojang abruptly removing one of their domain names. Download a fresh copy of the installer and it should be fixed. More details in the announcements channel of the new Forge Discord server: https://discord.com/channels/1129059589325852724/1129077934330744882/1212091927038533662 https://discord.com/channels/1129059589325852724/1129077934330744882/1212138871907684382 Invite link: https://discord.minecraftforge.net 
    • Download a fresh copy of the installer and it should be fixed. https://discord.com/channels/1129059589325852724/1129077934330744882/1212138871907684382
  • Topics

×
×
  • Create New...

Important Information

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