Posted December 28, 201311 yr Hey all, can anyone help with this error I am getting, I don't know how to fix it. ---- Minecraft Crash Report ---- // Who set us up the TNT? Time: 28.12.2013 18:11 Description: Registering texture java.lang.NullPointerException at net.minecraft.item.ItemBlock.getSpriteNumber(ItemBlock.java:42) at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:184) at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:62) at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:57) at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:148) at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:119) at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:103) at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:543) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:265) at net.minecraft.client.Minecraft.startGame(Minecraft.java:509) at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) 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:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.ItemBlock.getSpriteNumber(ItemBlock.java:42) at net.minecraft.client.renderer.texture.TextureMap.registerIcons(TextureMap.java:184) at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:62) at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:57) -- Resource location being registered -- Details: Resource location: minecraft:textures/atlas/items.png Texture object class: net.minecraft.client.renderer.texture.TextureMap Stacktrace: at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:84) at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:148) at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:119) at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:103) at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:543) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:265) at net.minecraft.client.Minecraft.startGame(Minecraft.java:509) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) 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:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) -- System Details -- Details: Minecraft Version: 1.6.4 Operating System: Windows 8 (amd64) version 6.2 Java Version: 1.7.0_45, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 900297944 bytes (858 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available PPlus{2.5} [Peaceful+] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: AMD Radeon HD 5450 GL version 4.2.12422 Compatibility Profile Context 13.152.1.1000, ATI Technologies Inc. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Pack: Default Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
December 28, 201311 yr Author I tried without this code and it doesn't work. So i think the problem is other. @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister icon) { this.itemIcon = icon.registerIcon("pplus:skull"); }
December 28, 201311 yr what you could try is in the constructor of your Item call the method this.setTextureName("...") and in the string put your "pplus:skull".
December 28, 201311 yr Hi ItemBlock line 42 is return Block.blocksList[this.blockID].getItemIconName() != null ? 1 : 0; The NPE means that blocksList[this.blockID] is null That means you haven't set up your blockID / ItemBlock IDs properly. It is trying to find the icon for your ItemBlock by looking at the corresponding block and it doesn't exist. -TGG
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.