• 0

    posted a message on Thaumcraft 6.1.BETA26 [no longer being developed]
    Getting a crash on launch inside an Eclipse development environment.

    http://pastebin.com/caD7TL62 - Crash log
    Posted in: Minecraft Mods
  • 0

    posted a message on How to add numerous subtypes and textures for said subtypes through use of arrays
    I have fixed it since this post; all of the code is in the repository as stated earlier, but thanks for your help anyway! The problem was that for some reason the ".setSymbol(String)", etc. wasn't actually saving the variable so I moved all of those into parameters of Element so it would get saved, and then it worked fine.
    Posted in: Modification Development
  • 0

    posted a message on How to add numerous subtypes and textures for said subtypes through use of arrays
    I have created a class where every base type of material is listed so I can refer to their properties in this file and so I can add new subtypes for each new material type automatically by adding their unlocalized names to an array/stack and having the Item classes check these arrays/stacks. While it seems like it should work, they do not show up in NEI and when I am given them through "/give" the game crashes with a render issue.

    Crashes-

    From NEI in log, the game does not crash though:
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:0 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 0
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:1 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 1
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:2 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 2
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:3 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 3
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:4 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 4
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:5 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 5
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:6 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 6
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:7 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 7
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:8 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 8
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:9 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 9
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:10 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 10
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:11 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 11
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:12 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 12
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:13 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 13
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:14 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 14
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16234:15 ItemElExDust
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 15
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExDust.getIconFromDamage(ItemElExDust.java:90)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:0 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 0
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:1 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 1
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:2 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 2
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:3 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 3
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:4 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 4
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:5 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 5
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:6 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 6
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:7 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 7
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:8 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 8
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:9 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 9
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:10 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 10
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:11 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 11
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:12 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 12
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:13 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 13
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:14 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 14
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)
    2013-07-30 15:50:16 [INFO] [STDERR] NEI: Omitting #16235:15 ItemElExIngot
    2013-07-30 15:50:16 [INFO] [STDERR] java.lang.ArrayIndexOutOfBoundsException: 15
    2013-07-30 15:50:16 [INFO] [STDERR]  at elex.item.ItemElExIngot.getIconFromDamage(ItemElExIngot.java:52)
    2013-07-30 15:50:16 [INFO] [STDERR]  at net.minecraft.item.Item.getIconIndex(Item.java:308)
    2013-07-30 15:50:16 [INFO] [STDERR]  at codechicken.nei.ItemList$ThreadLoadItems.run(ItemList.java:355)

    When I use /give:
    2013-07-30 15:53:34 [INFO] [STDERR] net.minecraft.util.ReportedException: Rendering entity in world
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:339)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1006)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.client.main.Main.main(Main.java:93)
    2013-07-30 15:53:34 [INFO] [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2013-07-30 15:53:34 [INFO] [STDERR]  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    2013-07-30 15:53:34 [INFO] [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    2013-07-30 15:53:34 [INFO] [STDERR]  at java.lang.reflect.Method.invoke(Unknown Source)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    2013-07-30 15:53:34 [INFO] [STDERR]  at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
    2013-07-30 15:53:34 [INFO] [STDERR] Caused by: java.lang.ArrayIndexOutOfBoundsException

    Code-

    Element.java: https://github.com/myoKun345/ElementalExperimentation/blob/master/elex_common/elex/element/Element.java

    ItemElExDust.java: https://github.com/myoKun345/ElementalExperimentation/blob/master/elex_common/elex/item/ItemElExDust.java

    ItemElExIngot.java: https://github.com/myoKun345/ElementalExperimentation/blob/master/elex_common/elex/item/ItemElExIngot.java

    ItemIds.java: https://github.com/myoKun345/ElementalExperimentation/blob/master/elex_common/elex/lib/ItemIds.java

    The rest of the code is there in the repository if you need to check anything else.

    Thanks in advance!
    Posted in: Modification Development
  • 0

    posted a message on Crashing when custom mob spawns
    I added the registrations to the proxy just to see if it would work by registering it there, etc. (I don't think its a redundancy problem, since I had this same error when I hadn't registered it twice.)

    And after doing that I still have the same error.
    Posted in: Modification Development
  • 0

    posted a message on Crashing when custom mob spawns
    I've added a custom mob to my mod, with its own model, which crashes the game every time it spawns. (I have not even been able to see the mob in-game yet.) From the error it gives me, all I can tell is that something is wrong with either the ID I am registering it with or something not being registered correctly or at all.

    Error:
    2013-01-16 11:42:36 [INFO] [STDERR] java.lang.NullPointerException
    2013-01-16 11:42:36 [INFO] [STDERR]  at cpw.mods.fml.common.network.EntitySpawnPacket.generatePacket(EntitySpawnPacket.java:63)
    2013-01-16 11:42:36 [INFO] [STDERR]  at cpw.mods.fml.common.network.FMLPacket.makePacket(FMLPacket.java:119)
    2013-01-16 11:42:36 [INFO] [STDERR]  at cpw.mods.fml.common.network.FMLNetworkHandler.getEntitySpawningPacket(FMLNetworkHandler.java:354)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.entity.EntityTrackerEntry.getPacketForThisEntity(EntityTrackerEntry.java:460)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.entity.EntityTrackerEntry.tryStartWachingThis(EntityTrackerEntry.java:366)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.entity.EntityTracker.updateTrackedEntities(EntityTracker.java:257)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:691)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:123)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
    2013-01-16 11:42:36 [INFO] [STDERR]  at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)


    Registration in the mod file's init() method:
    EntityRegistry.registerModEntity(EntityBeryllope.class, "Beryllope", 33, this, 80, 3, true);
      EntityRegistry.addSpawn(EntityBeryllope.class, 10, 2, 7, EnumCreatureType.creature, mod_Amethyst.extremeHillsGem);
      EntityRegistry.registerGlobalEntityID(EntityBeryllope.class, "Beryllope", 33, 9, 9);


    Registration in the proxy:
    RenderingRegistry.registerEntityRenderingHandler(EntityBeryllope.class, new RenderBeryllope(new ModelBeryllope(), 1.0F));
    EntityRegistry.addSpawn(EntityBeryllope.class, 10, 2, 7, EnumCreatureType.creature, mod_Amethyst.extremeHillsGem);
    EntityRegistry.registerGlobalEntityID(EntityBeryllope.class, "Beryllope", 33, 9, 9);


    The entity, model and render file will be provided if you request it. Thanks in advance for any help!
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    Ok, I will try that now.

    EDIT: Removing .setIndependent and final didn't do anything.

    EDIT 2: Nevermind, it seems that only the garnet achievement isn't triggering. :/ Nevermind again, it works, I just had it triggering the peridot achievement instead (from copying and pasting the if statements XD) Thanks for all you guys' help, hope people in the future like me can see this thread and get some clarification too.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    Oh, no, I have registered it in my init() function, I just didn't paste it up there. (On a side note: Thank god my code survived the change to 1.4.6! And no, it still doesn't trigger in 1.4.6 either.)
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    I was using .addStat before, I changed it just to see if that might've been causing some of the problems before.

    My Achievements:
    //Achievement Registrations
    public static final Achievement amethystAchieve = new Achievement(2100, "amethystAchieve", 0, 1, mod_Amethyst.amethyst, null).setIndependent().registerAchievement();
    public static final Achievement peridotAchieve = new Achievement(2101, "peridotAchieve", 0, 0, mod_Amethyst.peridot, null).setIndependent().registerAchievement();
    public static final Achievement garnetAchieve = new Achievement(2102, "garnetAchieve", 0, -1, mod_Amethyst.garnet, null).setIndependent().registerAchievement();
    public static final Achievement temperAmethystAch = new Achievement(2103, "temperAmethystAch", 2, 2, mod_Amethyst.amethystIngot, amethystAchieve).registerAchievement();
    public static final Achievement temperPeridotAch = new Achievement(2104, "temperPeridotAch", 2, 0, mod_Amethyst.peridotIngot, peridotAchieve).registerAchievement();
    public static final Achievement temperGarnetAch = new Achievement(2105, "temperGarnetAch", 2, -2, mod_Amethyst.garnetIngot, garnetAchieve).registerAchievement();
    public static final Achievement gemStackAch = new Achievement(2106, "gemStackAch", 4, 0, mod_Amethyst.gemAlloyIngot, null).setIndependent().registerAchievement();
    
    //Achievement Page Registration
    public static final AchievementPage moresAchPage = new AchievementPage("M'ores", amethystAchieve, peridotAchieve, garnetAchieve, temperAmethystAch, temperPeridotAch, temperGarnetAch, gemStackAch);


    On a potentially unrelated note, I have the first three achievements set up to be triggered in the CraftingHandler as well (by having the ore block smelted to get the gem, like if you have a Silk Touch pickaxe) just to see if the achievements were working at all. I was just wondering if it only works with one trigger for the achievement or it doesn't matter how many triggers there are.

    EDIT: Changing it to .addStat didn't do anything different.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    I'm doing something wrong now too, as when I pick up the items it does nothing. I have my pickup handler registered with this code:
    GameRegistry.registerPickupHandler(new PickupNotifier());


    And my PickupNotifier.java is this:
    package dx.mods.amethyst;
    import net.minecraft.src.EntityItem;
    import net.minecraft.src.EntityPlayer;
    import cpw.mods.fml.common.IPickupNotifier;
    public class PickupNotifier implements IPickupNotifier{
    @Override
    public void notifyPickup(EntityItem item, EntityPlayer player) {
      if (item.item.itemID == mod_Amethyst.amethyst.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.amethystAchieve);
      }
      if (item.item.itemID == mod_Amethyst.peridot.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.peridotAchieve);
      }
      if (item.item.itemID == mod_Amethyst.peridot.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.peridotAchieve);
      }
    }
    
    }


    What am I doing wrong or what have I not done that I should have done?
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    Ok, so now I get an error when I'm picking up one of the items I set to trigger the achievements:

    java.lang.NullPointerException
    at dx.mods.amethyst.MoresEventHooks.onItemPickup(MoresEventHooks.java:13)
    at net.minecraftforge.event.ASMEventHandler_3_MoresEventHooks_onItemPickup_EntityItemPickupEvent.invoke(.dynamic)
    at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:35)
    at net.minecraftforge.event.EventBus.post(EventBus.java:103)
    at net.minecraft.src.EntityItem.onCollideWithPlayer(EntityItem.java:298)
    at net.minecraft.src.EntityPlayer.collideWithPlayer(EntityPlayer.java:561)
    at net.minecraft.src.EntityPlayer.onLivingUpdate(EntityPlayer.java:552)
    at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:775)
    at net.minecraft.src.EntityPlayer.onUpdate(EntityPlayer.java:277)
    at net.minecraft.src.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:217)
    at net.minecraft.src.NetServerHandler.handleFlying(NetServerHandler.java:256)
    at net.minecraft.src.Packet10Flying.processPacket(Packet10Flying.java:51)
    at net.minecraft.src.MemoryConnection.processReadPackets(MemoryConnection.java:79)
    at net.minecraft.src.NetServerHandler.networkTick(NetServerHandler.java:82)
    at net.minecraft.src.NetworkListenThread.networkTick(NetworkListenThread.java:55)
    at net.minecraft.src.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:111)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:691)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:587)
    at net.minecraft.src.IntegratedServer.tick(IntegratedServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:494)
    at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)


    MoresEventHooks.java:
    package dx.mods.amethyst;
    import net.minecraft.src.EntityPlayer;
    import net.minecraftforge.event.ForgeSubscribe;
    import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
    public class MoresEventHooks {
    public EntityPlayer player;
    
    @ForgeSubscribe
    public void onItemPickup (EntityItemPickupEvent par1) {
      if (par1.item.item.itemID == mod_Amethyst.amethyst.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.amethystAchieve);
      }
      if (par1.item.item.itemID == mod_Amethyst.peridot.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.peridotAchieve);
      }
      if (par1.item.item.itemID == mod_Amethyst.garnet.shiftedIndex) {
       player.triggerAchievement(mod_Amethyst.garnetAchieve);
      }
    }
    }


    So, I'm not sure if I didn't put enough stuff in the if statements since it crashes at the lines where it gives the achievement, or I just did something stupidly wrong.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    Quote from shadowslaye

    Here is how you do it, I am pretty sure.

    In your main mod class you need:

    public class YOURCLASS{
    
    @Init
    public void YOURMETHOD{
    MinecraftForge.EVENT_BUS.register(new ItemPickupHandler());
    
    }
    
    
    }


    then you need a class for an itempickuphandler

    import net.minecraftforge.event.ForgeSubscribe;
    import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
    public class ItemPickupHandler {
    
    @ForgeSubscribe
    public void onItemPickup(EntityItemPickupEvent event) {
    //here goes the stuff that happens on pickup
    }
    
    }


    there you go.


    Mmkay, thanks. So then how do I specify the item that triggers the achievement?

    EDIT: Nevermind, I went looking some more and I was missing one ".item" to put before the "itemId" when doing the if statement, I was trying "par1.item.itemID == mod_Blah.blahBlah.shiftedIndex" instead of "par1.item.item.itemID == mod_Blah.blahBlah.shiftedIndex"
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    I'm not saying it's his fault, just that you can't expect everyone to know exactly what you know. And I don't know basic Java really, I've only gotten to the point in my mod I am at through use of logic, tutorials, copying and pasting and trial and error. Anyway, I still don't understand how to implement this at all.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    How is it not clear from all my posts in this thread that I know barely anything about Forge and therefore don't know what "listen" means in the context of Forge? If I knew how to do this I wouldn't be asking this question at all; I would have figured it out on my own already.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    It barely explains how to use events that occur when the player is damaged. My question is about item pickup.
    Posted in: Modification Development
  • 0

    posted a message on How to trigger an achievement by picking up a block/item?
    That still doesn't clear anything up.
    Posted in: Modification Development
  • To post a comment, please .