Calemi / CalemiUtils-1.16.4

Utilities that make your Minecraft experience better!
0 stars 5 forks source link

Wallet sometimes turn negative value & spam items when selling at market #6

Open terrytzh opened 3 years ago

terrytzh commented 3 years ago

Hi, I am running a forge 35.1.36 server with CalemiUtils 1.0.2 installed.

People occasionally encounter some bugs when selling at the market in my server, including wallet values turning negative, acquiring instead of losing corresponding items during selling, and consuming no items at all when selling while still able to gain money.

This happen rather randomly, and I'm still looking for a way to reproduce it. No errors / warnings appear in the server console when these issues pop up.

Calemi commented 3 years ago

Hmmm...I'll label this as a bug for now. Unfortunately, I cannot do much without some clear way to reproduce them. Hopefully, a way will show itself soon.

terrytzh commented 3 years ago

Hi Calemi, after observing for a couple of days I've noticed that this bug also occurs to the market's buying function. I think this bug happens most frequently when a player tries to buy & sell if the server is facing TPS lag at that exact moment (I am running ~60 mods on my server and sometimes lags happen) or if the player tries to click the purchase / sell button really fast.

If this happens, the market sometimes fails to check if the buyer has sufficient money in the wallet or confuses what the buyer is trying to buy with another merchandise on the list. An authentic case in my server is that a player tried to buy 10 stacks of dirt (I made 64 dirt a unit in the market) but ended up spending the price of 10 diamonds, and the market bypassed the purchase check & directly subtracted his balance to a negative amount (the interesting thing's that he only got the dirt lol). The market will also occasionally "eat up" items without giving money if a player tries to sell when the server's experiencing TPS lags.

I will continue to keep an eye on it & update my observations here.