Minecolonies & Bug Hunting #2

in #utopian-io6 years ago

Even after the last bug hunt, still some very missing and some issues stayed on our github like:

https://github.com/Minecolonies/minecolonies/issues/1797

So, for a reason our workers weren't working.
I took a look in our code and I noticed:

This seems correct on the first look, but on the second look:

The boolean was messed up, so a simple "!" in front of it, fixed it.


The next thing I noticed, was that our workers were only happy when they got the full amount they needed. Which is okay, but not very efficient because he could continue working.
I shortly found this gem:

In the first line we compare the itemStacks ignoring the stackSize and then we compare the stacksize?

Fortunately the fix is easy, I just removed the stack size comparison.


A few days ago a player from our official server messaged me and told me that everyone is able to call barbarians raids for all colonies. (If some people would discover that, that could lead to some bad griefing).
Therefore, I had to turn off all minecolonies commands for a time frame until this is fixed.
The problem was, that we never really checked if the player is actually an admin.
For some reason we only checked if the player is the owner of his colony.

Which was easy to fix as well, fortunately.


Then, I noticed that when the same building issues two requests, both of them would be switching places in the GUI all the time, leaving me kinda dizzy.

The code for sorting it in the GUI seemed quite straight forward and I didn't notice any problem with it on the first glance.
I only later noticed that we didn't implement hashCode for the IRequest which resulted in the same integer for all requests.
The fix was actually quite simple as well:

Since the Token of the requests is a unique String we can easily get a hashCode from that one.


Besides that I added some more logging in the case if something goes wrong with certain deliveries and I added a missing recipe for our clipboard.
Finally, I had to add that our citizens requests a cook even if the building chest is placed, but if it wasn't constructed yet.

I hope this was the last big bugfix pr for that.

See you the next time!



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @raycoms I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • You are generating more rewards than average for this category. Super!;)
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations @raycoms, this post is the eighth most rewarded post (based on pending payouts) in the last 12 hours written by a User account holder (accounts that hold between 0.1 and 1.0 Mega Vests). The total number of posts by User account holders during this period was 3352 and the total pending payments to posts in this category was $3691.34. To see the full list of highest paid posts across all accounts categories, click here.

If you do not wish to receive these messages in future, please reply stop to this comment.

Wonderfull contribition
Thanks

Coin Marketplace

STEEM 0.36
TRX 0.12
JST 0.040
BTC 70446.49
ETH 3571.68
USDT 1.00
SBD 4.73