Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enjarai/restart-detector
A Minecraft mod to stop sensitive farms and flying machines from breaking on server restarts.
https://github.com/enjarai/restart-detector
Last synced: 3 months ago
JSON representation
A Minecraft mod to stop sensitive farms and flying machines from breaking on server restarts.
- Host: GitHub
- URL: https://github.com/enjarai/restart-detector
- Owner: enjarai
- License: mit
- Created: 2023-11-01T10:43:55.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-23T20:44:21.000Z (4 months ago)
- Last Synced: 2024-08-23T23:35:54.480Z (4 months ago)
- Language: Java
- Homepage: https://modrinth.com/mod/restart-detector
- Size: 3.01 MB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Restart Detector
This **fully server-side** mod adds Restart Detectors,
a new block that will output a redstone signal before server shutdowns.These new blocks can be used to disable sensitive redstone contraptions to prevent expensive breakages,
and can even be used on flying machines due to their lightweight design™! (no blockentity required)By default, this mod hijacks the behaviour of the `/stop` command to use a countdown before actually
shutting down the server, giving restart detectors time to activate.
It also adds a few subcommands to manage this behaviour.## Visuals
The Restart detector uses the model of a daylight sensor,
but distinguishes itself by having a fake command block hovering above it.
This allows it to work fully server-side, while still being visually distinct.![A Restart Detector ingame](img/detector.png)
## Functionality
All Restart Detectors that are loaded will output a redstone signal when the server is about to shut down,
starting at strength 1, and slowly increasing to 15 until the actual shutdown.
When the server comes back online, the signal will slowly decay back to 0
to makes sure the world has time to load before contraptions are started back up.**Restart Detectors CAN be moved by pistons.**
This lets you make use of them on flying machines and other moving contraptions!![A Restart Detector on a flying machine](img/flying_machine.png)
## Commands
The `/stop` command is modified by this mod to wait a configurable amount of time before actually shutting down the server,
it is within this window that all Restart Detectors will output a signal.
It also adds a `/stop cancel` and `/stop now` command to cancel and bypass the countdown respectively.## Configuration
This mod creates a config file at `config/restart_detector.json` with the following options:
- `hijackStopCommand` (default: `true`): Whether to hijack the vanilla `/stop` command to add a countdown.
- `stopCountdownTicks` (default: `600` (30s)): The amount of ticks to wait before actually shutting down the server.The server must be restarted for changes to the config to take effect.