Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6724619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:42:40+00:00 2026-05-26T09:42:40+00:00

I am working on a fix for a mod for the game minecraft. but

  • 0

I am working on a fix for a mod for the game minecraft. but there is a catch. The mod is not made by me, so i have to decompile it

To make a long story short, this is my first time working on obsfucated, noncomplete sources.

I am only gonna edit ONE file (out of around 1.5K).

It decompiled fine, and i edited what i wanted, but now i can’t compile it. I am using the classpath variable to point it to the jar, so i can still use the classes from the rest of the game. but 2 errors exists, both involving “.getDeclaredField(s)”.

Code:

public static Minecraft getMinecraft()
{
    try
    {
        Field field = Minecraft.getDeclaredField("a"); // Error here
        field.setAccessible(true);
        return (Minecraft)field.get(null);
    }
    catch(IllegalAccessException illegalaccessexception)
    {
        illegalaccessexception.printStackTrace();
    }
    catch(NoSuchFieldException nosuchfieldexception)
    {
        nosuchfieldexception.printStackTrace();
    }
    return null;
}

The other case is just like this, so no need to show you that.

Error log:

TMIUtils.java:23: cannot find symbol
symbol  : method getDeclaredField(java.lang.String)
location: class net.minecraft.client.Minecraft
Field field = Minecraft.getDeclaredField("a");

How will i go about fixing this? (keep in mind this is the first time working with getDeclaredField too)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:42:41+00:00Added an answer on May 26, 2026 at 9:42 am

    It should be

    Minecraft.class.getDeclaredField("a");
    

    Perhaps it’s a decompiler’s error.

    getDeclaredField() is a method of type Class, and Minecraft.class is a literal value of that type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried <input type=file value=path... /> but not working. How to fix?
jplayer is not working on mozilla and opera. Is there any chance to fix
Out of my head. How to fix this one. My session not working on
I have a div fix on bottom of the page it is working fine
Function letswin() not working. I couldnt find a way to fix. var pathArray =
Does anyone know of a working fix for the ie z-index bug? I have
I've got a jQuery selector thats not working desipte my best efforts to fix
MAJOR UPDATE: I have a PNG fix working on the site. When I remove
I've looked through similar questions but not found the exact working solution I'm after.
Update: Microsoft have now reproduced the bug and are working on a fix. Whilst

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.