PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Drone teleport buggy

gamelnderGamler opened this issue ยท 4 comments

commented

Minecraft Version

1.12.2
(All the Mods 3)

Forge Version

1.12.2-forge1.12.2-14.23.1.2587

Mod Version

pneumaticcraft-repressurized-1.12.2-0.4.0-136

Describe your problem, including steps to reproduce it

The Drone should build something far away. So normaly the Drone picks up the items and teleports to the building place. (The building place is about 90 blocks away from the chest)
But the drone starts the teleport but the telport dosent finish. After that the drone flys in a straight line to the location it wanted to teleport to. If someting big is in the way the drone gets stuck and keeps spaming its teleport but never teleports. This happens on the way to the building place and on the way home.

The drone teleport does work. Had a drone wich should collect oil and while doing it, it teleported behind a wall to collect the oil there. (program: https://pastebin.com/MM3LjphK)
But somehow it isnt working while building.

Thats the program iam using (but dont think its the programs fault): https://pastebin.com/q0yY120j

The picture is taken while the drone trys to get to the chest, which is behind the building, to get new blocks. (This happend after the drone tried to teleport but "couldnt" and so it flew a straight line into the wall). You can see the teleport animation, but the drone wont teleport:

drone teleport

Any other comments?

I want to help with my bug reports. But if you get annoyed or dont want to read my bad english anymore, be honest and tell me. I dont want to annoy someone who did such a great job on making the mod viable for 1.12.2. ;-)

commented

Don't worry about raising bug reports, we always want to hear about problem so we can fix them... and your English is fine!

I'll take a look at this, but I may end up deferring to @MineMaarten who's way better with the pathfinding code than I am :) Interesting that the problem only occurs when building. One thing to check: does the drone have enough pressure? Teleporting takes a large amount of air.

commented

OK :).

Yes the drone has enough pressure. For every teleport attempt it uses the amount of pressure it would use for a complet teleport.

Hmm, it happend all the time first so i decided to write this report, but now it is working sometimes (one time it flew the straight line and teleported, while moving forward, after it flew the half way), which makes it hard to reproduce.

While the drone stucks in the wall it still wants to move and teleport. So maybe if you make sure the drone cant move while teleporting it would help with the problem.
But thats just a random guess and i dont have a clue.

commented

Wow that was fast.
Ok, that explains the random behavior.

Thank you, i think i am able to replace my lost air :-)

commented

Ok confirmed and fixed! Basically what happens is that for the Place Block (and a most other commands) Drones try to fly to a block next to the target block. This can be either six sides.

  1. Drones try each of the 6 sides and picks the first one that the drone can pathfind to. (if the destination is air).
  2. If no side is valid (or if the drone is too far away), it should pick the side that has an air block next to it and teleport there.

Due to a bug it was always picking the last position it was trying to teleport to, instead of the last position that had an air block. This happens to be the east side of the block that's going to be placed.

TL;DR: If the block on the east side of the 'to be placed' block is not air, you encountered this bug. This is why it was not consistent (I had to toy around before I was able to reproduce it as well).

Our condolences for your loss of air