Skip to content

[Bug] Alarm starts doubling once you fly far away and come back to the alarm #174

@seras42

Description

@seras42

Describe the bug
When alarm block is activated, and the player moves far away from the block(probably related to the chunks getting unloaded) and coming back to it, double alarm sounds starts playing, once you shut down the first via the computer, the second keeps playing, its impossible to shut it down and can only be done so by leaving the game and loading the save again.

Tried to decrease the alarm range, still the same thing happens once you go far way from the block and come back.

In which environment did the Bug appear?
Single player, have not tested on a server but the alarm function is mainly needed for server play

To Reproduce

What i did, computer tier 3, disk, the whole modules so the computer in game works. Then go to lua,

alarm = require("component").os_alarm
alarm.setRange(15)
alarm.activate()

And then just fly very far away ( i guess until chunks unload) and fly back to it. Now you should hear double alarm start playing. You shut down the first one via computer using alarm.deactivate(), while the second still keeps playing.
Its also the same problem if i decrease the range.

Expected behavior
I expect for the alarm to shut down once i use the alarm.deactivate() function and i expected no double alarms to start playing once i come back.

Minecraft:

  • Mod Version (e.g. OpenSecurity-MC1.12.2-1.0-83)
  • Minecraft Version (e.g. Minecraft 1.12)
  • Forge Version (e.g. Forge 14.23.5.2859)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions