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

I noticed the potionTypes array has a limited amount (32) of potions a mod can add. Can Forge increase this array to a number big like 4096 so there won't be potion ID conflicts? I currently have two potion effects and 2/32 is a lot (not counting the vanilla potions).

 

I could do a pull request if you want.

I don't seem any people using this, but, even in your own code you could easily expand this array to whatever you want.

If your mod uses ids that are > then the current size, resize and preserve the array.

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

I don't seem any people using this, but, even in your own code you could easily expand this array to whatever you want.

If your mod uses ids that are > then the current size, resize and preserve the array.

 

Yes but that counts as modifying base files which is not really a good way to do it...

 

Correct me if I am wrong, but what you are telling me to do is to change Potion.potionTypes[32] into [4096]? Or do you mean something else? I can't change the array because it is public static FINAL so it's not replaceable...

It is totally replaceable, go learn how!

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

Not unless you're a moron.

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

What Lex means is that through reflection you can resize it if it is too small for your use, without base edits.

 

Thank you. Now that was actually helpful :) I didn't know what reflection was until you mentioned it.

Reflection is one of the black magics of java (the other being custom classloaders).  It can bypass security restrictions, change the unchangeable, and easily make you incompatible with other things that use reflection on similar things if not careful.  ;)

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.