I'm working on my mods again, updating them to 1.8 (recommended) forge. I've got a lot of them working, but in my mod, I added an item that is cooked. It's cooked Zombie Flesh and it's full class is here:
public class CookedZombieFlesh extends ItemFood {
private static final String NAME = "CookedZombieFlesh";
public CookedZombieFlesh() {
super(3, 0.3f, true);
setUnlocalizedName(NAME);
setMaxStackSize(16);
}
public void register() {
GameRegistry.registerItem(new CookedZombieFlesh(), NAME);
GameRegistry.addSmelting(Items.rotten_flesh, new ItemStack(new CookedZombieFlesh()), 0.3f);
}
}
And I activate the item in the pre-init here:
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
new CookedZombieFlesh().register();
}
Now, the item works properly if I pull it from the creative menu, but if I send regular zombie flesh through the furnace, it cooks properly, but the game crashes when I take the cooked items out of the furnace.
[20:22:11] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Updating screen events
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1766) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1080) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
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(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503) ~[ItemStack.class:?]
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67) ~[SlotFurnaceOutput.class:?]
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48) ~[SlotFurnaceOutput.class:?]
at net.minecraft.inventory.Container.slotClick(Container.java:359) ~[Container.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539) ~[PlayerControllerMP.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690) ~[GuiContainer.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422) ~[GuiContainer.class:?]
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602) ~[GuiScreen.class:?]
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571) ~[GuiScreen.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1752) ~[Minecraft.class:?]
... 11 more
[20:22:11] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503)
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67)
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48)
at net.minecraft.inventory.Container.slotClick(Container.java:359)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1752)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1080)
at net.minecraft.client.Minecraft.run(Minecraft.java:376)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503)
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67)
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48)
at net.minecraft.inventory.Container.slotClick(Container.java:359)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571)
-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 607337640 bytes (579 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 1, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.10 FML v8.0.37.1334 Minecraft Forge 11.14.1.1334 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{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
tmc-fti{1.0} [Fight The Infection] (main) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Loaded coremods (and transformers):
Launched Version: 1.8
LWJGL: 2.9.1
OpenGL: AMD Radeon HD 7700 Series GL version 4.5.13394 Compatibility Profile Context 15.200.1023.5, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.
Using VBOs: No
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)
[20:22:11] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: #@!@# Game crashed! Crash report saved to: #@!@# D:\_projects\fti\eclipse\.\crash-reports\crash-2015-07-13_20.22.11-client.txt
Disconnected from the target VM, address: '127.0.0.1:59500', transport: 'socket'
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Process finished with exit code -1
I've removed everything else from the plugin, so it's literally just one item being added. I don't even have a texture file or blockstates yet. You literally see ALL the code I've written and it doesn't work. Any ideas?
A couple of comments on how you are doing this, although I'm not sure why it crashed.
1) The two things below are not the same:
Item item = new customItem(); // Creates an object of type Item, that is an instance of customItem.
new customItem() // Creates an object of type customItem, that is an instance of customItem
the code "new ItemStack(item, 2), requires a type Item, not customItem. You should be getting a warning from your compiler (maybe Eclipse?), not a crash. It shouldn't even compile, unless you have somehow removed the warnings this should produce. You should have to include a cast.
2) Normally, you will create a static variable for each item when you register it. Instead of:
GameRegistry.registerItem(new CookedZombieFlesh(), NAME);
You would have:
Where you also have as a class variable:
public static Item cookedZombieFlesh;
And then when you register:
cookedZombieFlesh = new CookedZombieFlesh();
GameRegistry.registerItem(cookedZombieFlesh, NAME);
With this, you can then do this for the ItemStack:
ItemStack stack = new ItemStack(CookedZombieFlesh.cookedZombieFlesh, 2);
That way you just new the item once and reuse it everywhere (you only need one instance of it, the instance that is registered), and don't keep creating new instances of it everywhere you need it.
As a side note, everyone does this differently, but you put all your items that are registered and their static instances into one class somewhere. I call my class ModItems, but others use different methods.
I'm working on my mods again, updating them to 1.8 (recommended) forge. I've got a lot of them working, but in my mod, I added an item that is cooked. It's cooked Zombie Flesh and it's full class is here:
And I activate the item in the pre-init here:
Now, the item works properly if I pull it from the creative menu, but if I send regular zombie flesh through the furnace, it cooks properly, but the game crashes when I take the cooked items out of the furnace.
[20:22:11] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Updating screen events
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1766) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1080) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:376) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45]
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(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503) ~[ItemStack.class:?]
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67) ~[SlotFurnaceOutput.class:?]
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48) ~[SlotFurnaceOutput.class:?]
at net.minecraft.inventory.Container.slotClick(Container.java:359) ~[Container.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539) ~[PlayerControllerMP.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690) ~[GuiContainer.class:?]
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422) ~[GuiContainer.class:?]
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602) ~[GuiScreen.class:?]
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571) ~[GuiScreen.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1752) ~[Minecraft.class:?]
... 11 more
[20:22:11] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
Time: 7/13/15 8:22 PM
Description: Updating screen events
java.lang.ArrayIndexOutOfBoundsException: -1
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503)
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67)
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48)
at net.minecraft.inventory.Container.slotClick(Container.java:359)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1752)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1080)
at net.minecraft.client.Minecraft.run(Minecraft.java:376)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:503)
at net.minecraft.inventory.SlotFurnaceOutput.onCrafting(SlotFurnaceOutput.java:67)
at net.minecraft.inventory.SlotFurnaceOutput.onPickupFromSlot(SlotFurnaceOutput.java:48)
at net.minecraft.inventory.Container.slotClick(Container.java:359)
at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:539)
at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:690)
at net.minecraft.client.gui.inventory.GuiContainer.mouseClicked(GuiContainer.java:422)
at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:602)
at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:571)
-- Affected screen --
Details:
Screen name: net.minecraft.client.gui.inventory.GuiFurnace
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player677'/378, l='MpServer', x=48.45, y=71.00, z=198.80]]
Chunk stats: MultiplayerChunkCache: 622, 622
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: 24.00,64.00,252.00 - World: (24,64,252), Chunk: (at 8,4,12 in 1,15; contains blocks 16,0,240 to 31,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 20003 game time, 6000 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: 109 total; [EntityVillager['Villager'/256, l='MpServer', x=81.66, y=69.00, z=197.75], EntityPig['Pig'/257, l='MpServer', x=89.00, y=69.00, z=223.97], EntityVillager['Villager'/258, l='MpServer', x=88.75, y=68.00, z=216.47], EntityVillager['Villager'/259, l='MpServer', x=81.81, y=69.00, z=217.34], EntityPig['Pig'/260, l='MpServer', x=81.09, y=70.00, z=235.56], EntitySheep['Sheep'/261, l='MpServer', x=80.00, y=69.00, z=260.94], EntitySheep['Sheep'/262, l='MpServer', x=93.19, y=71.00, z=259.47], EntityPig['Pig'/279, l='MpServer', x=104.00, y=71.00, z=151.94], EntitySheep['Sheep'/280, l='MpServer', x=110.03, y=68.00, z=202.91], EntitySkeleton['Skeleton'/281, l='MpServer', x=102.19, y=46.00, z=208.63], EntitySkeleton['Skeleton'/282, l='MpServer', x=99.81, y=46.00, z=209.34], EntitySkeleton['Skeleton'/283, l='MpServer', x=97.50, y=47.00, z=211.50], EntitySkeleton['Skeleton'/284, l='MpServer', x=100.97, y=47.00, z=213.41], EntityPig['Pig'/285, l='MpServer', x=101.97, y=68.00, z=221.97], EntityPig['Pig'/286, l='MpServer', x=103.47, y=69.00, z=242.13], EntityBat['Bat'/301, l='MpServer', x=123.63, y=45.00, z=185.09], EntitySkeleton['Skeleton'/302, l='MpServer', x=127.50, y=48.00, z=205.91], EntitySkeleton['Skeleton'/303, l='MpServer', x=120.47, y=50.00, z=203.66], EntityZombie['Zombie'/304, l='MpServer', x=127.13, y=47.00, z=191.75], EntityPig['Pig'/305, l='MpServer', x=120.94, y=69.00, z=193.81], EntityPig['Pig'/306, l='MpServer', x=114.59, y=69.00, z=197.13], EntityPig['Pig'/307, l='MpServer', x=124.97, y=69.00, z=194.84], EntitySkeleton['Skeleton'/308, l='MpServer', x=116.53, y=51.00, z=219.09], EntitySkeleton['Skeleton'/309, l='MpServer', x=127.26, y=47.00, z=201.74], EntitySheep['Sheep'/310, l='MpServer', x=113.03, y=68.00, z=222.09], EntitySkeleton['Skeleton'/311, l='MpServer', x=118.41, y=50.00, z=222.81], EntitySheep['Sheep'/312, l='MpServer', x=117.06, y=69.00, z=226.13], EntitySheep['Sheep'/313, l='MpServer', x=126.28, y=71.00, z=235.22], EntitySheep['Sheep'/314, l='MpServer', x=115.44, y=72.00, z=246.66], EntityPig['Pig'/315, l='MpServer', x=114.84, y=70.00, z=241.00], EntitySheep['Sheep'/334, l='MpServer', x=128.50, y=69.00, z=193.50], EntitySheep['Sheep'/337, l='MpServer', x=128.16, y=77.00, z=238.47], EntityBat['Bat'/118, l='MpServer', x=-18.47, y=24.10, z=182.75], EntitySheep['Sheep'/119, l='MpServer', x=-24.19, y=70.00, z=180.41], EntitySheep['Sheep'/120, l='MpServer', x=-28.59, y=69.02, z=185.38], EntitySheep['Sheep'/121, l='MpServer', x=-16.75, y=64.00, z=217.81], EntityCreeper['Creeper'/122, l='MpServer', x=-18.50, y=21.00, z=226.50], EntityPlayerSP['Player677'/378, l='MpServer', x=48.45, y=71.00, z=198.80], EntitySheep['Sheep'/138, l='MpServer', x=-0.84, y=68.00, z=124.13], EntitySheep['Sheep'/140, l='MpServer', x=-2.50, y=68.00, z=201.50], EntitySheep['Sheep'/141, l='MpServer', x=-15.22, y=67.00, z=196.28], EntitySheep['Sheep'/142, l='MpServer', x=-16.00, y=67.00, z=192.03], EntitySkeleton['Skeleton'/143, l='MpServer', x=-5.50, y=22.00, z=216.50], EntitySkeleton['Skeleton'/144, l='MpServer', x=-12.50, y=21.00, z=233.50], EntityBat['Bat'/145, l='MpServer', x=0.94, y=15.68, z=244.76], EntityBat['Bat'/146, l='MpServer', x=3.32, y=42.22, z=226.48], EntityBat['Bat'/147, l='MpServer', x=0.51, y=31.80, z=259.16], EntityCreeper['Creeper'/148, l='MpServer', x=2.70, y=28.11, z=273.41], EntitySheep['Sheep'/162, l='MpServer', x=12.63, y=68.00, z=183.72], EntitySheep['Sheep'/163, l='MpServer', x=14.31, y=68.00, z=184.53], EntitySheep['Sheep'/164, l='MpServer', x=1.69, y=68.00, z=190.16], EntityZombie['Zombie'/165, l='MpServer', x=4.06, y=13.00, z=194.50], EntityCreeper['Creeper'/166, l='MpServer', x=1.50, y=13.00, z=193.50], EntitySheep['Sheep'/167, l='MpServer', x=0.78, y=68.00, z=203.50], EntitySheep['Sheep'/168, l='MpServer', x=14.84, y=69.00, z=203.91], EntityCreeper['Creeper'/169, l='MpServer', x=16.41, y=41.00, z=220.03], EntityZombie['Zombie'/170, l='MpServer', x=13.69, y=40.00, z=222.69], EntityBat['Bat'/171, l='MpServer', x=9.46, y=24.52, z=224.77], EntityCreeper['Creeper'/172, l='MpServer', x=11.06, y=24.02, z=223.63], EntityZombie['Zombie'/173, l='MpServer', x=8.44, y=43.00, z=253.94], EntityZombie['Zombie'/174, l='MpServer', x=6.22, y=30.00, z=263.16], EntityBat['Bat'/175, l='MpServer', x=-0.78, y=31.02, z=257.29], EntityBat['Bat'/176, l='MpServer', x=-1.36, y=30.68, z=252.73], EntitySkeleton['Skeleton'/177, l='MpServer', x=10.09, y=43.00, z=256.47], EntityZombie['Zombie'/178, l='MpServer', x=1.91, y=40.00, z=250.44], EntityCreeper['Creeper'/184, l='MpServer', x=20.59, y=25.00, z=137.00], EntitySkeleton['Skeleton'/185, l='MpServer', x=29.75, y=16.00, z=133.84], EntityPig['Pig'/186, l='MpServer', x=21.06, y=69.00, z=189.81], EntityZombie['Zombie'/187, l='MpServer', x=26.50, y=26.00, z=205.50], EntityZombie['Zombie'/188, l='MpServer', x=31.50, y=19.00, z=200.50], EntityZombie['Zombie'/189, l='MpServer', x=18.50, y=45.00, z=200.50], EntityCreeper['Creeper'/190, l='MpServer', x=35.13, y=44.00, z=207.09], EntityCreeper['Creeper'/191, l='MpServer', x=20.50, y=45.00, z=199.50], EntityCreeper['Creeper'/192, l='MpServer', x=19.50, y=45.00, z=197.50], EntityCreeper['Creeper'/193, l='MpServer', x=20.50, y=45.00, z=201.50], EntityWitch['Witch'/194, l='MpServer', x=16.50, y=41.00, z=213.50], EntityCreeper['Creeper'/195, l='MpServer', x=19.72, y=43.00, z=220.50], EntityPig['Pig'/196, l='MpServer', x=30.00, y=68.00, z=233.97], EntityZombie['Zombie'/198, l='MpServer', x=22.69, y=42.00, z=273.63], EntityEnderman['Enderman'/199, l='MpServer', x=23.56, y=43.00, z=275.13], EntityZombie['Zombie'/200, l='MpServer', x=21.84, y=42.00, z=273.00], EntityBat['Bat'/207, l='MpServer', x=39.66, y=16.13, z=136.80], EntityCreeper['Creeper'/208, l='MpServer', x=35.00, y=13.00, z=201.44], EntitySkeleton['Skeleton'/209, l='MpServer', x=41.78, y=42.00, z=206.47], EntityCreeper['Creeper'/210, l='MpServer', x=44.10, y=41.00, z=210.10], EntitySpider['Spider'/211, l='MpServer', x=37.84, y=44.00, z=207.91], EntitySheep['Sheep'/212, l='MpServer', x=32.53, y=69.00, z=193.31], EntityVillager['Villager'/224, l='MpServer', x=62.63, y=69.00, z=201.13], EntityVillager['Villager'/225, l='MpServer', x=68.28, y=68.00, z=202.28], EntitySkeleton['Skeleton'/226, l='MpServer', x=51.44, y=42.00, z=213.13], EntitySpider['Spider'/227, l='MpServer', x=50.28, y=41.00, z=214.03], EntitySpider['Spider'/228, l='MpServer', x=55.66, y=42.00, z=217.75], EntitySkeleton['Skeleton'/229, l='MpServer', x=56.59, y=42.00, z=216.28], EntityEnderman['Enderman'/230, l='MpServer', x=50.63, y=57.00, z=212.09], EntityVillager['Villager'/239, l='MpServer', x=65.97, y=69.00, z=184.41], EntityVillager['Villager'/240, l='MpServer', x=71.13, y=69.00, z=201.56], EntityVillager['Villager'/241, l='MpServer', x=73.66, y=69.00, z=205.50], EntityVillager['Villager'/242, l='MpServer', x=68.69, y=67.00, z=202.69], EntityCreeper['Creeper'/243, l='MpServer', x=65.50, y=11.00, z=213.97], EntityVillager['Villager'/244, l='MpServer', x=70.47, y=68.00, z=210.69], EntityVillager['Villager'/245, l='MpServer', x=74.84, y=69.00, z=210.44], EntityVillager['Villager'/246, l='MpServer', x=76.13, y=69.00, z=211.47], EntityVillager['Villager'/247, l='MpServer', x=67.81, y=69.00, z=224.50], EntitySheep['Sheep'/248, l='MpServer', x=68.25, y=68.00, z=254.88], EntitySheep['Sheep'/249, l='MpServer', x=73.97, y=68.00, z=264.72], EntitySheep['Sheep'/252, l='MpServer', x=83.53, y=95.00, z=120.34], EntitySheep['Sheep'/253, l='MpServer', x=92.50, y=76.00, z=137.16], EntitySheep['Sheep'/254, l='MpServer', x=88.44, y=88.00, z=134.84], EntityVillager['Villager'/255, l='MpServer', x=83.28, y=69.00, z=186.66]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:392)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2600)
at net.minecraft.client.Minecraft.run(Minecraft.java:398)
at net.minecraft.client.main.Main.main(Main.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 607337640 bytes (579 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 1, tcache: 0, allocated: 13, tallocated: 95
FML: MCP v9.10 FML v8.0.37.1334 Minecraft Forge 11.14.1.1334 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{8.0.37.1334} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{11.14.1.1334} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
tmc-fti{1.0} [Fight The Infection] (main) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Loaded coremods (and transformers):
Launched Version: 1.8
LWJGL: 2.9.1
OpenGL: AMD Radeon HD 7700 Series GL version 4.5.13394 Compatibility Profile Context 15.200.1023.5, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.
Using VBOs: No
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)
[20:22:11] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: #@!@# Game crashed! Crash report saved to: #@!@# D:\_projects\fti\eclipse\.\crash-reports\crash-2015-07-13_20.22.11-client.txt
Disconnected from the target VM, address: '127.0.0.1:59500', transport: 'socket'
AL lib: (EE) alc_cleanup: 1 device not closed
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
Process finished with exit code -1
I've removed everything else from the plugin, so it's literally just one item being added. I don't even have a texture file or blockstates yet. You literally see ALL the code I've written and it doesn't work. Any ideas?
As seen on YouTube: Episode 1 of TMC Plays: Minecraft
This isn't documented, so I thought I would add it here:
You cannot instantiate an object when instantiating an ItemStack. The item for the stack must be created outside the ItemStack instantiation...
I don't know why this makes a difference, but it fixes this bug.
As seen on YouTube: Episode 1 of TMC Plays: Minecraft
A couple of comments on how you are doing this, although I'm not sure why it crashed.
1) The two things below are not the same:
Item item = new customItem(); // Creates an object of type Item, that is an instance of customItem.
new customItem() // Creates an object of type customItem, that is an instance of customItem
the code "new ItemStack(item, 2), requires a type Item, not customItem. You should be getting a warning from your compiler (maybe Eclipse?), not a crash. It shouldn't even compile, unless you have somehow removed the warnings this should produce. You should have to include a cast.
2) Normally, you will create a static variable for each item when you register it. Instead of:
[url=2482915-wip-arkcraft-survival-evolved-dinos-taming]
You are right, this was just a quick class to see if my bigger class was failing. This is how it looks now:
and I have an enum which holds all my items, so that when I create a new ItemStack, I can run something like this:
ItemStack stack = new ItemStack(FtiItems.cookedZombieFlesh, 1);
As seen on YouTube: Episode 1 of TMC Plays: Minecraft
Removing the static item broke my texture. I'll go back to square one.
As seen on YouTube: Episode 1 of TMC Plays: Minecraft
You still need a static item for your texture to render... why is putting the static item inside my class a bad thing?
As seen on YouTube: Episode 1 of TMC Plays: Minecraft