BananaFructa / Apec

A Gui improvment mod for Hypixel Skyblock
Mozilla Public License 2.0
76 stars 24 forks source link

Potion effect duration calculation is incorrect #6

Closed Mrkol closed 3 years ago

Mrkol commented 3 years ago

Title says it all. The top one is from apec, bottom one from SBA. The SBA one is correct, checked it via active effects menu. image

Mrkol commented 3 years ago

P.S. I'm no java expert, but starting a thread to wait for something to happen in a loop is beyond bad practice in any language. Please consider subscribing to some kind of "on inventory updated" event instead. Hopefully modern forge has something like that. https://github.com/BananaFructa/Apec/blob/3ded426c2eb1d772da54ee4542c89ac9d313fd2c/src/main/java/Apec/PotionFetcher.java#L196

BananaFructa commented 3 years ago

Over large periods of time there will be time difference since there is a client side timer for measuring time.As for that piece of terrible code I am very much aware of it since i first wrote it but decided to keep on it due to various reasons that's why the potion fetching from the effects menu method will be most likely be removed in the next version and the only effect display that will be available will be the one which just shows the effect pinned in the tab menu.