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

In previous versions, new classes in "net.minecraft.src" would have their package stripped upon recompilation (like other minecraft classes).

 

However, in the newer version, new classes in a specific minecraft package (i.e. "net.minecraft.nbt") will keep their packages upon recompilation, possibly causing errors (especially when using these classes to access protected methods and fields).

Short answer, if you're putting ANY of your code into net.minecraft.* you're doing it wrong, as we will not support you.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

And if you need to access protected stuff, AT is your friend.

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

  • Author

It's just to access protected methods/fields... Why write a access transformer to change the visibility of three methods? And reflection is even uglier.

 

Is there any easy way to add an access transformer to an existing mod?

Typically, if you need to access package private things, you're doing it wrong.

If you absolutly MUST access package private things you should use reflection.

If you ABSOLUTLY MUST access package private things repeatidly and you think that it is something other modders would like to have access to, submit a PR to get it on the official AT list in forge, or write your own coremod.

 

But, in reality, 99% of the time when a modder thinks they need to do something stupid like that, they are wrong.

 

Explain what you are doing and someone will probably point you in the right direction.

 

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

Alright, so I use this functionality in a couple of mods to access protected methods -

 

NBTEdit mod - call write, load, and get the Tag map (can probably use some vanilla methods + 1 reflection call here)

Mob Spawn Controls - access the spawn list fields in order to modify vanilla spawning (only option here is reflection or AT)

 

Mob Spawn Controls - access the spawn list fields in order to modify vanilla spawning (only option here is reflection or AT)

or, you know use the functionality fml preovides...

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.