Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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.

  • Author

I ran the gradle build task

Then I got the jar from /build/libs/ and I didn't use the sources jar

Edited by TastyCake

My username elsewhere is Fluoride

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

  • 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

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.