Posted October 31, 20177 yr After attempting to set my block obsidianore to drop obsidianingot instead, when I was testing, destroying the block resulted in missing textures spawning, which would crash the game if I picked them up. After repeating this with the block dropping sticks, an Item already in minecraft, It worked perfectly. I think this means that the Item copperingot is not being registered before copperore, but I am not sure. Here is the CopperOre Class: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/blocks/CopperOre.java Here is CommonProxy: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java Here is modItems: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/ModItems.java and here is the crash report: ---- Minecraft Crash Report ---- // Don't be sad. I'll do better next time, I promise! Time: 10/30/17 9:23 PM Description: Ticking player java.lang.ArrayIndexOutOfBoundsException: -1 at net.minecraft.stats.StatList.getObjectsPickedUpStats(StatList.java:123) at net.minecraft.entity.item.EntityItem.onCollideWithPlayer(EntityItem.java:449) at net.minecraft.entity.player.EntityPlayer.collideWithPlayer(EntityPlayer.java:662) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:633) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2392) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:270) at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:423) at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:185) at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:212) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:196) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace: at net.minecraft.stats.StatList.getObjectsPickedUpStats(StatList.java:123) at net.minecraft.entity.item.EntityItem.onCollideWithPlayer(EntityItem.java:449) at net.minecraft.entity.player.EntityPlayer.collideWithPlayer(EntityPlayer.java:662) at net.minecraft.entity.player.EntityPlayer.onLivingUpdate(EntityPlayer.java:633) at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2392) at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:270) -- Player being ticked -- Details: Entity Type: null (net.minecraft.entity.player.EntityPlayerMP) Entity ID: 194 Entity Name: Player750 Entity's Exact location: 180.51, 47.00, 57.51 Entity's Block location: World: (180,47,57), Chunk: (at 4,2,9 in 11,3; contains blocks 176,0,48 to 191,255,63), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Entity's Momentum: 0.00, -0.08, 0.00 Entity's Passengers: [] Entity's Vehicle: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:423) at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:185) at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:212) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:307) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@6fbe3b33 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:196) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:863) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) at java.lang.Thread.run(Unknown Source) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_151, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 732016696 bytes (698 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP 9.42 Powered by Forge 14.23.0.2515 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:--------- |:--------- |:------------ |:-------------------------------- |:--------- | | UCHIJAAAA | minecraft | 1.12.2 | minecraft.jar | None | | UCHIJAAAA | mcp | 9.42 | minecraft.jar | None | | UCHIJAAAA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.0.2515.jar | None | | UCHIJAAAA | forge | 14.23.0.2515 | forgeSrc-1.12.2-14.23.0.2515.jar | None | | UCHIJAAAA | btm | 0.0.1 | bin | None | Loaded coremods (and transformers): GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player750'/194, l='New World', x=180.51, y=47.00, z=57.51]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge'
October 31, 20177 yr Block are registered before items. Therefor this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L87 Runs before this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L70 Which means that this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/blocks/CopperOre.java#L32 Assigns the CURRENT VALUE of the field (which has not yet had the ObjectHolder annotation run to inject a value) to the block's field. Also: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/ModItems.java#L36 Seriously? NO, BAD MODDER. DO NOT ASSIGN THESE FIELDS MANUALLY. ESPECIALLY NOT WITH A SEPARATE INSTANCE Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 31, 20177 yr Author 16 hours ago, Draco18s said: Block are registered before items. Therefor this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L87 Runs before this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/proxy/CommonProxy.java#L70 Which means that this line: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/blocks/CopperOre.java#L32 Assigns the CURRENT VALUE of the field (which has not yet had the ObjectHolder annotation run to inject a value) to the block's field. Also: https://github.com/InterdimensionalCat/ModTest/blob/master/java/com/benthom123/test/ModItems.java#L36 Seriously? NO, BAD MODDER. DO NOT ASSIGN THESE FIELDS MANUALLY. ESPECIALLY NOT WITH A SEPARATE INSTANCE Thanks for the info, I found a fix that is working and allows me to assign more than 1 drop to the item. As for the @ObjectHolder stuff, I am not sure what way I should do it that is better, I tried putting everything under the same @ObjectHolder annotation but that crashed all of my textures and I didn't know how to fix that. Could you show me an example of what you mean?
October 31, 20177 yr You see where it says = new Thing()? Remove = new Thing() Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.