troed/LightAutomation
1
0
Fork
You've already forked LightAutomation
0
Hytale mod that automates the heavy task of having to walk around the world turning on/off all those lights during dusk and dawn.
  • Java 96.5%
  • Shell 3.5%
Troed Sångberg 878f81f30c feat: update to Hytale 0.6.0-pre.7 with BlockOperations migration
- Switch to pre-release patchline and compile against 0.6.0-pre.7
- Add dependencyResolutionManagement to settings.gradle.kts to fix
 scaffoldit plugin CurseMaven resolution issue
- Migrate from deprecated BlockChunk.setBlock to BlockOperations.setBlock
2026年07月12日 13:09:24 +02:00
bin/main feat: update to Hytale 0.6.0-pre.7 with BlockOperations migration 2026年07月12日 13:09:24 +02:00
docs Fix block detection bugs and improve coordinate handling 2026年04月11日 09:12:37 +02:00
gradle/wrapper Initial commit: LightAutomation mod with transition detection and light tracking 2026年04月05日 22:29:36 +02:00
src/main feat: update to Hytale 0.6.0-pre.7 with BlockOperations migration 2026年07月12日 13:09:24 +02:00
.gitignore Initial commit: LightAutomation mod with transition detection and light tracking 2026年04月05日 22:29:36 +02:00
build.gradle.kts Change JAR name to lightautomation.jar 2026年04月06日 20:27:13 +02:00
extract_light_sources.sh Initial commit: LightAutomation mod with transition detection and light tracking 2026年04月05日 22:29:36 +02:00
gradle.properties Update for new Hytale server release (0.5.1) 2026年05月27日 11:06:43 +02:00
gradlew Initial commit: LightAutomation mod with transition detection and light tracking 2026年04月05日 22:29:36 +02:00
gradlew.bat Initial commit: LightAutomation mod with transition detection and light tracking 2026年04月05日 22:29:36 +02:00
README.md Fix block detection bugs and improve coordinate handling 2026年04月11日 09:12:37 +02:00
settings.gradle.kts feat: update to Hytale 0.6.0-pre.7 with BlockOperations migration 2026年07月12日 13:09:24 +02:00
thumbnail.png feat: update to Hytale 0.6.0-pre.7 with BlockOperations migration 2026年07月12日 13:09:24 +02:00

LightAutomation

A Hytale mod for automating lighting systems. We've all been there, having to go around the whole world at dawn and dusk just to turn lights on and off.

Features

  • Automatic Street Lights: Lights turn on at dusk and off at dawn
  • Smart Time Detection: Uses sunlight factor to detect precise dawn/dusk transitions
  • Player Light Tracking: Automatically tracks player-placed light sources
  • Persistence: Saves tracked lights across server restarts
  • Configurable Timing: Adjust when lights activate/deactivate
  • Easy Configuration: Simple configuration file with sensible defaults
  • Outdoor lights only: Lights placed indoors/in caves etc will not be automated

Installation

  1. Place the LightAutomation.jar file in your Hytale server's mods/ directory
  2. Start your server
  3. A configuration file will be automatically created
  4. Edit the configuration as needed

Player usage

Depending on the DefaultLogic configuration option all lights placed outdoors will either be automated by default, or not. A player can choose to interact with the light (turn it on, or off, depending on its state) once during the first 10 seconds it has been placed to either opt out of automation, or opt-in, again depending on what the default value is.

(This might seem complicated, but I found no way of detecting when a player changes the state of just any light in the current Hytale API)

Why are not all lights toggleable by default?

Most players probably assume torches won't go on and off, even if they're outdoors. Feedback on the mod will help decide what the configuration file default arrays will be here.

Configuration Options

The mod supports the following configuration options:

  • EnableLightAutomation: Enable/disable light automation functionality (true/false)
  • DefaultLogic: Whether placed lights are automated by default, or vice versa (on/off)
  • LoggingLevel: Level of logging detail (off, processing, debug)
  • DawnThreshold: Percentage of sunlight required to turn off lights (>0.000 and <1.000)
  • DuskThreshold: Percentage of sunlight required to turn on lights (>0.000 and <1.000)
  • ToggleableLightTypes: Array containing lights the mod should automate
  • StaticLightTypes: Array containing lights the mod should not automate

Caveat regarding dusk: Currently the Hytale API reports 0 sunlight well before the sun actually sets. I assume this to be a bug, but until it's fixed you'll likely want this to be 0.004 or something in that range.

Commands

  • /lightautomation - displays available commands
  • /lightautomation --version - displays version
  • /lightautomation --reload - reloads and applies updated configuration
  • /lightautomation --config - displays current configuration settings
  • /lightautomation --lights - shows tracked lights summary
  • /lightautomation --lights list - lists all tracked lights
  • /lightautomation --lights count - shows count of tracked lights
  • /lightautomation --lights types - lists trackable light types
  • /lightautomation --save - manually saves tracked lights
  • /lightautomation --clear - clears all tracked lights
  • /lightautomation --info - shows persistence information

License

Creative Commons Zero