PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Question : prevent drone teleporting with Goto

Sewef opened this issue ยท 2 comments

commented

It's been a long time o>

As I'm an aesthetic player, I love having some life in my base, that's a reason why I love drones.
There, I want to make a Minecart delivery system (to transport Mana Pool carts from Botania). Problem is : the drone will just teleport. Meh.
Is there any way to prevent this and make the drone flying normally? If not, how many blocks a drone can travel before prefering tp (so I can make a custom path using many goto)?

commented

Disclaimer: drone pathfinding is the part of the mod I understand least well. Minemaarten knows it much better than me :)

Looking at the code, it appears that drones have a max pathfinding range of 75 blocks. Note that doesn't mean 75 blocks directly, but it will search a max path length of 75 blocks (and that path could switch direction many times).

The drone teleports if it can't find a path to its given destination - either the path was more than 75 blocks long, or was completely blocked. I guess that 75 could be made a configurable, but I'd be very careful about increasing it too far - it could cause a severe TPS hit. Looking at other entities, most have a short range of 16 blocks, but a few have a much higher range - 100 for ghasts for example.

Setting a custom path with gotos is probably a better idea, though...

commented

Thanks for the infos!
Maybe I could make some fancy 'checkpoints' stations with some animations when the drone goes in... Welp, I'm getting crazy with this world.