Jump to content

Recommended Posts

Posted

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? 

Posted

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. 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted

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.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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.