TeamPneumatic / pnc-repressurized

A port of PneumaticCraft to MC1.12+
Other
121 stars 50 forks source link

Dig Area widget appears to break if dig speed is too high. #405

Open MuteTiefling opened 4 years ago

MuteTiefling commented 4 years ago

Minecraft Version

1.12.2

Forge Version

14.23.5.2838

Mod Version

1.12.2-0.11.7-375

Describe your problem, including steps to reproduce it

I'm using the following code to dig sand generated by Astral Sorcery's Lava/Liquid Starlight interaction. https://gist.github.com/MuteTiefling/4df0eafd1a8927b1b5b550bafd8f23e5

If I give the drone a flux bore with anywhere from Efficiency 0 to 4, it will dig up the sand as expected, collecting it by way of a magnet upgrade, and go drop it off in a chest whenever it has a stack of sand on it.

However, if I give the drone an Efficiency 5 Flux Bore, it is fast enough to 'insta-mine'. At this point, it seems unable to tell that it has actually broken a block and will sit there digging sand in an infinite loop. Even enabling the 'limit block interactions' on the Dig Area widget appears to be ignored in this case.

Any other comments?

desht commented 4 years ago

This appears to be a desync-type problem, though I haven't gotten to the bottom of it yet. This may be difficult to resolve (might be necessary just to limit the speed of mining), but I'll see what I can do.

MuteTiefling commented 4 years ago

Yeah, I can see this one being tricky. The Starlight/Lava interaction is, for all intents and purposes, instant. I wouldn't be surprised at all if it's happening in the same tick that the sand breaks since the starlight flows so fast.

Would there be a different way of detecting a broken block, though? I was really surprised when 'limit block interactions' didn't catch this for me. I expected that to have some internal count based on a 'break' trigger. I suppose that's what you mean by the desync though? That signal is getting lost in the spam?

desht commented 4 years ago

I can't actually reproduce this. I have tested with a Resonant Fluxbore enchanted with Efficiency V on sand that's being continually placed by 2 max speed Modular Routers (so placed every tick in effect). Didn't test with Astral sand generation since I don't have AS in my dev or test instances, but the effect (rapid sand placement) is the same.

It worked fine - drone insta-breaks the sand and the routers place it back on the next tick. Seems to run without any problems at all...

https://youtu.be/Ls19WD2SznE

MuteTiefling commented 4 years ago

Gotta be something specific to the way Astral is doing this then. I suspect it's making the new sand in the very same tick as it's breaking. I'll post this over there too.

MuteTiefling commented 4 years ago

Here's a link to a video of this in action: https://streamable.com/tt4rn