SanaRinomi Posted August 12, 2016 Share Posted August 12, 2016 It's probably a stupid mistake that I can't seem to realize what it is, but when creating the axe for my mod the game crashes. Crash Report: ---- Minecraft Crash Report ---- // Shall we play a game? Time: 12/08/16 11:50 Description: Initializing game java.lang.ArrayIndexOutOfBoundsException: 5 at net.minecraft.item.ItemAxe.<init>(ItemAxe.java:19) at com.holydevils.items.tools.AxeItems.<init>(AxeItems.java:11) at com.holydevils.items.ModItems.createItems(ModItems.java:38) at com.holydevils.main.MainRegistry.preLoad(MainRegistry.java:25) 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:498) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:579) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:235) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:213) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:593) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) at net.minecraft.client.Minecraft.run(Minecraft.java:386) at net.minecraft.client.main.Main.main(Main.java:118) 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:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraft.item.ItemAxe.<init>(ItemAxe.java:19) at com.holydevils.items.tools.AxeItems.<init>(AxeItems.java:11) at com.holydevils.items.ModItems.createItems(ModItems.java:38) at com.holydevils.main.MainRegistry.preLoad(MainRegistry.java:25) 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:498) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:579) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:235) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:213) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:142) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:593) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:255) at net.minecraft.client.Minecraft.startGame(Minecraft.java:477) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:386) at net.minecraft.client.main.Main.main(Main.java:118) 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:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 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:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) -- System Details -- Details: Minecraft Version: 1.10.2 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_91, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 709310744 bytes (676 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.32 Powered by Forge 12.18.1.2011 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCH mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) UCH FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.10.2-12.18.1.2011.jar) UCH Forge{12.18.1.2011} [Minecraft Forge] (forgeSrc-1.10.2-12.18.1.2011.jar) UCE morethingsmod{v0.05} [More Things Mod] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13447 Compatibility Profile Context 16.300.2311.0' Renderer: 'AMD Radeon R7 200 Series' Launched Version: 1.10.2 LWJGL: 2.9.4 OpenGL: AMD Radeon R7 200 Series GL version 4.5.13447 Compatibility Profile Context 16.300.2311.0, 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: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (United Kingdom) Profiler Position: N/A (disabled) CPU: 8x AMD FX(tm)-8350 Eight-Core Processor ModItems class: package com.holydevils.items; import com.holydevils.items.tools.AxeItems; import com.holydevils.items.tools.HoeItems; import com.holydevils.items.tools.PickaxeItems; import com.holydevils.items.tools.ShovelItems; import com.holydevils.items.tools.SwordItems; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems { public static ToolMaterial reinforcedObsidian = EnumHelper.addToolMaterial("reinforcedObsidian", 3, 1600, 7.5F, 4.5F, 10); public static Item obsidianStick; public static Item purpleGlowstoneDust; public static Item glueBottle; public static Item glueMixture; public static Item obsidianDust; public static Item diamondDust; public static Item reinforcedObsidianDust; public static Item reinforcedObsidianAxe; public static Item reinforcedObsidianPickaxe; public static Item reinforcedObsidianShovel; public static Item reinforcedObsidianHoe; public static Item reinforcedObsidianSword; public static void createItems() { regItems(obsidianStick = new BasicItems("obsidianStick")); regItems(purpleGlowstoneDust = new BasicItems("purpleGlowstoneDust")); regItems(glueBottle = new BasicItems("glueBottle")); regItems(glueMixture = new BasicItems("glueMixture")); regItems(obsidianDust = new BasicItems("obsidianDust")); regItems(diamondDust = new BasicItems("diamondDust")); regItems(diamondDust = new BasicItems("reinforcedObsidianDust")); regItems(diamondDust = new AxeItems(reinforcedObsidian, "reinforcedObsidianAxe")); regItems(diamondDust = new PickaxeItems(reinforcedObsidian, "reinforcedObsidianPickaxe")); regItems(diamondDust = new ShovelItems(reinforcedObsidian, "reinforcedObsidianShovel")); regItems(diamondDust = new HoeItems(reinforcedObsidian, "reinforcedObsidianHoe")); regItems(diamondDust = new SwordItems(reinforcedObsidian, "reinforcedObsidianSword")); } public static void regItems(Item item){ item.setUnlocalizedName(item.getRegistryName().toString()); GameRegistry.register(item); } } AxeItem class: package com.holydevils.items.tools; import com.holydevils.main.MTCreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemAxe; public class AxeItems extends ItemAxe { public AxeItems(ToolMaterial material, String name) { super(material); this.setRegistryName(name); this.setCreativeTab(MTCreativeTabs.tabMoreThingsItems); } } Quote Link to comment Share on other sites More sharing options...
Choonster Posted August 12, 2016 Share Posted August 12, 2016 The ItemAxe(ToolMaterial) constructor only works for vanilla ToolMaterial s. Use the Forge-provided ItemAxe(ToolMaterial, float, float) constructor for modded ToolMaterial s. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future. Link to comment Share on other sites More sharing options...
SanaRinomi Posted August 12, 2016 Author Share Posted August 12, 2016 The ItemAxe(ToolMaterial) constructor only works for vanilla ToolMaterial s. Use the Forge-provided ItemAxe(ToolMaterial, float, float) constructor for modded ToolMaterial s. And may I ask what the two floats represent? Quote Link to comment Share on other sites More sharing options...
Choonster Posted August 12, 2016 Share Posted August 12, 2016 The ItemAxe(ToolMaterial) constructor only works for vanilla ToolMaterial s. Use the Forge-provided ItemAxe(ToolMaterial, float, float) constructor for modded ToolMaterial s. And may I ask what the two floats represent? Look at their names in your IDE. Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future. Link to comment Share on other sites More sharing options...
SanaRinomi Posted August 12, 2016 Author Share Posted August 12, 2016 The ItemAxe(ToolMaterial) constructor only works for vanilla ToolMaterial s. Use the Forge-provided ItemAxe(ToolMaterial, float, float) constructor for modded ToolMaterial s. And may I ask what the two floats represent? Look at their names in your IDE. The current version of Neon Eclipse is being stupid and only tells me the type. Nothing else... EDIT: I retract my statement. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.