Minecolonies & New Patches

in #utopian-io6 years ago

Hey everyone, due to a lot of university work I wasn't able to get much done recently again, fortunately, I was able to free myself a bit from it and I worked on a bunch of small fixes and improvements as well as a few nice additions.

Also, to decrease our issue counter a bit:

Closes #2416
Closes #2415
Closes #2391
Closes #2414
Closes #2355
Closes #2393
Closes #2403
Closes #2407


First of all, I found out that we're having a bunch of issues with citizen mismatching.

That means, the references of the entities we store in the colony do not point anywhere after a while, which causes duplications of workers and also leads to issues when trying to interact with the real entities.

For that reason, I did two things.

First of all, I added that every time a citizen gets marked as dirty and the updated data will be send to the client a detection if this is happening.

Therefore, first, we check if the entity is around, if not we will have to get a new entity and possible spawn one.
Then, we compare the entityId we have saved with all entities which match the citizen in the world.
If there is a mismatch we update the reference.

Then add the update method of the citizen.

We do basically the same thing if anywhere in the code we need something similar.


The next issue has been that, certain players don't get added well to the colony after a restart.

That happened because some of them don't exist (fake players) and for some, we couldn't get the game profile.

The fix of that was quite easy, just additionally storing the name of the player(or fakeplayer) when we save it and then when we detect the player is null, we just add it with the name directly.


Then, there was an issue when people executed the /whereami command and were close outside of the colony it would tell the player it is inside still.
That was an easy fix, since we had the wrong check in the if beforehand.


Some players asked for the possibility to have custom mine shaft designs.

For that reason, I added that when the miner chooses the shaft design he will try to find a shaft design matching his hut design.

We'd do that but checking if the shaft style exists in general, by trying to load it.
If that doesn't work, he'd default to the default style.


Then, I added a bit of additional info to our raid messages.

Which also requires the colony name as an input.

And, I added a missing name as well, while doing that.


Afterwards, I fixed a nullpointer exception which crashed the GUIs of some players.

Which happened since in some cases the maps do not have all the possible items and therefore, a get would cause the exception.


Additionally, one of our long time players reported that our config values with "minDistanceFromSpawn" and "maxDistanceFromSpawn" did controll the random teleport command but actually didn't restrict colonies from being placed.
Therefore, I added that check to the placement code.

Which actually caused our placemen tests to fail.

And, therefore, I had to add to the placement test, that it should always try to place the colony far away from the spawn to make sure it gets placed.

Additionally, I uploaded a bunch of the building schematics which had been wrong.


Last but not least important I finally added a complete overview of all citizens to the townhall GUI.

This will allow the player to see a list of all citizens, with their stats and allow the player to recall them individually.

Until now the player had to recall all at once.

For that reason, I generalized some of the existing citizen GUI code to be able to reutilize it.

For the xp bar.

and for the skill setup.

Which allowed me to call those 2, to fill the info in the townhall GUI easily without having to reinvent the wheel.

First of all, we get enable all buttons and then get the view the button has clicked.
Then we enable the box to show the info to the player.
Afterwards, we disable the button, so the players knows which citizens info he is viewing.
Afterwards, we fill the GUI with the information and add a hidden id.

The hidden id we'll need to detect which citizen the player will want to teleport.

On clicked button, we retrieve the hidden ID and send a message to the server to teleport said citizen to the townhall.

I hope you guys like those new, features and changes.
Minecolonies is starting to get really stable now.
In the last days after I returned to work on it, I asked the players for important issues I should fix, and people had a really bad time trying to figure out what they'd need right now.
Additionally, when our official servers runs into performance issues this usually happens because of an other mod and not minecolonies which is also a really satisfying experience.

The pull requests:
https://github.com/Minecolonies/minecolonies/pull/2427
https://github.com/Minecolonies/minecolonies/pull/2425
https://github.com/Minecolonies/minecolonies/pull/2422

Until the next time!

Sort:  

Hey @raycoms

We're already looking forward to your next contribution!

Contributing on Utopian

Learn how to contribute on our website or by watching this tutorial on Youtube.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.gg/h52nFrV

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Excellent work done by you bro. wish you a very best of luck for your project

it is very helpfull post, thanks

an excellent work of programming

Loading...

Coin Marketplace

STEEM 0.30
TRX 0.11
JST 0.033
BTC 64223.84
ETH 3158.34
USDT 1.00
SBD 4.29