Jump to content

GetPrivateValue is giving me a recompile error


RaustBD

Recommended Posts

I've just installed forge to my development environment for modding, and I've encountered a strange set of errors that didn't happen when I just used ModLoader:

 

 

== ERRORS FOUND ==

 

src/minecraft/net/minecraft/src/forge/ForgeHooks.java:359: warning: [deprecation] net.minecraft.src.forge.ISpecialMobSpawnHandler in net.minecraft.src.forge has been deprecated

    static LinkedList<ISpecialMobSpawnHandler> specialMobSpawnHandlers = new LinkedList<ISpecialMobSpawnHandler>();

                      ^

 

src/minecraft/net/minecraft/src/forge/MinecraftForge.java:164: warning: [deprecation] net.minecraft.src.forge.ISpecialMobSpawnHandler in net.minecraft.src.forge has been deprecated

    public static void registerSpecialMobSpawnHandler(ISpecialMobSpawnHandler handler)

                                                      ^

 

src/minecraft/net/minecraft/src/EntityDTDoggy.java:2564: exception java.lang.NoSuchFieldException is never thrown in body of corresponding try statement

      catch ( NoSuchFieldException nosuchfieldexception )

      ^

 

1 error

2 warnings

==================

 

 

 

The first two warnings strike me as odd because I haven't added anything that uses them yet.

 

The last one doesn't seem to be correct, as here's what I have for the method in question:

 

 

public Entity getCurrentTarget(EntityLiving entityliving)

  {

Entity target;

 

      try

      {

          target = (Entity)(ModLoader.getPrivateValue( EntityLiving.class, entityliving, 79) );

          return target;

      }

      catch ( SecurityException securityexception )

      {

          throw new RuntimeException( securityexception );

      }

      catch ( NoSuchFieldException nosuchfieldexception )

      {

          throw new RuntimeException( nosuchfieldexception );

      }

    }

 

 

 

The nosuchfieldexception is clearly thrown there.

 

Anybody have any idea what's going on?

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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