Engineer's Decor

Engineer's Decor

19M Downloads

Non full blocks messing with entity pathfinding

KrAzYGEEK32 opened this issue ยท 3 comments

commented

so, ive noticed this issue with pneumaticraft drones getting stuck in treated wood poles, i reported the issue to their tracker, they redirected me here and asked me to mention this:
If your blocks don't have a full block shape (specifically, if Block.isOpaque(shape) returns true for your block's collision shape), but the block has an entity-blocking collision box, then entities will get very confused when trying to pathfind around your blocks - they think they can path through, but just get stuck forever.

Solution is to make sure that Block#allowsMovement() is properly overridden for any such blocks. A simple implementation would just be to return false for any block which has a non-empty collision box.
hope this helps in improving the mod :)

commented

Hi, ok thanks for the hint, I'll reference the PC issue FTR and implement the fix.

Related issue: TeamPneumatic/pnc-repressurized#564.

commented

Ok easy going, fixed for v1.1.1-b7. Basically all blocks except the lights and the signs are now not-passable.

commented

Thanks for the quick response, and I'm happy I could help