Posted June 17, 20187 yr So I have exported my mod as a jar file. I run it in Minecraft with the latest version of Forge and it's the only mod installed. It never crashed in my Development Environment but outside of that, it is crashing every time. The reason for it is "java.lang.NoSuchFieldError: ROCK". The crash report is on Pastebin here. I appreciate any help as the reason for the crash makes no sense to me. My username elsewhere is Fluoride
June 17, 20187 yr How did you compile your mod into a jar file? 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.
June 17, 20187 yr Author I ran the gradle build task Then I got the jar from /build/libs/ and I didn't use the sources jar Edited June 17, 20187 yr by TastyCake My username elsewhere is Fluoride
June 17, 20187 yr 3 hours ago, TastyCake said: So I have exported my mod as a jar file. I run it in Minecraft with the latest version of Forge and it's the only mod installed. It never crashed in my Development Environment but outside of that, it is crashing every time. The reason for it is "java.lang.NoSuchFieldError: ROCK". The crash report is on Pastebin here. I appreciate any help as the reason for the crash makes no sense to me. are you using reflection with the deobfuscated name of "ROCK" if so you doing it wrong you need to change the string based on if it's mdk or not
June 18, 20187 yr Author 1 hour ago, jredfox said: are you using reflection with the deobfuscated name of "ROCK" if so you doing it wrong you need to change the string based on if it's mdk or not 1 Sorry but I'm not totally sure what you mean. This is the code I've got public static final Block OBSIDIAN_BLOCK_1 = new BlockBase("obsidian_block_1", Material.ROCK, CreativeTabs.REDSTONE, SoundType.STONE,55, 6250, "pickaxe", 4); And this is BlockBase public BlockBase(String name, Material material, CreativeTabs tab, SoundType sound, float hardness, float resistance, String tool, int lvl) { super(material); setUnlocalizedName(name); setRegistryName(name); setCreativeTab(tab); setHarvestLevel(tool, lvl); setSoundType(sound); setHardness(hardness); setResistance(resistance); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); } My username elsewhere is Fluoride
June 18, 20187 yr Author I just ran the clean gradle task and then ran build again and now everything is working! Not sure what the problem was. My username elsewhere is Fluoride
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.