Describe the bug
In Nuker.java's onTickPre() handler, the range setting is written to
(not just read) on every single game tick when Uniform Cube shape is
selected:
if (shape.get() == Shape.UniformCube) range.set((double) Math.round(range.get()));
This calls the setting's set() method (a mutation, likely triggering
change listeners / marking config dirty for saving) every tick, purely to
round the displayed value - even when the value hasn't actually changed
between ticks.
Impact:
- Unnecessary repeated writes to a setting every tick (20 times/sec) for
as long as Nuker is active with Uniform Cube shape selected, instead of
only rounding the value once when it's changed or shape is switched.
- If the setting system persists/marks-dirty on every .set() call
(common pattern), this could cause unnecessary repeated config save
triggers purely from Nuker being left on.
- If a user is actively dragging the range slider, this per-tick
overwrite could fight with/snap the UI value unexpectedly mid-drag.
Steps to reproduce
- Enable Nuker.
- Set shape to "UniformCube".
- Observe (e.g. via a settings-change listener/log, or by dragging the
range slider while active) that the range value is being rewritten
every tick rather than only when actually changed.
Meteor Version
26.1.2-42
Minecraft Version
26.1.2
Operating System
Linux
Before submitting a bug report
Describe the bug
In Nuker.java's onTickPre() handler, the range setting is written to
(not just read) on every single game tick when Uniform Cube shape is
selected:
This calls the setting's set() method (a mutation, likely triggering
change listeners / marking config dirty for saving) every tick, purely to
round the displayed value - even when the value hasn't actually changed
between ticks.
Impact:
as long as Nuker is active with Uniform Cube shape selected, instead of
only rounding the value once when it's changed or shape is switched.
(common pattern), this could cause unnecessary repeated config save
triggers purely from Nuker being left on.
overwrite could fight with/snap the UI value unexpectedly mid-drag.
Steps to reproduce
range slider while active) that the range value is being rewritten
every tick rather than only when actually changed.
Meteor Version
26.1.2-42
Minecraft Version
26.1.2
Operating System
Linux
Before submitting a bug report
This bug wasn't already reported (I have searched bug reports on GitHub).
This is a valid bug (I am able to reproduce this on the latest dev build).