PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Drone cannot chose what to Dig

Sewef opened this issue · 22 comments

commented

Minecraft 1.12.2

forge-1.12.2-14.23.2.2624

pneumaticcraft-repressurized-1.12.2-0.5.1-163

It looks like I am spamming :-Đ

What I did :

  • Dig piece to an area, with an Item filter (Ironwood Leave, no metadata match)
  • Goto charging station

What it was supposed to do :
Break the leaves, go back to charging station until there's new leaves block in the Dig area

What it do :
It's pretty random, but I got this in the 3 Dig options (Closest, Low to High, High to Low). At any time, the Drone can hesitate between 2 blocks in the same layer and start making round trip between them without breaking anything. I don't know if it happens when I'm far away or any time.

commented

Chapi - The Leaves Breaker
Program here : https://pastebin.com/trNMxdF6

commented

Haven't been able to reproduce this one in my test world, but these odd pathfinding problems do crop up from time to time...

commented

I tried to reproduce this yesterday but I failed.
It happens randomly when a tree is growing near the drone when it's breaking leaves on the same height, or something like this

commented

Yeah, sounds like a pathfinding problem. This could be difficult to track down since it will be hard to reproduce reliably, but we'll try...

commented

I set up a Programmable Controller to break the leaves.
Drones are breaking logs too slowly so I have a Builder to replace them, so Chapi is pretty cosmetic and I don't care that much. At least the issue is reported c:

commented

Hmm I also haven't been able to reproduce it with Vanilla Oak trees, at least. I can try with the Ironwood, from which mod are these? Maybe the leave decay states are implemented differently with this mod, having different blocks for the different states. This would confuse the item filtering. I doubt this is the case, but I'd like to rule this out.

commented

Ironwood is from Rustic (https://minecraft.curseforge.com/projects/rustic). The Fast Leaves Decay mod works with Ironwood, by the way

commented

Thanks! I however still can't really reproduce it :(.

If it's a pathfinding issue, using the Programmable Controller instead of Drones should resolve your issue... Could you try those and see if the problem occurs again after that?

commented

Have you equipped your drone with an axe? That makes a big difference to the speed at which it will break logs (although you would need to manage the axe's durability, or get an unbreakable tool).

commented

...
Drone can be equipped ? Ok then XD

commented

Yep, regular drones can use the Import From Inventory puzzle piece to grab any item from a chest. And the Programmable Controller can accept items on any side except below, and the items will go into the fake drone's inventory (the below side will access the actual Drone or Network API item in the controller block).

And you can increase the drone's inventory size with Dispenser Upgrades (if you want the drone to carry more than one item).

commented

With an axe, it's really faster ♥ ♥ ♥

So, tried again aaaaand
https://www.dropbox.com/s/in9qhhz0qr1jio6/Minecraft%201.12.2%2018_04_2018%2020_01_10.mp4?dl=0
What am I doing of my life ?

Sometimes it goes somewhere else when it finds a "closer" log but it go back to this loop right after removing the closer block.

By the way, using a Programmable Controller avoid the problem, but a real drone is fancier :(

commented

Yeah, that poor drone is confused, alright :) Definitely a pathfinding issue if the Programmable Controller can handle it OK. I'll keep this one open and we'll see if we can track it down...

commented

@Sewef Try this https://pastebin.com/uVyVzgPG
Also, I noticed in your video that there was new leaf growth at one point. This is more than likely what was causing the pathing issue. What has happened (again not for certain) is that the drone has picked a leaf block to dig, and in the process of going to the block, new leaf blocks formed around it with the drone not having a path to it. If this happens again, use the pneumatic helmet and watch exactly where the drone is trying to get to. Hope this helps!

commented

Wups, lack of information, I'm trying to remove IronWood Logs now. Still the same problem, tho.

@Tekstack Tried with your program, with addition of an Import From Inventory Piece (getting the axe). It just started to destroy my building :(
The Item Filter should be one the right !

What can I see with pneumatic helmet :

  • Drone picks a log block
  • Drone go to the picked log block
  • Drone is like "well, no" and don't dig it ("Can't Reach Destination" says the debugger)
  • Drone picks a second log block
  • Drone go to the second picked log block
  • Drone is like "not this one" and don't dig it ("Can't Reach Destination" says the debugger)
  • Drone picks the first log block

https://www.dropbox.com/s/d6yi7sejmiycl6v/Minecraft%201.12.2%2021_04_2018%2009_56_10.mp4?dl=0
(Sorry for low TPS, have some hosting problem)

commented

Program of the day : https://pastebin.com/trNMxdF6
It looks much better ! One hour without problem, I'll keep checking today ^_^

commented

@Sewef https://pastebin.com/fXiR9cMN
Try the above program out. Also, apologies because I wasn't aware that your base blocks were included in the dig area. I put some notes in the program. In summary, when dealing with trees, if you are not trying to harvest the leaves, use a bottom-up or top-down approach to the dig logic instead of closest, limit block interactions by right-clicking the dig piece (I set to 64 but can be adjusted as needed; this helps to avoid getting stuck), and finally, separate the log dig from the leaves (you can have a single drone handle this as I did in the program, or have two drones one responsible for leaves only and the other for logs only). The "Closest" option can offer better speed in some scenarios if you separate the logic and limit block interactions, but with the random nature of tree growth and pesky logs sometimes becoming surrounded by leaves, you may have the best luck without using "Closest". Another reason for using Bottom-up is despawning of the resources if you have a collection done set to scan the floor.

Other note: If you have access to Tinkers, try out a lumber axe ;)

commented

@Tekstack I just tried but it's far too slow, unfortunatly :(
I tried with multiple Dig pieces (Low To High) with trees per area, and the Drone got stuck before finishing the first tree and skipped all the program to go back charging. Meh.
I'll just wait with my Programmable Controller until it's getting fixed :D

commented

I did find some weird behaviour with this simple program:
https://pastebin.com/gTxYaEct
2018-04-21_23 46 43

  1. Setting up a program to dig between two spots, and closing off one of the spots.
  2. The drone is forced to dig the single spot, however it is quirky and doesn't want to dig that spot

There was some quirkyness in pathfinding, where if the drone already is at the exact position it pathfinding to, it indicated a 'can't path', even though it should be a 'I'm already there, perfect' indication. This might be the cause of your problem.

Could you try this build? http://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized/175/

commented

2 days without any worry, I think we can close this ♥
Good job @MineMaarten ;)

commented

You're welcome, thanks for the report!

commented

Good to hear!