MineColonies

MineColonies

57M Downloads

Miner pathfinding issues in large mine

Thielquis opened this issue ยท 13 comments

commented

Minecolonies version

Version: minecolonies-0.10.669-BETA-universal

Expected behaviour

Miner working in the designated level expanding his mine.

Actual behaviour

Miner idles at the surface position above his target in the mine.

Rought position of the mine entrance (hut block)
mine pos

Rought position of the idling miner
miner idle

Guessed target position for the miner (mine direct below him)
miner target

Status of the idling miner
miner info

Node overview of the mine
nodes

This behaviour started when his mine became "too" big and I guess that the X&Z distance outweighs the Y distance in his pathfinding (I don't know your actual implementation).
Also when I dig him down (mine straight down on the place where he stands) he continues to work as usual until it's night or he is hungry (or in any way returns to the hutblock).
Other levels in his mine work normally (till now).
There are no blocked paths in his mine nor is he missing any items.

I hope this is no duplicate or intentional, but I couldn't find any similar issue.

Steps to reproduce the problem

  1. Create a mine on any level (couldn't find and connection there)
  2. Let mine grow for quite some time
  3. Miner starts to "idle" when he aims for far away nodes
commented

No, pathfinding in the tunnels works perfectly, the problem is if there is gravel in the path or something else blocking the path, try to check there in the mines, I'm sure you'll find some gravel blocking his way somewhere.

commented

Sadly no solution here.
I had this problem on earlier levels of the mine so this was the first thing I checked.

But I just re-checked the whole level on Y: 11 and there was nothing. All tunnels (even those not leading to the current target) were completely clean. Not even one block to be found.
I checked with spectator mode and by going down from his hutblock on foot. No issues there.

start
next
target

The first part from another angle
otherangle

Does the floormaterial matter? Some parts were made out of gravel. But everything on the same y-level

commented

It shouldn't, he doesn't really path long underground, we take the floormap he used to create that node and then path through those, so he might not try to take the direct path to it.

commented

Is there any way to visualize (or somehow check) the floormap to check for errors or corruption there?
Because the whole mine level seems perfect (not even water or lava in sight), all walls, floors and ceilings are just as in the schematics.

commented

you can try to turn on pathfinding rendering so see what he is trying to do.

commented

Took me a while to move the map to my computer to check the pathfinding in singleplayer (it didn't work on multiplayer), but it seems that there is some problem with a node in this part of the mine level.

When I manage to get the miner to finish the current node that causes the problem (dig him down) en then continues to work on a new node on the other side of the level. (even recalling and forcing him to path down there again works just fine then).

But once he tries to work in this problematic area of the level again the same issue occurs.

Is there any way to recalculate the floormap?
What would happen when I reconstruct a new mine on top of the current mineshaft?

Otherwise, I would have to remove the mine and regenerate the underground to create a working miner.

commented

This issue is so strange. There is no broken node.

I continued to experiment with his pathfinding.
I tried to increase is pathlength to his surface "idling" position (somewhere close to the city wall on the picture) by blocking the direct paths (see picture). The hutblock is still accessible from a path on the backside of the hut (dmans reached him).
update

And now he takes all paths down into the mine. On every node I've observed so far. (even close ones to the earlier problematic one)
UPDATE: This only works when he starts on the hutblock. If he comes from the city, he still prefers his surface position close to the wall.

Is the complete pathfinding from hutblock to the underground node, so including the main shaft, covered by the robust floormap pathfinding?

commented

The pathfinding should be -> correct y position in the main shaft -> then horizontal searching.

commented

Yeah thought so.
Then I don't have the slightest clue why it doesn't work in this case.
I have observed and experimented with this for so long now that any building error (block in the path) should've been found.

Welp. If you have no idea either, we can close this issue.

commented

Could you send me the world? Are there a lot of mods in it?

commented

Sure can, it will take quite a while to upload somewhere since this is a map from a server with quite a bit playtime (but luckily few people).
No, only minecolonies with the newest 1.14.4 version (I updated to minecolonies-0.10.680-RELEASE-universal in hopes of any weird cross-behaviour of some other problem) and worldedit (should be no issue)

I'll send you a download link on discord when I'm done uploading.

commented

okay, that sounds good, should allow me to test it will. I will need the colony id still to teleport there and add me to it.

commented

I just started running into this as well. There doesn't seem to be any gravel that's fallen into the mine below near the location where they were working. Pause also doesn't seem to work, though it doesn't seem to work on anyone, so that could be unrelated. I have to fire the miner and reassign them to another building and do a recall (in that order) to get the behavior to stop. I'll be leaving them doing other things for now since I provide tools and other mats myself anyway.

Forge 2847
Minecolonies 0.10.654-BETA