MineColonies

MineColonies

65M Downloads

Builder's picking up the same Build request overriding the select builder button

Closed this issue · 5 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.20

MineColonies Version

1.20.1-1.1.992

Structurize Version

1.20.1-1.0.777

Related Mods and their Versions

No response

Current Behavior

After placing a block or decoration and selecting a builder to build it the other builder also picks up the same job and they start building together.

Expected Behavior

only one builder would build a select building at a time

Reproduction Steps

  1. join a world
  2. start the construction of a decoration or a building
  3. watch as both builders start the same job

Logs

https://gist.github.com/Dark11250/f7a8fa9fba3e20a583dd3faa786f6ecb

Anything else?

No response

Footer


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.
commented

Image Builder 1

Image Builder 2

commented

Were they assigned with the newest version, or before it?

commented

they were assigned with a older version but I removed and replaced the block and it still forces to both of them. Same thing happens with new Decorations.

commented

Something tells me some logic is not entirely correct near the automatic work order pickup code

  // ...
 && (building.getPosition().distSqr(getLocation()) <= MAX_DISTANCE_SQ
                 || (isClaimed() && getClaimedBy().equals(building.getPosition())));

If I read this correctly, this means that builders who have the correct builder’s hut level can always pick this up, if it is within the MAX_DISTANCE range. Even if it is claimed by someone else
Shouldn’t this be something like

  // ...
 && ((building.getPosition().distSqr(getLocation()) <= MAX_DISTANCE_SQ && !isClaimed())
                 || (isClaimed() && getClaimedBy().equals(building.getPosition())));

Such that it can only pick up within the distance if it is not claimed?

commented

i was thinking it could be that the builders got linked together in code accidentally. could be what train said