AutoWater

object AutoWater : Module

A module to automatically complete the water board puzzle in one flow.

It does not actively scan the board to calculate the best path but instead uses preset solutions. It will not work when the board is not in a default state or is being messed with while being solved.

Author

Aton

Types

Link copied to clipboard
open class Condition

Conditions for when to flick a lever.

Link copied to clipboard
Link copied to clipboard
object Gates

Contains and manages information about the gates.

Link copied to clipboard

All 10 possible configuration that have exactly 3 gates closed. also contains the gate states as values, but that is probably not necessary

Link copied to clipboard

Provides all the lever related actions.

Link copied to clipboard
data class Step(val lever: AutoWater.Lever, val condition: AutoWater.Condition)

Functions

Link copied to clipboard
fun addSettings(vararg setArray: Setting<*>)

Adds all settings in the input to the settings field of the module. This is required for saving and loading these settings to / from a file. Keep in mind, that these settings are passed by reference, which will get lost if the original setting is reassigned.

Link copied to clipboard
Link copied to clipboard

Triggers the module initialization.

Link copied to clipboard

Loads self registering elements of the module such as hud elements.

Link copied to clipboard
open fun onDisable()

This method is run whenever the module is disabled.

Link copied to clipboard
open override fun onEnable()

This method is run whenever the module is enabled.

Link copied to clipboard
open fun onInitialize()

This method will be run on the FMLLoadCompleteEvent on game startup after the config is loaded.

Link copied to clipboard
fun onInteract(event: PlayerInteractEvent)

Registers when a lever is clicked. Used to start auto water when flicking the start lever.

Link copied to clipboard
open fun onKeyBind()

This method is run whenever the key-bind for the Module is pressed.

Link copied to clipboard

PostMove is used for interacting with the levers.

Link copied to clipboard

Pre move is used for positioning.

Link copied to clipboard
fun onTick(event: TickEvent.ClientTickEvent)

Used to detect the water layout.

Link copied to clipboard
fun onWorldChange(event: WorldEvent.Load)

Reset on warp

Link copied to clipboard
fun <K : Setting<*>> register(setting: K): K

Registers the setting to this Module. This will make the setting appear in the GUI and save to the config. The following is an example of how it can be used to define a setting for a module.

Link copied to clipboard
fun reset()

Resets the variables.

Link copied to clipboard
fun stop()

Force stops the auto water process.

Link copied to clipboard
fun toggle()

Will toggle the module.

Link copied to clipboard
operator fun <K : Setting<*>> K.unaryPlus(): K

Overloads the unaryPlus operator for Setting classes to register them to the module. The following is an example of how it can be used to define a setting for a module.

Properties

Link copied to clipboard
Link copied to clipboard

A description of the module and its usage that is shown in the Advanced GUI.

Link copied to clipboard

Do NOT set this value directly, use toggle() instead!

Link copied to clipboard
Link copied to clipboard

Key code of the corresponding key bind. Mouse binds will be negative: -100 + mouse button. This is the same way as minecraft treats mouse binds.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard