stfwi / engineers-decor

Engineer's Decor
MIT License
35 stars 16 forks source link

Non full blocks messing with entity pathfinding #116

Closed KrAzYGEEK32 closed 4 years ago

KrAzYGEEK32 commented 4 years ago

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 :)

stfwi commented 4 years ago

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

Related issue: https://github.com/TeamPneumatic/pnc-repressurized/issues/564.

stfwi commented 4 years ago

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

KrAzYGEEK32 commented 4 years ago

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