Jump to content

Item Causing Crash When Rendering


novemcinctus

Recommended Posts

In my mod, I have created a new item for throwable spawn eggs:

ItemThrowableEgg.java

 

public class ItemThrowableEgg extends Item {
    public int colorBase;
    public int colorSpots;
    protected EntityThrowableEgg entityEgg;
    protected int entityId;
    private IIcon theIcon;

    public ItemThrowableEgg(int entityId, int parPrimaryColor, int parSecondaryColor) {
        this.setTextureName("spawn_egg");
        this.entityId = entityId;
        this.maxStackSize = 64;
        this.setCreativeTab(CreativeTabs.tabMisc);
        colorBase = parPrimaryColor;
        colorSpots = parSecondaryColor;
    }
    public ItemThrowableEgg(int entityId) {
        this.setTextureName("spawn_egg");
        this.entityId = entityId;
        this.maxStackSize = 64;
        this.setCreativeTab(CreativeTabs.tabMisc);
        colorBase = ((EntityList.EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(entityId))).primaryColor;
        colorSpots = ((EntityList.EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(entityId))).secondaryColor;
    }
    @Override
    public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World,
                                      EntityPlayer par3EntityPlayer)
    {
        if (!par3EntityPlayer.capabilities.isCreativeMode)
        {
            --par1ItemStack.stackSize;
        }

        par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

        if (!par2World.isRemote)
        {
            entityEgg = new EntityThrowableEgg(par2World, par3EntityPlayer);
            entityEgg.setEntityToSpawn(entityId);
            par2World.spawnEntityInWorld(entityEgg);
        }

        return par1ItemStack;
    }

    @Override
    @SideOnly(Side.CLIENT)
    public int getColorFromItemStack(ItemStack par1ItemStack, int parColorType)
    {
        return (parColorType == 0) ? colorBase : colorSpots;
    }

    @Override
    @SideOnly(Side.CLIENT)
    public boolean requiresMultipleRenderPasses()
    {
        return true;
    }

    @Override
    public String getItemStackDisplayName(ItemStack par1ItemStack) {
        return "Throwable Spawn "+ EntityList.getStringFromID(this.entityId);
    }


    @Override
    @SideOnly(Side.CLIENT)
    public void registerIcons(IIconRegister par1IconRegister) {
        super.registerIcons(par1IconRegister);
        this.theIcon = par1IconRegister.registerIcon(this.getIconString() + "_overlay");
    }

    @Override
    @SideOnly(Side.CLIENT)
    public IIcon getIconFromDamageForRenderPass(int par1, int par2) {
        return par2 > 0 ? this.theIcon : super.getIconFromDamageForRenderPass(par1, par2);
    }

}

 

And I register it and all of its forms in preInit like so:

snippet from main class preInit:

 

Iterator it = EntityList.entityEggs.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry pair = (Map.Entry) it.next();
            int currentMobId = ((Integer)pair.getKey()).intValue();
            int foregroundColor = ((EntityList.EntityEggInfo)pair.getValue()).secondaryColor;
            int backgroundColor = ((EntityList.EntityEggInfo)pair.getValue()).primaryColor;
            ItemThrowableEgg currentItem = new ItemThrowableEgg(currentMobId, backgroundColor, foregroundColor);
            GameRegistry.registerItem(currentItem, "thowableSpawnEggSpawn"+EntityList.getStringFromID(currentMobId), MODID);
        }

 

All of that works fine. It appears with the correct texture in the correct inventory slot and behaves exactly as expected on right click.

However, I ran into problems trying to create an EntityItem out of it. I have another class that is an event handler for LivingDropsEvent. In this class, spawn eggs are added to the drops of various mobs. The function I use to create an itemstack is this:

 

private ItemStack thowableEggFor(int mobId) {
        ItemThrowableEgg throwableEgg = new ItemThrowableEgg(mobId);
        return new ItemStack(throwableEgg);
}

 

it is then appended to the drops with:

e.drops.add(new EntityItem(e.entity.worldObj, e.entity.posX, e.entity.posY, e.entity.posZ, throwableEggFor([appropriate id]);

 

This is where everything gets messed up. When I kill a mob, I see it drops an item with the black and purple checkered texture used for items without one. When I pick it up, the game crashes:

 

[12:56:20] [server thread/INFO]: Player55 joined the game
120: 5651507 12422002
[12:56:34] [server thread/INFO]: Player55 has just earned the achievement [Taking Inventory]
[12:56:34] [Client thread/INFO]: [CHAT] Player55 has just earned the achievement [Taking Inventory]
[12:56:36] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Rendering item
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1168) ~[EntityRenderer.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1056) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_65]
at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_65]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) [idea_rt.jar:?]
Caused by: java.lang.NullPointerException
at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:760) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:515) ~[RenderItem.class:?]
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585) ~[RenderItem.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289) ~[GuiContainer.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114) ~[GuiContainer.class:?]
at net.minecraft.client.renderer.InventoryEffectRenderer.drawScreen(InventoryEffectRenderer.java:44) ~[inventoryEffectRenderer.class:?]
at net.minecraft.client.gui.inventory.GuiContainerCreative.drawScreen(GuiContainerCreative.java:673) ~[GuiContainerCreative.class:?]
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1137) ~[EntityRenderer.class:?]
... 16 more
[12:56:36] [Client thread/INFO] [sTDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Shall we play a game?

Time: 11/16/14 12:56 PM
Description: Rendering item

java.lang.NullPointerException: Rendering item
at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:760)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:515)
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)
at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114)
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(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:78)
at GradleStart.main(GradleStart.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.client.renderer.entity.RenderItem.renderIcon(RenderItem.java:760)
at net.minecraft.client.renderer.entity.RenderItem.renderItemIntoGUI(RenderItem.java:515)

-- Item being rendered --
Details:
Item Type: io.github.tesla.item.ItemThrowableEgg@714e0383
Item Aux: 0
Item NBT: null
Item Foil: false
Stacktrace:
at net.minecraft.client.renderer.entity.RenderItem.renderItemAndEffectIntoGUI(RenderItem.java:585)
at net.minecraft.client.gui.inventory.GuiContainer.func_146977_a(GuiContainer.java:289)
at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:114)
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: (302, 195). Absolute: (604, 89)
Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player55'/175, l='MpServer', x=1742.70, y=13.38, z=-864.23]]
Chunk stats: MultiplayerChunkCache: 623, 623
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (1781,4,-275), Chunk: (at 5,0,13 in 111,-18; contains blocks 1776,0,-288 to 1791,255,-273), Region: (3,-1; contains chunks 96,-32 to 127,-1, blocks 1536,0,-512 to 2047,255,-1)
Level time: 51010 game time, 12536 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 113 total; [EntitySlime['Slime'/274, l='MpServer', x=1813.91, y=4.00, z=-870.16], EntitySlime['Slime'/279, l='MpServer', x=1815.07, y=4.00, z=-797.64], EntitySlime['Slime'/278, l='MpServer', x=1811.98, y=4.00, z=-801.46], EntitySlime['Slime'/282, l='MpServer', x=1797.43, y=5.01, z=-905.49], EntitySlime['Slime'/280, l='MpServer', x=1805.86, y=3.57, z=-790.85], EntitySlime['Slime'/258, l='MpServer', x=1754.92, y=4.00, z=-808.65], EntitySlime['Slime'/259, l='MpServer', x=1767.28, y=4.60, z=-802.87], EntitySlime['Slime'/257, l='MpServer', x=1712.71, y=4.00, z=-928.26], EntitySlime['Slime'/262, l='MpServer', x=1804.19, y=4.00, z=-811.25], EntitySlime['Slime'/260, l='MpServer', x=1748.69, y=4.00, z=-807.81], EntitySlime['Slime'/261, l='MpServer', x=1754.30, y=4.00, z=-930.01], EntityClientPlayerMP['Player55'/175, l='MpServer', x=1742.70, y=13.38, z=-864.23], EntitySlime['Slime'/267, l='MpServer', x=1730.72, y=3.00, z=-920.31], EntityItem['item.item.seeds'/4634, l='MpServer', x=1729.31, y=5.13, z=-851.91], EntitySlime['Slime'/268, l='MpServer', x=1796.19, y=4.00, z=-823.66], EntityItem['item.item.wheat'/10740, l='MpServer', x=1731.00, y=5.13, z=-851.38], EntityItem['item.item.seeds'/10741, l='MpServer', x=1732.59, y=4.13, z=-849.88], EntityItem['item.tile.dirt.default'/152, l='MpServer', x=1759.25, y=2.13, z=-866.88], EntityItem['item.tile.ladder'/153, l='MpServer', x=1753.88, y=5.13, z=-876.88], EntityItem['item.tile.dirt.default'/154, l='MpServer', x=1756.78, y=3.13, z=-869.59], EntityItem['item.tile.dirt.default'/155, l='MpServer', x=1757.22, y=3.13, z=-871.22], EntitySlime['Slime'/392, l='MpServer', x=1816.13, y=4.00, z=-922.34], EntityItem['item.tile.stonebrick'/156, l='MpServer', x=1757.09, y=3.13, z=-875.22], EntityItem['item.tile.dirt.default'/157, l='MpServer', x=1759.69, y=3.13, z=-870.13], EntityItem['item.tile.dirt.default'/158, l='MpServer', x=1756.13, y=2.13, z=-872.88], EntityItem['item.tile.stonebrick'/159, l='MpServer', x=1757.88, y=2.13, z=-873.59], EntityItem['item.item.book'/144, l='MpServer', x=1742.38, y=5.13, z=-863.28], EntityItem['item.tile.dirt.default'/146, l='MpServer', x=1742.88, y=1.13, z=-852.81], EntityItem['item.tile.dirt.default'/147, l='MpServer', x=1738.13, y=2.13, z=-851.91], EntityItem['item.tile.dirt.default'/148, l='MpServer', x=1740.19, y=1.13, z=-852.13], EntityItem['item.tile.dirt.default'/149, l='MpServer', x=1732.16, y=2.13, z=-858.31], EntitySlime['Slime'/150, l='MpServer', x=1732.47, y=3.00, z=-845.00], EntityVillager['Villager'/151, l='MpServer', x=1733.56, y=5.00, z=-852.34], EntityItem['item.tile.dirt.default'/171, l='MpServer', x=1752.22, y=1.13, z=-853.03], EntityVillager['Villager'/170, l='MpServer', x=1752.50, y=1.00, z=-856.22], EntityItem['item.tile.stonebrick'/169, l='MpServer', x=1747.06, y=4.13, z=-862.69], EntitySlime['Slime'/168, l='MpServer', x=1758.56, y=4.00, z=-874.69], EntityItem['item.item.book'/174, l='MpServer', x=1743.56, y=5.13, z=-865.72], EntitySlime['Slime'/173, l='MpServer', x=1747.60, y=3.00, z=-863.40], EntityItem['item.tile.dirt.default'/172, l='MpServer', x=1754.47, y=3.13, z=-855.75], EntitySkeleton['Skeleton'/163, l='MpServer', x=1750.69, y=4.00, z=-879.31], EntityItem['item.tile.stonebrick'/162, l='MpServer', x=1745.84, y=4.13, z=-864.78], EntityItem['item.tile.wood.oak'/161, l='MpServer', x=1746.22, y=5.13, z=-865.88], EntityItem['item.tile.gravel'/160, l='MpServer', x=1748.88, y=3.13, z=-865.81], EntitySkeleton['Skeleton'/167, l='MpServer', x=1746.50, y=4.00, z=-879.50], EntityItem['item.item.rottenFlesh'/166, l='MpServer', x=1748.88, y=3.13, z=-865.81], EntityItem['item.tile.gravel'/165, l='MpServer', x=1747.63, y=3.13, z=-866.88], EntitySkeleton['Skeleton'/164, l='MpServer', x=1746.50, y=9.00, z=-879.50], EntityItem['item.tile.dirt.default'/186, l='MpServer', x=1761.78, y=3.13, z=-854.88], EntityItem['item.tile.dirt.default'/187, l='MpServer', x=1761.75, y=3.13, z=-851.59], EntityItem['item.tile.stairsWood'/184, l='MpServer', x=1762.44, y=3.13, z=-852.59], EntityItem['item.tile.dirt.default'/185, l='MpServer', x=1763.13, y=2.13, z=-853.13], EntityItem['item.tile.stonebrick'/190, l='MpServer', x=1764.41, y=4.13, z=-848.59], EntityItem['item.tile.stairsWood'/191, l='MpServer', x=1765.09, y=4.13, z=-849.63], EntityItem['item.tile.dirt.default'/188, l='MpServer', x=1761.56, y=3.13, z=-852.41], EntityItem['item.tile.wood.oak'/189, l='MpServer', x=1764.66, y=4.13, z=-849.75], EntitySlime['Slime'/178, l='MpServer', x=1717.97, y=4.00, z=-874.98], EntitySlime['Slime'/179, l='MpServer', x=1694.44, y=4.60, z=-867.57], EntitySlime['Slime'/176, l='MpServer', x=1741.41, y=6.00, z=-834.78], EntitySlime['Slime'/177, l='MpServer', x=1730.43, y=4.95, z=-829.76], EntityItem['item.tile.dirt.default'/182, l='MpServer', x=1760.56, y=3.13, z=-852.13], EntityItem['item.tile.stonebrick'/183, l='MpServer', x=1764.22, y=3.13, z=-851.31], EntitySlime['Slime'/180, l='MpServer', x=1750.75, y=4.00, z=-880.63], EntityItem['item.tile.stonebrick'/181, l='MpServer', x=1763.28, y=3.13, z=-851.81], EntitySlime['Slime'/201, l='MpServer', x=1760.81, y=1.00, z=-878.21], EntityItem['item.tile.dirt.default'/200, l='MpServer', x=1761.66, y=3.13, z=-873.41], EntityItem['item.tile.dirt.default'/197, l='MpServer', x=1762.59, y=2.13, z=-876.19], EntityItem['item.tile.dirt.default'/196, l='MpServer', x=1763.97, y=3.13, z=-877.09], EntityItem['item.tile.dirt.default'/199, l='MpServer', x=1760.50, y=2.13, z=-878.63], EntityItem['item.tile.dirt.default'/198, l='MpServer', x=1761.88, y=1.13, z=-877.31], EntityItem['item.tile.dirt.default'/193, l='MpServer', x=1760.13, y=2.13, z=-877.63], EntitySlime['Slime'/192, l='MpServer', x=1723.69, y=4.69, z=-846.26], EntityItem['item.tile.dirt.default'/195, l='MpServer', x=1764.88, y=3.13, z=-877.25], EntityItem['item.tile.dirt.default'/194, l='MpServer', x=1762.25, y=3.13, z=-879.88], EntityItem['item.tile.dirt.default'/220, l='MpServer', x=1758.69, y=1.13, z=-820.53], EntityItem['item.tile.dirt.default'/221, l='MpServer', x=1756.88, y=1.13, z=-826.88], EntityItem['item.tile.dirt.default'/222, l='MpServer', x=1755.25, y=1.13, z=-822.66], EntityItem['item.item.emerald'/223, l='MpServer', x=1748.69, y=2.13, z=-821.06], EntityItem['item.tile.dirt.default'/216, l='MpServer', x=1754.13, y=1.13, z=-825.88], EntityItem['item.tile.dirt.default'/217, l='MpServer', x=1755.25, y=1.13, z=-824.03], EntityItem['item.tile.dirt.default'/218, l='MpServer', x=1754.06, y=2.13, z=-822.72], EntityItem['item.tile.dirt.default'/219, l='MpServer', x=1755.84, y=2.13, z=-826.72], EntityItem['item.tile.wood.oak'/212, l='MpServer', x=1766.31, y=4.13, z=-846.13], EntityItem['item.tile.dirt.default'/213, l='MpServer', x=1751.13, y=3.13, z=-818.47], EntityItem['item.tile.dirt.default'/214, l='MpServer', x=1752.38, y=2.13, z=-818.06], EntityItem['item.tile.dirt.default'/215, l='MpServer', x=1756.88, y=3.13, z=-827.13], EntityItem['item.item.doorWood'/211, l='MpServer', x=1765.13, y=5.13, z=-845.06], EntitySlime['Slime'/239, l='MpServer', x=1701.46, y=4.75, z=-858.26], EntitySlime['Slime'/238, l='MpServer', x=1768.69, y=3.00, z=-825.69], EntitySlime['Slime'/231, l='MpServer', x=1709.48, y=4.60, z=-838.68], EntitySlime['Slime'/230, l='MpServer', x=1684.02, y=4.82, z=-829.63], EntitySlime['Slime'/229, l='MpServer', x=1719.51, y=4.00, z=-835.37], EntitySlime['Slime'/228, l='MpServer', x=1748.78, y=4.00, z=-831.78], EntityItem['item.tile.stonebrick'/227, l='MpServer', x=1755.88, y=2.13, z=-819.94], EntityItem['item.tile.stonebrick'/226, l='MpServer', x=1755.59, y=1.13, z=-823.44], EntityItem['item.tile.stonebrick'/225, l='MpServer', x=1757.47, y=1.13, z=-820.44], EntityItem['item.tile.stoneSlab.stone'/224, l='MpServer', x=1757.00, y=1.13, z=-822.44], EntitySlime['Slime'/254, l='MpServer', x=1743.35, y=4.00, z=-788.84], EntitySlime['Slime'/255, l='MpServer', x=1731.22, y=4.00, z=-802.63], EntitySlime['Slime'/252, l='MpServer', x=1727.98, y=4.00, z=-803.54], EntitySlime['Slime'/253, l='MpServer', x=1743.34, y=4.00, z=-797.63], EntitySlime['Slime'/250, l='MpServer', x=1666.07, y=4.00, z=-875.82], EntitySlime['Slime'/251, l='MpServer', x=1753.72, y=4.00, z=-785.50], EntitySlime['Slime'/248, l='MpServer', x=1698.59, y=4.00, z=-904.09], EntitySlime['Slime'/249, l='MpServer', x=1672.01, y=4.00, z=-869.78], EntitySlime['Slime'/246, l='MpServer', x=1721.31, y=3.00, z=-823.04], EntitySlime['Slime'/247, l='MpServer', x=1698.26, y=4.12, z=-823.30], EntitySlime['Slime'/244, l='MpServer', x=1753.24, y=2.06, z=-819.36], EntitySlime['Slime'/245, l='MpServer', x=1734.50, y=5.00, z=-807.47], EntityItem['item.tile.dirt.default'/242, l='MpServer', x=1758.75, y=3.13, z=-813.13], EntityItem['item.item.slimeball'/243, l='MpServer', x=1758.31, y=4.13, z=-810.78], EntitySlime['Slime'/240, l='MpServer', x=1745.63, y=4.00, z=-807.31], EntitySlime['Slime'/241, l='MpServer', x=1793.15, y=4.00, z=-862.89]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2555)
at net.minecraft.client.Minecraft.run(Minecraft.java:973)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:78)
at GradleStart.main(GradleStart.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Mac OS X (x86_64) version 10.10
Java Version: 1.6.0_65, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 904381104 bytes (862 MB) / 1065025536 bytes (1015 MB) up to 1065025536 bytes (1015 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1235 Minecraft Forge 10.13.2.1235 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1235} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1235.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1235} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1235.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
betterdrops{1.3.1} [betterdrops] (main) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.7.10
LWJGL: 2.9.1
OpenGL: Intel HD Graphics 4000 OpenGL Engine GL version 2.1 INTEL-10.0.86, Intel Inc.
GL Caps: Using GL 1.3 multitexturing.
Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported.
Anisotropic filtering is supported and maximum anisotropy is 16.
Shaders are available because OpenGL 2.1 is supported.

Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
[12:56:36] [server thread/INFO]: Stopping server[/spoiler][code]
I tried creating an EntityItem somewhere else in the code and had the same issue. It is worth noting that if the bottom 9 slots of my inventory are full and I cannot see items I pick up, the game will only crash when I open my inventory. 

Link to comment
Share on other sites

Do not create that many Items! You should use damage value or ItemStack NBT data.

 

Sorry, I'm somewhat new to Forge. What's the best way to set and retrieve the damage value? Should I put it in the constructor?

 

I see that the setDamage function takes an ItemStack as a parameter. Are damage values associated with individual items?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • My journey with Wizard Web Recovery began with skepticism, as I had already been burned once. However, desperate times called for desperate measures. I reached out to them, and from the onset, their professionalism was evident. They took  time to understand my situation, reassured me of their expertise, and provided a detailed plan on how they intended to recover my lost Bitcoin. Wizard Web Recovery stands out for several reasons. Firstly, their team comprises highly skilled professionals who specialize in blockchain technology and cyber forensics. This expertise is crucial when dealing with the complexities of cryptocurrency theft. They explained every step of the process to me, ensuring I was well-informed and comfortable with their approach. Communication with Wizard Web Recovery was seamless. They maintained regular updates, keeping me in the loop about the progress they were making. This transparency was something I had not experienced with other firms I had contacted. It built my confidence in their ability to deliver on their promises. Another significant aspect of Wizard Web Recovery is its ethical approach. They operate with integrity, ensuring that every action they take is within legal boundaries. In a field rife with scams and false promises, their commitment to ethical practices is a breath of fresh air. They provided me with all necessary documentation and evidence of their progress, which further reassured me of their legitimacy. The actual recovery process was nothing short of impressive. Wizard Web Recovery used advanced techniques to trace the stolen Bitcoin through the blockchain. They were able to identify the wallets it had been transferred to and worked tirelessly to negotiate the return of my funds. The level of detail and precision they demonstrated was extraordinary. By the end of the process, Wizard Web Recovery had successfully recovered my lost Bitcoin. The relief and gratitude I felt were overwhelming. It was not just about the money but about restoring my faith in the possibility of justice and recovery in the cryptocurrency world. Wizard Web Recovery turned my nightmare into a success story. Their expertise, transparency, ethical approach, and relentless effort make them the best in the business. If you are in a similar situation, do not hesitate to reach out to them. They are proof that amidst the darkness of scams, there are still trustworthy experts dedicated to helping you recover your digital assets.  
    • My journey with Wizard Web Recovery began with skepticism, as I had already been burned once. However, desperate times called for desperate measures. I reached out to them, and from the onset, their professionalism was evident. They took  time to understand my situation, reassured me of their expertise, and provided a detailed plan on how they intended to recover my lost Bitcoin. Wizard Web Recovery stands out for several reasons. Firstly, their team comprises highly skilled professionals who specialize in blockchain technology and cyber forensics. This expertise is crucial when dealing with the complexities of cryptocurrency theft. They explained every step of the process to me, ensuring I was well-informed and comfortable with their approach. Communication with Wizard Web Recovery was seamless. They maintained regular updates, keeping me in the loop about the progress they were making. This transparency was something I had not experienced with other firms I had contacted. It built my confidence in their ability to deliver on their promises. Another significant aspect of Wizard Web Recovery is its ethical approach. They operate with integrity, ensuring that every action they take is within legal boundaries. In a field rife with scams and false promises, their commitment to ethical practices is a breath of fresh air. They provided me with all necessary documentation and evidence of their progress, which further reassured me of their legitimacy. The actual recovery process was nothing short of impressive. Wizard Web Recovery used advanced techniques to trace the stolen Bitcoin through the blockchain. They were able to identify the wallets it had been transferred to and worked tirelessly to negotiate the return of my funds. The level of detail and precision they demonstrated was extraordinary. By the end of the process, Wizard Web Recovery had successfully recovered my lost Bitcoin. The relief and gratitude I felt were overwhelming. It was not just about the money but about restoring my faith in the possibility of justice and recovery in the cryptocurrency world. Wizard Web Recovery turned my nightmare into a success story. Their expertise, transparency, ethical approach, and relentless effort make them the best in the business. If you are in a similar situation, do not hesitate to reach out to them. They are proof that amidst the darkness of scams, there are still trustworthy experts dedicated to helping you recover your digital assets.   Contact Below:   Mail - wizard webrecovery@ programmer . net
    • Well don't I feel dumb, thank you as always @TileEntity you're the GOAT
    • Here is my code: @Mod.EventBusSubscriber(modid = Mod.MODID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class PlayerRenderModifications { @SubscribeEvent public static void prePlayerRender(RenderPlayerEvent.Pre evt) { RenderSystem.setShaderColor(0.0F, 1.0F, 1.0F, 1.0F); } @SubscribeEvent public static void postPlayerRender(RenderPlayerEvent.Post evt) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); } } This code is supposed to tint the player blue, however it doesn't tint the player at all (yes i know it only runs in f5 mode or when rendering players in multiplayer). I had also done some testing and it seems if I remove "postPlayerRender" then it tints the player, and also tints everything else that renders after the player (like other entities, clouds, etc.)   If you need me to provide other information then go ahead and ask!
  • Topics

×
×
  • Create New...

Important Information

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