GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
968 stars 298 forks source link

GT oil/gas/fluid pumps don't save their pumping changes on server reboot #8466

Closed boubou19 closed 2 years ago

boubou19 commented 3 years ago

Your GTNH Discord Username

boubou_19#2706

Your Pack Version

2.1.1.0

Your Server

Delta

Type of Server

Thermos

Your Expectation

I was pumping molten copper on alpha centauri Bb, everything was fine, It finished, decided to move it to a near max molten copper zone, pumped it again, it finished as well. Then server reboot happened. I expected the zone to be empty after reboot, because that's what was the area supposed to be before reboot.

The Reality

When i came back, i misclicked with my electric prospector scanner, and i saw that outside of the chunk where my 7 pumps are, they all came back to the state before i started to pump. So that makes me 17M copper with every reboot. If i just use one pump and fine tune its speed to not finish before the reboot, that's an endless pumping zone.

image

I use default configuration for the multi block controllers, and i put a passive anchor in the chunk if that matters.

I'm not the only one having this, as i toyed with this after i received a weird report saying there was endless fluid coming out of the pumps.

Your Proposal

Looks like the fluid data in chunks aren't properly saved, So maybe ensure to save the fluid data in the chunk every X secs.

Final Checklist

GTNH-Colen commented 3 years ago

Tbh I'm not sure I'd classify this as a minor bug given it dramatically increases the output of a potential field of fluids or potentially makes it near infinite completely undermining the purpose of having finite fluid in a field.

bombcar commented 3 years ago

Especially since many servers have periodic reboots (mmcc does four hours which seems it would be real easy to exploit).

Prometheus0000 commented 3 years ago

Don't they already basically last forever anyway?

boubou19 commented 3 years ago

No: they just have a random chance to decrease the field value each pumping operation. For exemple, with a near max molten copper field (~285) i am able to pump it all in less than 2h with 7 pumps. I suspect this bug is here since a very long time, and that could explain why everyone has the feeling that a fluid field is lasting very long.

Sphyix commented 3 years ago

Don't they already basically last forever anyway?

Have you actually ever played this game?

Prometheus0000 commented 3 years ago

That's what I heard from others, I never finished using the one or two oil spouts I collected since it wasn't my primary power source.

GTNH-Colen commented 3 years ago

Pumps are used for way more than just oil later on so this is quite important honestly.

Prometheus0000 commented 3 years ago

I'm not complaining about fixing it, I just don't know if it's worthy of being called 'major' bug, that's all.

Sphyix commented 3 years ago

I'm not complaining about fixing it, I just don't know if it's worthy of being called 'major' bug, that's all.

Look at this bug like being able to make 500+ ingots of copper, iron, lead per second (and something else I believe, I don't remember) and being able to restart it at every server reboot, making million of ingots every reboot without even needing to do anything

The expected behaviour is that the underground source depletes (it can take less than 2 hours when high tier) and you have to search and move the setup on top of another source

Can you see how broken this is if you have 3 or more good underground sources that never deplete?

Prometheus0000 commented 3 years ago

OK? Why do you feel the need to convince me? I've never even used one? I guess there's some setting that makes them run out way faster than oil, or the reverse.

GTNH-Colen commented 3 years ago

I just don't know if it's worthy of being called 'major' bug, that's all.

OK? Why do you feel the need to convince me?

You literally said you aren't sure if it's worthy of being called a major bug, he tries to convince you and your response is to ask why he wants to convince you? What are you even on about? Please just stay out of the matter if you don't have any experience with it, otherwise we're all just going round in circles wasting time over pointless pedantry.

Glease commented 2 years ago

I still can't identify why this is not saved, nor can I replicate in my test worlds and on my own server (forge though). If it is not saved unconditionally then it's obviously we have a bug here, but now it just seems like a thermos problem to me again. Read below.

Due to how fluid data is stored on disk, you can't really save it every X seconds without forcing a world save every X second, which would obviously just cause too much lag.

Glease commented 2 years ago

Basically, fluid data is associated with chunks. If a chunk never loads, it will use the default, i.e. as if it has got a reset. Since high tier fluid drills never actually load all the chunk it operates on (which would be absolutely stupid), the data is never loaded NOR saved. To fix it, either we force load the chunk once a while (which is .. well, bad), or we need to move the fluid data out of region files, which would come with a ton of migration problems and the need to design an efficient storage layout. I don't quite have a good idea on fixing this without . I'll just leave the info here and see if others got some better ideas.