MineColonies

MineColonies

53M Downloads

Farmer fields assigment issues

GanthorPrime opened this issue · 3 comments

commented

Minecolonies version

Version: minecolonies-1.12.2-0.10.109-RELEASE-universal. This issue is present from before since i checked old (december) colony backup files and the fields lists in BuildinManager nodes already present duplicates fields positions, etc.

Expected behavior

in a colony with more than one farmer, we desire all farmers balance their assigments based on his hut level (fields amount, and maybe the max distance the fields cant be). Because we start to see fields not used we think maybe is not a trivial logic so we decide to asign all manualy so..

We want to put all our farmers in field 'manual' assigment and asign based on distance and capacity using the gui. we spect the gui shows consistently and clearly in the list, avaible fields in the colony, avaible fields for the specific farmer, and the reason wy you cant assign a specific field. the hud already shows if a fields is already asigned to other farmer, but some buttons are without any info (no coords, no name), and we dont know if is a bug, or if it means something else.

Actual behaviour

Having many issues with field assigment for some time, issues becomes more evident as you add farmers to the colony, or add colonies to the server.

if you have, lets says, 3 farmer, you can see many strange behavior on the field assigment gui, in the fieldblock (scarecrow) and in the data stored in the colony nbt inside the buildingManager node:

  • In Hud there are buttons without any info: no coords, no worker name
  • Not all farmers shows the same list, some shows many fields, other shows less and we dont know wy.
  • In manual mode, this buttons shows as if you can interact with them but they does nothing
  • Some farmers with enought lvl, cant be assigned to more that 1 o 2 fields: you asign one and the list is greyed out as if they reach their max field capacity. checked that there are avaible fields to asign nearby so we dont know realy wy you cant asign more to him
  • In colony data file (ie colony2_0.dat), inside the buildingManager node, the farmers building nodes contains the 'fields' lists and the 'lastField' entry, if the assigments logic uses this lists maybe there is a problem, because i can see duplicated coords on the same farmer field list, and duplicate coords between diferent farmers fields list.
  • If you set all your farmers with, lets says, 2 or 3 fields assigned, the fields lists in the nbt data always contains 5 entries. of course some entries are duplicates of the avaible fields in the colony. maybe the duplicated entries counts agains the field capacity for the hut, but in the guis they shows as blank buttons.
  • in some colonies, you can find fields from other colonies inside a farmer 'fields' list (based on the coords they have)
  • You can see also some scarecrow in one colony with names of workers from other colonies

Steps to reproduce the problem

  1. Build a Colony
  2. Start adding farmer and level their huts, start assigning fields
  3. Put some server restarts betweem
  4. wen you start seeing some weirdness in the guis, go check the colony nbt data and find the duplicates
  5. delete all 'fields lists' and lastfield entry for all your farmer building nodes in the buildingmanager inside the colonyn_0.dat file
  6. make a zip backup of that, start the server, load that backup, apply a refresh to the colony... fields start to appears consistently again, and its seems assigments guis are now correct (making progress...)
  7. play some time, and the issues start showing again at some point.

P.D. step 6 is the only way i found to edit something in the colonies files (colonie2_0.dat) and make minecraft read the changes so i can test them. stop server, edit files directly and start again is not working anymore, if someone know a better way i will be gratefull


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

commented

Just to add, the 'newFields' list in the buildingmanager node on the colony file nevers empties, despite you assign all avaiable fields to farmers. maybe this list is intended to store only the not assigned fields avaible?

commented

@Raycoms fixed with #3325?

commented