I play Mineraft Java Edition 1.13.2. I use a lot of piston-controlled water gates in my village to move mobs, transport items, harvest crops and flowers, and even as timers using an observer at the end of a stream.
But there is noticeable lag when few tens of them are triggered in a short-time window. The debug screen confirms there is a lot of chunk updates during such events, caused, I assume, by the engine updating the flowing water blocks.
Few related questions:
Could someone confirms water-gates are resource intensive? Or should I investigate for other reasons explaining the chunk update peaks I can see?
Is there a way to reduce the negative impact of flowing block updates?
Are hoppers less CPU-hungry for timers and to move items?
Spreading water (ie the establishment of the stream of flowing water), rather than flowing water itself is particularly lag inducing. (Earlier versions of 1.13 had significant problems with flowing water, but this was made somewhat better by 1.13.2)
Another possibility for the chunk updates is lighting updates caused by changes in the redstone controlling the gates; this source can be avoided by lighting the redstone circuitry well.
You might consider using items the are pushed by the water rather than the water itself as a trigger for timers. [Not sure this still works in 1.13, but it used to be possible to create an enless loop of water (basically an "AFK pool" with the sides made longer). Placing an armor stand in one of these these can be made to trigger a tripwire on each circuit. I have not, however, done a direct comparison to conventional RS clocks/timers.]
Triggering a "few tens of them" in a short window may also be the source of the noticable lag: as with pistons, rigging delays so that a smaller number trigger more often can smooth out the demand on the computer and make the effects less noticable.
Again similar to RS clocks, if one can manage to control multiple features with one clock/timer (even at the expense of fairly long RS lines), lag will be reduced.
Again I've not seen statistics for 1.13 yet, but using water steams to move items has previously been found to be less laggy than hopper lines. (I'm not sure you're aware of it yet, but using ice (at light level <11) or packed/blue ice under the water will speed the items enough to reliably slide across the ice under a sign where a new water source is used to extend the stream. [This allows for long distance transport without dropping a level very eight blocks.])
[Water streams have an additional advantage over hopper pipes in that: if part of the system is unloaded, the items simply despawn at the edge of the loaded area rather than building up in one of the hoppers. (The later can cause extreme lag if the number of items gets too high.)]
Something else that may help long term is spreading things out; this is one of the reasons I favor several smaller bases over a single large one.
[I tend to build quite a few large 'farms' and packing them together so they all load at once produces more lag than I like.]
Rollback Post to RevisionRollBack
"Why does everything have to be so stoopid?" Harvey Pekar (from American Splendor)
WARNING: I have an extemely "grindy" playstyle; YMMV — if this doesn't seem fun to you, mine what you can from it & bin the rest.
I play Mineraft Java Edition 1.13.2. I use a lot of piston-controlled water gates in my village to move mobs, transport items, harvest crops and flowers, and even as timers using an observer at the end of a stream.
But there is noticeable lag when few tens of them are triggered in a short-time window. The debug screen confirms there is a lot of chunk updates during such events, caused, I assume, by the engine updating the flowing water blocks.
Few related questions:
Please, support the sledgehammer tool!
I ♥ Linux. Thanks Mojang for providing a game that runs natively on that OS!
Spreading water (ie the establishment of the stream of flowing water), rather than flowing water itself is particularly lag inducing. (Earlier versions of 1.13 had significant problems with flowing water, but this was made somewhat better by 1.13.2)
Another possibility for the chunk updates is lighting updates caused by changes in the redstone controlling the gates; this source can be avoided by lighting the redstone circuitry well.
You might consider using items the are pushed by the water rather than the water itself as a trigger for timers. [Not sure this still works in 1.13, but it used to be possible to create an enless loop of water (basically an "AFK pool" with the sides made longer). Placing an armor stand in one of these these can be made to trigger a tripwire on each circuit. I have not, however, done a direct comparison to conventional RS clocks/timers.]
Triggering a "few tens of them" in a short window may also be the source of the noticable lag: as with pistons, rigging delays so that a smaller number trigger more often can smooth out the demand on the computer and make the effects less noticable.
Again similar to RS clocks, if one can manage to control multiple features with one clock/timer (even at the expense of fairly long RS lines), lag will be reduced.
Again I've not seen statistics for 1.13 yet, but using water steams to move items has previously been found to be less laggy than hopper lines. (I'm not sure you're aware of it yet, but using ice (at light level <11) or packed/blue ice under the water will speed the items enough to reliably slide across the ice under a sign where a new water source is used to extend the stream. [This allows for long distance transport without dropping a level very eight blocks.])
[Water streams have an additional advantage over hopper pipes in that: if part of the system is unloaded, the items simply despawn at the edge of the loaded area rather than building up in one of the hoppers. (The later can cause extreme lag if the number of items gets too high.)]
Something else that may help long term is spreading things out; this is one of the reasons I favor several smaller bases over a single large one.
[I tend to build quite a few large 'farms' and packing them together so they all load at once produces more lag than I like.]