PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Right Click Prog Widget no longer appears to want to loop

MuteTiefling opened this issue ยท 10 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.108

Mod Version

pneumaticcraft-repressurized-1.16.1-2.1.1-14

Describe your problem, including steps to reproduce it

I'm trying to make a crop farm that uses right click to harvest (added by quark, I believe). Pretty sure I've done this before, but it's been a while and now it doesn't seem to work.

I've got the drone program set up as below. It should click on each beet in the area, but instead it just goes to the first one it finds, right clicks it to harvest, and then stops there. It doesn't continue on with the rest of the program, nor loop through the rest of the coordinates in the area.

I thought it might be because once it picked up a beet the main hand item might be 'invalid' for more right clicks, so I gave it a jack hammer to hold. That resulted in the same behavior, however.

I've also tried using a For Each Coordinate prog widget to manually loop, but that again seems to get stuck after the first successful right click.

Any other comments?

Program: https://gist.github.com/MuteTiefling/d2082faec70c65dada51d9e6bb5dcb62

Drone just Chilling:
2020-08-28_09 43 27

Drone reporting nothing to interact with?
2020-08-28_09 43 39

commented

For reference, this is the program I was using in 1.15: https://gist.github.com/MuteTiefling/db47dc610d1a25700b58f74a76e91423

That one was working fine, but that predates the addition of the ability to right click with an item.

commented

Think I see what's happening here. Quark's doing the right-click action, and cancelling the event. I'm treating the event cancellation as a "this failed", when it's actually "this suceeded" in this case. Think I know how to fix this, but I'll get you to test a new build shortly...

commented

OK, give build 25 a go...

commented

Same behavior, unfortunately. The drone just goes to the nearest crop and hovers.

New test program: https://gist.github.com/MuteTiefling/7a067011bd79f3457cd35fe9914204ab

commented

Interestingly, I modified that program to bone meal the crops instead (right click with item) and it ended up just spamming the first crop it found, rather than going on to the next one.

commented

OK, give build 26 a go!

Thinking about right-click logic more, the code was trying to be too clever. In reality, the drone shouldn't care whether the click "succeeded" or not, it should just do the click, and next time move on to the next block in the area (until all blocks are clicked, then it starts over).

By "succeeded", I mean something happened as a result of the click, e.g. bonemeal actually grew a crop, rather than did nothing because there was no crop or the crop was fully grown. That's what was happening there - the drone would bonemeal everything fine until it encountered a fully-grown crop, and would then just sit there forever trying to bonemeal the crop over and over because nothing was happening...

commented

Oh, btw, if you're using Immersive Engineering in your world, this PNC build requires IE 1.16.1-4.0.0-118 or newer (IE updated its fuel registration API).

commented

oh, thanks for the heads up. I'll update both and test

commented

That looks like it did it! Awesome job and thanks for the quick work!

commented

Fixed in 2.2.0 and 1.4.5 release