PulseBeat_02 Posted August 23, 2018 Posted August 23, 2018 Hi, two weeks ago, a forge staff member told me that increasing the potion ID limit is impossible to accomplish. However, someone told me that there is a possible way, but it is messy. This is what he said: "It is possible, You can just add a new field in the packet containing the real ID as a short or int, and then bypass the getter or the instruction fetching the byte everytime it is used to get the integer instead, but that's just an horribly convoluted and hacky solution.There's a bunch of someInt & 0xFF instructions that need to be removed as well, scattered around the potion handling code, I've seen them in the EntityPlayerMP class, but I'm almost positive there are other instances around." Does this actually work? Quote
jabelar Posted August 24, 2018 Posted August 24, 2018 One way to possibly trick it is to "rob" a couple bits from the duration, in other words assume that very long durations aren't allowed you can use the highest order bits to extend the range. For example, you could have four times the IDs by using two bits, which would limit the duration to about 6k. And this could just be done on your custom potions if it made sense. Maybe wouldn't work, but based on the SPacketEntityEffect, the duration seems to be the most accessible field that has probably more bits than needed. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
jabelar Posted August 31, 2018 Posted August 31, 2018 One other thing is that you can also create your own system of potions. Basically you create a capability for your custom effects and use custom packet to apply it. At the end of the day the potions are just an item, and so you can use custom item techniques to make similar behavior. Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Recommended Posts
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.