Hytale mod that automates the heavy task of having to walk around the world turning on/off all those lights during dusk and dawn. https://www.curseforge.com/hytale/mods/lightautomation
  • Java 96.5%
  • Shell 3.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Troed Sångberg 3e5d08e461 Update to Hytale 0.6.0-pre.9 compatibility
- Updated ServerVersion to =0.6.0-pre.9
- Updated useVersion to 0.6.0-pre.9
- Bumped mod version to 1.3.2
- No breaking changes detected in plugin API
2026-07-23 22:47:12 +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 Update to Hytale 0.6.0-pre.9 compatibility 2026-07-23 22:47:12 +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 Update to Hytale 0.6.0-pre.9 compatibility 2026-07-23 22:47:12 +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