PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Drones get stuck on partial blocks from other mods

KrAzYGEEK32 opened this issue ยท 5 comments

commented

For feature requests, just erase this template and clearly describe the feature you'd like to see

Minecraft Version

1.16.1

Forge Version

32.0.88

Mod Version

2.0.0-4

Describe your problem, including steps to reproduce it

drones seem to get stuck on partial blocks while pathfinding
2020-08-06_16 21 15

Any other comments?

this seems to happen with modded partial blocks, i have a bunch of bamboo planted in the area, and drones never got stuck on them( might be a coincidence idk), maybe just treating them as full blocks might solve the issue.

commented

Yep, as I thought. Their blocks are non-full, have a collision shape, but they don't mark their blocks as not suitable for pathfinding, so the drones will try to fly through them and get stuck. Raise github issues with those mods, quoting 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.

commented

Probably those mods not properly defining pathing properties, but I would need to know which mod and which block to confirm.

commented

that particular block is Straight treated wood pole from engineers decor, i also noticed a similar issue with stone pillar from decorative blocks

commented

Hi @desht, thanks for cross-checking, I'll implement the fix.

commented

ok ive made issues on their git :) thanks for the response