DataHandler

A collection of methods for handling everything related to modifying the data for autoactions.

There are methods for adding and removing actions to and from the config. There are also methods for modifying already stored data, such as clearing a room or rotating faulty data. Lastly there are methods for coordinate transformations.

Author

Aton

See also

Functions

Link copied to clipboard
fun addClip(args: List<Double>)
Link copied to clipboard
fun addEther(args: List<Double>)
Link copied to clipboard

Clears all extras blocks in the current room.

Link copied to clipboard

Clears all auto clips in the current room.

Link copied to clipboard

Clears all auto etherwarps in the current room.

Link copied to clipboard
fun getKey(vec: Vec3, roomX: Int, roomZ: Int, rotation: Int): MutableList<Int>

Returns a mutbale list of 3 Integers representing the players position in the current room. BlockPos or Vec3i would probably be the better data format, but list was chosen, because it is easier to serialize.

Link copied to clipboard
fun getRelativeCoords(vec: Vec3, roomX: Int, roomZ: Int, rotation: Int): Vec3

Gets the relative player position in a room

Link copied to clipboard
fun getRotatedCoords(blockPos: BlockPos, rotation: Int): Vec3
fun getRotatedCoords(vec: Vec3, rotation: Int): Vec3

Returns the real rotations of the given vec in a room with given rotation. To get the relative rotation inside a room use 360 - rotation.

Link copied to clipboard
fun onWarp(event: WorldEvent.Load)
Link copied to clipboard
fun removeClip(args: List<Double>)
Link copied to clipboard
fun removeEther(args: List<Double>)
Link copied to clipboard
fun rotateBlocks(rotation: Int = 90)

Rotates the extras blocks data in the current room.

Link copied to clipboard
fun rotateClips(rotation: Int = 90)

Rotates the clip data in the current room by 90°.

Link copied to clipboard
fun rotateEther(rotation: Int = 90)

Rotates the auto ether data in the current room.

Link copied to clipboard
fun Vec3.toCoords(): String
Link copied to clipboard
fun Vec3.toIntCoords(): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Undos the last clearBlocks action.

Link copied to clipboard

Undos the last clearClip action.

Link copied to clipboard

Undos the last clearEther action.