Jump to content

ItsTheKais

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ItsTheKais's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Well... out of curiosity, I did some more tests in an actual Minecraft world (random terrain and caves and all). The pathfinder seemed to work much smoother under those circumstances, figuring out paths through winding caves at least mostly-reliably? I can't think of why it would work better in a chaotic, randomly-generated environment than in my test world with simple single correct paths to follow, but I guess that means I have a lot of learning to do. I might take a crack at writing a new pathfinder, but that's getting filed under "maybe in an update" for now. Thank you for your advice.
  2. So, I have an EntityTameable that can be told to search for a block. When it finds that block, it tries to walk as close as it can to that block, using getNavigator().tryMoveToXYZ([block coords + one y level]). Only, if the target coordinates are above the entity, the entity's navigator seems to prioritize a short path that takes the entity below the target over a longer path that will actually reach the target. Example: In this setup, if I spawn the entity on the ground and tell it to find emerald ore, I expect that it should climb up and around the quartz path to stand on the emerald ore, since that's as close as possible to get to it. Instead, it just moseys over next to the base of the pillar (which is directly underneath the ore) and calls it a day. It looks like this isn't only an issue with my implementation, either; I made a tamed wolf and a cow follow me, and neither of them would attempt to climb up the path to get to me unless I was within ~5 blocks of the start. This implies to me that the problem might not just be me using the pathfinder incorrectly... I have tried: As a test: moving the entity partway up the path and starting there; success varied but the entity seemed more likely to jump off and hug the pillar the closer it was to the bottom. As a test: moving the entity to the top platform and having it find one of the ores on the ground; it correctly walks the entire path down to the ground. As a test: moving the entity to the top platform, building extensions that would allow it to stand directly above the ores on the ground, and having it find one of those ores. It still walks the entire path to the ground to stand right on the ores. Downhill does not seem to have this pathing problem. As a test: building a small labyrinth on flat ground and having it find a block at the end; it's a little confused at first and wanders around the outside wall near where the block is, but after a few seconds it figures it out. Seems to work well enough on flat ground. Verifying that the AI is indeed finding the correct block and sending the navigator the correct coordinates. Increasing the entity's follow range to 64, then to 128. I saw that this value was used for something like pathfinding range (?) and guessed that this might encourage the entity to pathfind for greater distances. I verified that the path range changed using GetNavigator().getPathSearchRange(), but it had seemingly no effect on the pathfinding. Going around tryMoveToXYZ() using some of the other PathNavigate and PathNavigateGround methods, which at best gave the same results. Extending EntityAIMoveToBlock and attempting to use it. (EntityAIMoveToBlock apparently does not path vertically at all, worthless!) TL,DR: my fatass pet is too lazy to climb the damn stairs, wat do?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.