Posted June 24, 201213 yr 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. http://calclavia.com/uploads/banner.png[/img]
June 24, 201213 yr 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
June 25, 201213 yr 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... http://calclavia.com/uploads/banner.png[/img]
June 25, 201213 yr 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
June 25, 201213 yr Author It is totally replaceable, go learn how! That might defeat the purpose then because other mods who wants to use potions would be overwritten by my potion replacement... http://calclavia.com/uploads/banner.png[/img]
June 25, 201213 yr 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
June 25, 201213 yr Author Not unless you're a moron. I am pretty much on potions. But thanks for your help anyway. I will look into it. It was very helpful. http://calclavia.com/uploads/banner.png[/img]
June 25, 201213 yr What Lex means is that through reflection you can resize it if it is too small for your use, without base edits.
June 25, 201213 yr Author 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. http://calclavia.com/uploads/banner.png[/img]
June 25, 201213 yr 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.