Skip to content

Nuker's "range" setting is silently overwritten every tick in Uniform Cube mode #6609

Description

@hokindo9000

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

  1. Enable Nuker.
  2. Set shape to "UniformCube".
  3. 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

  • 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions