Jump to content

RenderIcon nullpointerExepton


Casual Dutchman

Recommended Posts

Hi guys,

 

I was coding some stuff, not very differetn from other times moddig, but I ran into something rather strange.

I create four items, three are working fine, but the last one won't work.

 

I am getting a nullpointerexpeton for the renderIcon methode.

(this is the methode that renders the icon with tessellators)

 

I have no clue of what to do, can anyone help me please?

 

what my console says:

2013-12-25 12:15:14 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Rendering screen
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1045)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.Minecraft.run(Minecraft.java:838)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2013-12-25 12:15:14 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:590)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:397)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:467)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainer.drawSlotInventory(GuiContainer.java:421)
2013-12-25 12:15:14 [iNFO] [Minecraft-Server] Stopping server
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:132)
2013-12-25 12:15:14 [iNFO] [Minecraft-Server] Saving players
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:683)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036)
2013-12-25 12:15:14 [iNFO] [sTDERR] 	... 9 more
2013-12-25 12:15:14 [iNFO] [Minecraft-Server] Player705 left the game
2013-12-25 12:15:14 [iNFO] [sTDOUT] ---- Minecraft Crash Report ----
2013-12-25 12:15:14 [iNFO] [sTDOUT] // I let you down. Sorry 
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] Time: 25-12-13 12:15
2013-12-25 12:15:14 [iNFO] [sTDOUT] Description: Rendering screen
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] java.lang.NullPointerException
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:590)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:397)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:467)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainer.drawSlotInventory(GuiContainer.java:421)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:132)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:683)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:946)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:838)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] A detailed walkthrough of the error, its code path and all known details is as follows:
2013-12-25 12:15:14 [iNFO] [sTDOUT] ---------------------------------------------------------------------------------------
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] -- Head --
2013-12-25 12:15:14 [iNFO] [sTDOUT] Stacktrace:
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:590)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:397)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:467)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainer.drawSlotInventory(GuiContainer.java:421)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:132)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:43)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:683)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] -- Screen render details --
2013-12-25 12:15:14 [iNFO] [sTDOUT] Details:
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Mouse location: Scaled: (296, 154). Absolute: (592, 170)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] -- Affected level --
2013-12-25 12:15:14 [iNFO] [sTDOUT] Details:
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level name: MpServer
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	All players: 1 total; [EntityClientPlayerMP['Player705'/97, l='MpServer', x=-1543,87, y=5,62, z=1732,74]]
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Chunk stats: MultiplayerChunkCache: 441
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level seed: 0
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level generator: ID 01 - flat, ver 0. Features enabled: false
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level generator options: 
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level spawn location: World: (-1537,4,1739), Chunk: (at 15,0,11 in -97,108; contains blocks -1552,0,1728 to -1537,255,1743), Region: (-4,3; contains chunks -128,96 to -97,127, blocks -2048,0,1536 to -1537,255,2047)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level time: 56436 game time, 43184 day time
2013-12-25 12:15:14 [iNFO] [Minecraft-Server] Saving worlds
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level dimension: 0
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level storage version: 0x00000 - Unknown?
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
2013-12-25 12:15:14 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Overworld
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Forced entities: 40 total; [EntitySkeleton['Skeleton'/69, l='MpServer', x=-1468,84, y=4,00, z=1669,69], EntityZombie['Zombie'/67, l='MpServer', x=-1479,84, y=4,00, z=1657,78], EntityHorse['Donkey'/7, l='MpServer', x=-1611,41, y=4,00, z=1673,28], EntitySpider['Spider'/78, l='MpServer', x=-1468,78, y=4,00, z=1785,19], EntitySkeleton['Skeleton'/11, l='MpServer', x=-1613,50, y=4,00, z=1657,50], EntitySkeleton['Skeleton'/12, l='MpServer', x=-1600,06, y=4,00, z=1723,50], EntityCow['Cow'/13, l='MpServer', x=-1614,25, y=4,00, z=1730,75], EntityCow['Cow'/14, l='MpServer', x=-1604,16, y=4,00, z=1728,16], EntityCow['Cow'/15, l='MpServer', x=-1612,28, y=4,00, z=1745,69], EntityHorse['Donkey'/17, l='MpServer', x=-1599,97, y=4,00, z=1663,56], EntitySpider['Spider'/16, l='MpServer', x=-1609,19, y=4,00, z=1793,56], EntityCreeper['Creeper'/19, l='MpServer', x=-1595,84, y=4,00, z=1759,16], EntityZombie['Zombie'/18, l='MpServer', x=-1585,88, y=4,00, z=1719,56], EntitySkeleton['Skeleton'/21, l='MpServer', x=-1584,25, y=4,00, z=1809,69], EntityClientPlayerMP['Player705'/97, l='MpServer', x=-1543,87, y=5,62, z=1732,74], EntitySkeleton['Skeleton'/25, l='MpServer', x=-1572,66, y=4,00, z=1704,16], EntitySkeleton['Skeleton'/24, l='MpServer', x=-1564,69, y=4,00, z=1707,25], EntityZombie['Zombie'/27, l='MpServer', x=-1575,34, y=4,00, z=1713,13], EntitySkeleton['Skeleton'/26, l='MpServer', x=-1588,13, y=4,00, z=1696,66], EntitySpider['Spider'/29, l='MpServer', x=-1575,72, y=4,00, z=1809,94], EntitySkeleton['Skeleton'/31, l='MpServer', x=-1561,78, y=4,00, z=1691,59], EntityCreeper['Creeper'/34, l='MpServer', x=-1563,91, y=4,00, z=1702,78], EntityZombie['Zombie'/35, l='MpServer', x=-1563,59, y=4,00, z=1789,13], EntityZombie['Zombie'/32, l='MpServer', x=-1562,06, y=4,00, z=1699,34], EntityCreeper['Creeper'/33, l='MpServer', x=-1566,41, y=4,00, z=1701,06], EntityCreeper['Creeper'/36, l='MpServer', x=-1556,94, y=4,00, z=1797,25], EntitySpider['Spider'/37, l='MpServer', x=-1568,25, y=4,00, z=1803,16], EntitySpider['Spider'/42, l='MpServer', x=-1540,88, y=4,00, z=1693,41], EntityCreeper['Creeper'/43, l='MpServer', x=-1545,91, y=4,00, z=1701,22], EntitySpider['Spider'/44, l='MpServer', x=-1554,06, y=4,00, z=1744,56], EntityZombie['Zombie'/45, l='MpServer', x=-1536,94, y=4,00, z=1811,69], EntityEnderman['Enderman'/51, l='MpServer', x=-1507,72, y=4,00, z=1710,22], EntityCreeper['Creeper'/50, l='MpServer', x=-1499,75, y=4,00, z=1696,91], EntitySpider['Spider'/49, l='MpServer', x=-1503,66, y=4,00, z=1687,25], EntityCow['Cow'/48, l='MpServer', x=-1527,50, y=4,00, z=1730,16], EntityCreeper['Creeper'/54, l='MpServer', x=-1509,13, y=4,00, z=1669,16], EntitySpider['Spider'/52, l='MpServer', x=-1511,38, y=4,00, z=1750,00], EntityZombie['Zombie'/59, l='MpServer', x=-1494,06, y=4,00, z=1721,59], EntityEnderman['Enderman'/58, l='MpServer', x=-1494,34, y=4,00, z=1706,84], EntityZombie['Zombie'/57, l='MpServer', x=-1501,34, y=4,00, z=1703,13]]
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Retry entities: 0 total; []
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Server brand: fml,forge
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Server type: Integrated singleplayer server
2013-12-25 12:15:14 [iNFO] [sTDOUT] Stacktrace:
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2312)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.Minecraft.run(Minecraft.java:856)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.client.main.Main.main(Main.java:93)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at java.lang.reflect.Method.invoke(Unknown Source)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 
2013-12-25 12:15:14 [iNFO] [sTDOUT] -- System Details --
2013-12-25 12:15:14 [iNFO] [sTDOUT] Details:
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Minecraft Version: 1.6.4
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Operating System: Windows 7 (amd64) version 6.1
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Java Version: 1.7.0_25, Oracle Corporation
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Memory: 813489328 bytes (775 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	AABB Pool Size: 5162 (289072 bytes; 0 MB) allocated, 7 (392 bytes; 0 MB) used
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Suspicious classes: FML and Forge are installed
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	FML: MCP v8.11 FML v6.4.45.953 Minecraft Forge 9.11.1.953 4 mods loaded, 4 mods active
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	FML{6.4.45.953} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Forge{9.11.1.953} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	armorplus{1.0} [Armor+ mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Launched Version: 1.6
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	LWJGL: 2.9.0
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	OpenGL: Mobile Intel(R) 4 Series Express Chipset Family GL version 2.1.0 - Build 8.15.10.2555, Intel
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Is Modded: Definitely; Client brand changed to 'fml,forge'
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Type: Client (map_client.txt)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Resource Pack: Default
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Current Language: English (US)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Profiler Position: N/A (disabled)
2013-12-25 12:15:14 [iNFO] [sTDOUT] 	Vec3 Pool Size: 779 (43624 bytes; 0 MB) allocated, 30 (1680 bytes; 0 MB) used
2013-12-25 12:15:14 [iNFO] [sTDOUT] #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\pieter\Desktop\minecraft\forge\mcp\jars\.\crash-reports\crash-2013-12-25_12.15.14-client.txt
2013-12-25 12:15:15 [iNFO] [Minecraft-Server] Stopping server
2013-12-25 12:15:15 [iNFO] [Minecraft-Server] Saving players
2013-12-25 12:15:15 [iNFO] [Minecraft-Server] Saving worlds
2013-12-25 12:15:15 [iNFO] [Minecraft-Server] Saving chunks for level 'New World'/Overworld
AL lib: (EE) alc_cleanup: 1 device not closed

 

this is te code for the item that causes the problem

remember, I made three item with the same code, this one does not work!

package armorplus.Main.Armor;

import armorplus.Main.Core;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;

public class WitchHat extends ItemArmor{

public WitchHat(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
	super(par1, par2EnumArmorMaterial, par3, par4);

	this.setCreativeTab(CreativeTabs.tabMisc);
}

@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {

	this.itemIcon = par1IconRegister.registerIcon(Core.getModid() + ":witchhat");

}

@Override
public String getArmorTexture(ItemStack itemstack, Entity entity, int slot, String type) {
	String legs = "";
	String body = "";

	if(itemstack.getItem().itemID == Core.witchhat.itemID){	
		body = Core.getModid() + ":textures/armor/witchhat.png";
	}
	switch(slot){
		case 2: return legs;
		default: return body;
	}
}

ModelBiped armorModel = new ModelBiped();

@Override
@SideOnly(Side.CLIENT)
public ModelBiped getArmorModel(EntityLivingBase entityLiving,
		ItemStack itemStack, int armorSlot) {

	if(itemStack != null){
		if(itemStack.getItem() instanceof WitchHat){
			int type = ((ItemArmor)itemStack.getItem()).armorType;

			if(type == 1 || type == 3){
				armorModel = new WitchHatModel(1.0f);
			}else{
				armorModel = new WitchHatModel(0.5f);
			}
		}
		if(armorModel != null){
			armorModel.bipedHead.showModel = armorSlot == 0;
			armorModel.bipedHeadwear.showModel = armorSlot == 0;
			armorModel.bipedBody.showModel = armorSlot == 1 || armorSlot == 2;
			armorModel.bipedRightArm.showModel = armorSlot == 1;
			armorModel.bipedLeftArm.showModel = armorSlot == 1;
			armorModel.bipedRightLeg.showModel = armorSlot == 2 || armorSlot == 3;
			armorModel.bipedLeftLeg.showModel = armorSlot == 2 || armorSlot == 3;

			armorModel.isSneak = entityLiving.isSneaking();
			armorModel.isRiding = entityLiving.isRiding();
			armorModel.isChild = entityLiving.isChild();
			armorModel.heldItemRight = entityLiving.getCurrentItemOrArmor(0) != null ? 1 :0;
			if(entityLiving instanceof EntityPlayer){
				armorModel.aimedBow =((EntityPlayer)entityLiving).getItemInUseDuration() > 2;
			}
			return armorModel;
		}
	}

	return null;
}
}

 

Coding, Testing, Smiling, Publishing!

Link to comment
Share on other sites

Hi

 

Looks like something is wrong with the icon.

 

        tessellator.addVertexWithUV((double)(par1 + 0), (double)(par2 + par5), (double)this.zLevel, (double)par3Icon.getMinU(), (double)par3Icon.getMaxV());

 

I can't see what from your code.  Are you sure this is the Item causing the problem?

 

You could try adding a test breakpoint to the vanilla code;

 

RenderItem::
    public void renderIcon(int par1, int par2, Icon par3Icon, int par4, int par5)
    {
        if (par3Icon == null) {
          System.out.println("null par3Icon");    // put breakpoint here
          return;
        }
        Tessellator tessellator = Tessellator.instance;
//.. etc..
    }

 

then go up the call stack a couple of calls to see which item it is, and why the icon is null.

 

-TGG

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

    • As the title say, game suddenly crushed during the loading. I got this error message The game crashed whilst rendering overlay Error: java.lang.RuntimeException: null   And Here's the link of crash log bit.ly/3IcVUQG
    • Do these mods have incompatibles: Dynamic View[Forge] (by someaddon) Server Performance - Smooth Chunk Save[Forge/Fabric] (by someaddon) EdivadLib (by 3divad99) Krypton Reforged (by Anthxny) AttributeFix (by DarkhaxDev) Create Stuff & Additions (by Furti_Two) Cristel Lib (by Cristelknight) Resourceful Config (by ThatGravyBoat) Applied Cooking (by ItsSebastrn) Thermal Cultivation (by TeamCoFH) SuperMartijn642's Config Lib (by SuperMartijn642) Create: Bells & Whistles (by sudolev) Thermal Integration (by TeamCoFH) SebastrnLib (by ItsSebastrn) Farmer's Delight (by vectorwing) Right Click, Get Crops (by TeamCoFH) Observable (by tasgon) FPS optimizer (by The_TCT) Dungeons and Taverns (by Nova_Wostra) Explorify – Dungeons & Structures (by bebebea_loste) Fast Leaf Decay (by olafskiii) Create: Vintage Improvements (by Negodya1) Sophisticated Backpacks (by P3pp3rF1y) SuperMartijn642's Core Lib (by SuperMartijn642) Create Crafts & Additions (by MRHminer) Structory (by botanydev) Oculus (by Asek3) Tectonic (by Apollo) Embeddium (Rubidium) Extra (by dimadencep) Athena (by CodexAdrian) Jade 🔍 (by Snownee) Mekanism Tools (by bradyaidanc) Carry On (by Tschipp) Create: Sweets & Treats (by AstralButOnCurseForge) Extreme Reactors Create Compat (by ZeroNoRyouki) AI Improvements (by QueenOfMissiles) AE2 QoL Recipes (by Christofmeg) Create: ComputerCraft (CC: Tweaked) (by EndRage) Create Enchantment Industry (by DragonsPlus) Macaw's Fences and Walls (by sketch_macaw) Better Villages - Forge (by jtl_elisa) Puzzles Lib [Forge & Fabric] (by Fuzs) Mekanism (by bradyaidanc) Create Recycle Everything (by nocubeyt) Searchables (by Jaredlll08) Immersive Paintings [Fabric/Forge] (by Conczin) Create Deco (by talrey) Thermal Foundation (by TeamCoFH) Controlling (by Jaredlll08) Kotlin for Forge (by thedarkcolour) Lithostitched (by Apollo) Let Me Despawn (by frikinjay) MCEF (Minecraft Chromium Embedded Framework) (by ds58) FPS Boost (by The_TCT) Ad Astra (by AlexNijjar) TerraBlender (Forge) (by TheAdubbz) Falling Leaves (Forge) (by Cheaterpaul) CC:C Bridge (by Sammy_echt) Xaero's Minimap (by xaero96) CoFH Core (by TeamCoFH) Create: Applied Kinetics (by Forsteri123) AE Additions - ExtraCells2 Fork (by MasterYodAT9G) Just Enough Items (JEI) (by mezz) Biomes O' Plenty (by Forstride) Curios API (Forge/NeoForge) (by TheIllusiveC4) AE2 Network Analyser (by GlodBlock) Resourceful Lib (by ThatGravyBoat) ChoiceTheorem's Overhauled Village (by ChoiceTheorem) Clockwork: Create x Valkyrien Skies (by triode_) Architectury API (Fabric/Forge/NeoForge) (by shedaniel) Canary (by AbdElAziz333) Structure Essentials[Forge/Fabric] (by someaddon) Library Ferret - Forge (by jtl_elisa) Create Confectionery (by Furti_Two) Leaky - Farm leak detection[Forge/Fabric] (by someaddon) Game Menu Mod Option [Forge] (by morimori0317) Macaw's Bridges (by sketch_macaw) FramedBlocks (by XFactHD) Cherished Worlds (Fabric/Forge/NeoForge/Quilt) (by TheIllusiveC4) Entangled (by SuperMartijn642) Refined Storage: Requestify (by Buuz135) ME Requester (by Relentless) Inventory Sorter (by cpw) Xaero's World Map (by xaero96) William Wythers' Expanded Ecosphere (by Cristelknight) Cloth Config API (Fabric/Forge/NeoForge) (by shedaniel) FTB Library (Forge) (by FTB) Cupboard (by someaddon) Thermal Dynamics (by TeamCoFH) Patchouli (by Vazkii) Entity Culling Fabric/Forge (by tr7zw) Chipped (by terrariumearth) FTB XMod Compat (by FTB) FerriteCore ((Neo)Forge) (by malte0811) Extra Disks (by MelanX) Nature's Compass (by Chaosyr) Thermal Locomotion (by TeamCoFH) TexTrue's Embeddium Options (by TexTrue) Traveler's Backpack (by Tiviacz1337) Geophilic – Vanilla Biome Overhauls (by bebebea_loste) Create: Power Loader (by Lysine) Polymorph (Fabric/Forge/Quilt) (by TheIllusiveC4) Enlightend (by lixir) Create Central Kitchen (by DragonsPlus) Energy Meter (by Relentless) Botarium (by CodexAdrian) FTB Teams (Forge) (by FTB) Storage Drawers (by Texelsaur) Create: Extended Cogwheels (by Rabbitminers) Embeddium/Rubidium Dynamic Lights (by Anthxny) Biome Makeover (Forge) (by Lemonszz) Create Guardian Beam Defense (by ibarnstormer_) Create: The Factory Must Grow (by Dr_Mango_Tea) Create Chunkloading (by embeddedt) Balm (Forge Edition) (by BlayTheNinth) Glodium (by GlodBlock) Thermal Expansion (by TeamCoFH) Chunk-Pregenerator (by Speiger) Advanced Peripherals (by srrendi) Create: Garnished (by DakotaPrideModding) Tidal Towns (by joshieman) Easy Magic [Forge & Fabric] (by Fuzs) Extreme Reactors (by ZeroNoRyouki) Applied Energistics 2 Wireless Terminals (by Mari_023) Redstone Arsenal (by TeamCoFH) ExtraStorage (by 3divad99) Thermal Innovation (by TeamCoFH) Collective (by Serilum) Wizard's Reborn (by MaxBogomol) GraveStone Mod (by henkelmax) Mekanism Additions (by bradyaidanc) Create: New Age (by nilBlade) Refined Storage (by raoulvdberge) Embeddium/Rubidium Extras (by Anthxny) ZeroCore 2 (by ZeroNoRyouki) Mekanism Generators (by bradyaidanc) WebDisplays (by ds58) Clumps (by Jaredlll08) Vein Mining (Fabric/Forge/Quilt) (by TheIllusiveC4) Villager Names (by Serilum) Create Slice & Dice (by possible_triangle) Embeddium (by embeddedt) Create: Steam 'n' Rails (by mattentosh) Get It Together, Drops! (by bl4ckscor3) Sophisticated Core (by P3pp3rF1y) Supplementaries (by MehVahdJukaar) Jade Addons (Forge) (by Snownee) Create: Design n' Decor (by MilkyFur) Construction Wand (by ThetaDev) Create: Diesel Generators (by george8188262) Create : Misc & Things (by to0pa_fr) Valkyrien Skies (Forge/Fabric) (by triode_) Refined Storage Addons (by raoulvdberge) FTB Chunks (Forge) (by FTB) FTB Ranks (Forge) (by FTB) Moonlight Lib (by MehVahdJukaar) CC: Tweaked (by SquidDev) Waystones (by BlayTheNinth) Applied Energistics 2 (by thetechnici4n) Trowels fork (by Luciano_cz) Cooking for Blockheads (by BlayTheNinth) Create (by simibubi) Towns and Towers (by Biban_Auriu)
    • Hi, you guys are probably all tired of having to deal with the same topic everytimes. I want to play mods, but forge doesn't want me to. And after days of videos and forum, i have no choices to ask before giving up.. The classic Error code 1 ( here's my debug.log : https://paste.ee/p/0WMSP). I tryed everything. The Forge version fit the mod version. I have java jdk 17 and the path to java is set. My mods folder is empty. My Minecraft luncher path has been changed. Java, Minecraft and Forged has been reinstalled 3 times. I tryed with the curseforge luncher. The only thing i didn't do, and I think it might be the problem, is updating my graphic card drivers. For the only reason that my computer is an Ace Magician ( Tiny pc) that don't have a graphic card. But then I went with Fabric. And it works just fine.  Anyway I can't find anything so thank you for your help. Sorry for my english if there's any mistake. Razziel.  
    • I am trying to make my own modpack and at the moment it crashes before I can get to the main menu. I have been trying to google and figure it out myself but would really appreciate some help. I've been using CurseForge to install mod and think I've gotten all the dependencies but I'm not 100% sure. I hope I got the paste.ee thing right Thanks in advance! https://paste.ee/p/NXdSO
  • Topics

×
×
  • Create New...

Important Information

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