-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pathfinding across bounds #38
base: develop
Are you sure you want to change the base?
Conversation
because why not
In regards to your clip checking, that is handled by |
Also, pathfinding no doubt does chunk requests to figure out what blocks are ahead. Those chunk requests will have to be wrapped so the entity isn't instantly confused when they cross the bounds. |
Although when their cached pathfinding coordinates are suddenly invalidated when they cross the bounds by having their unwrapped coordinates wrapped, that would also cause problems. |
Oh that's great, I also while testing got confused how does it work. I placed a wall of dirt on opposite side and entities haven't attacked me. That would make sense now. |
Could you link that part of code? I am confused, can't find it. |
|
For some reason, the mob doesn't turn their face (even though their body is turned) to face the player until after they cross the border. The |
I think it does, just math is wrong |
I believe delta is what we need there Although still not sure to why heads are rotated sometimes
Okay head rotations seems fixed now, looks like - i believe - the old mojang code uses |
I believe pathfinding/detection/looking at; is overall patched now. However attacks depending on mob will be broken, many mobs have to be patched individually, unless you have some better idea? E.g. Llama Many mobs, like llama will need a patch to modify x, z coords of their target to a proper delta literally a copy-paste of skeleton attack patch Also mobs that i already can confirm which will need it (all implementing
And the worst thing, probably many modded mobs would require similar patches, its a mess... |
I think something like creating dummy entity class extending entity class could work. This class would hold fake coordinates of the target entity but relative to the mobs' coordinate space. I suppose it could work because essentially all of computation related to that issue is based on target entity from where it gets the x, z. However i have one concern with this approach, there is likely quite a bit higher memory usage due to how many variables entity class holds. |
We can't use |
Here is an issue I discovered with pathfinding. In the first zombie spawn, I am not at the bounds. In the second zombie spawn, I am at the bounds. This doesn't occur when the wall is right at the border of the bounds, but just a block before the bounds. |
* Added missing rename * Simplified client-side checking methods * Fixed issue with survival players getting stuck on bounds due to strange collisions with blocks. --------- Co-authored-by: Famro Fexl <[email protected]>
Mobs' pathfinding and enemy detection now work across boundaries.
Depending on the mob, it might also need additional patches for attack across bounds to work. For example, all mobs that implement the
RangedAttackMob
interface will need a mixin to adjust the x and z coordinates; a skeleton is one such example.I also updated the dependencies to the latest stable version.