Minecolonies & Bug Hunting #3
utopian-io·@raycoms·
0.000 HBDMinecolonies & Bug Hunting #3
Hey everyone, after the last bug hunt we had resolved a lot of the issues and another developer also started his own bug hunt which resolved most of the remaining issue with our new systems. Nevertheless, a few problems remained I wanted to tackle here. A few players reported that their game started to hang and they weren't figuring out what's happening, I started the game and after a short time nothing was moving anymore as well, so I suspected an infinite loop somewhere. (Since The Minecraft World runs only on 1 Thread).  After printing a thread dump in Intellij I found this above. The fix was easy, I made it > 0 and not >= 0 and it started to work accordingly. While debugging the above I also found this baby:  Nicely done, if the player is in creative is should send the amount in the inventory of the item and not the total count, well done. Then I found out that in our entity spawning code we were not checking if the worker got the items already and only requested them. And we even have some nice utility methods which do all of this at the same time!  This allowed to remove quite some duplicated code and to make it work accordingly. Besides that, players were reporting an issue about requesting air. Hmm, I found out that empty containers are full of air and our builder tries to fill them. That fool!  So I had to check if those items are empty (Empty == air or null) which also solved this issue. Last but not least, players were reporting that our guards don't path very far away from the barracks, so I increased the amount of tries they have to find a nice position.  While debugging this I also found a nice client crash when randomly opening the clipboard. It seems like minecraft is doing funny things with the GUIs and ended up not loading the world on the first tick in the GUI. > Ticks are the measurement of time in minecraft, everything ticks, and 20 ticks are 1 second. So I added a saveguard which says "do nothing while the world is null". Also one crash less. So, we're only missing one more, small bug in the request system to have it finally completely stable. Looking forward to finally putting it on the server. <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@raycoms/minecolonies-and-bug-hunting-3">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>
👍 sweetparlot, reggaemuffin, smailjac, makki420, cryptonewslife, ethoss, minecolonies.utp, kmart, katesmith, wreckedem, elmessoudi, alexander01cor, sedkaranfil, birrulibmc, protiumdesign, digi5952, htxls, aleross, ecoman1, robertlyon, lrbitcoinguy, helo, brainfarts, utopy, gtpjoker, davidmendel, travelpamore, mkt, ms10398, alanman, caroliny, hydr4, bobsthinking, arcjen02, utopian-io, donysamdhila, hirsliturna, an0na, alfanerd,