DungeonPlayer

class DungeonPlayer(var player: EntityPlayer, var name: String, var fakeEntity: Boolean = false)

Class to store information about dungeon teammates. The Player will also be handled in this way as a teammate.

This class also contains methods to update and track teammate data. updatePlayerAndRoom handles updating the found secrets on the map.

Author

Aton

Constructors

Link copied to clipboard
fun DungeonPlayer(player: EntityPlayer, name: String, fakeEntity: Boolean = false)

Functions

Link copied to clipboard
suspend fun fetchTotalSecretsFromApi(oldRoom: Room? = null): Int?

Fetches the total collected secrets for the player from the API. Run this with the IO dispatcher Dispatchers.IO.

Link copied to clipboard
fun updatePlayerAndRoom(decor: Map<String, Vec4b>?)

Updates the teammates position and the secrets in the room they are in.

Properties

Link copied to clipboard

Gets the room this DungeonPlayer is currently in. Does not include boss room. This method is meant to be used to track the position of the dungeon teammates and not the Player.

Link copied to clipboard
var dead: Boolean = false
Link copied to clipboard
var deaths: Int = 0
Link copied to clipboard
var fakeEntity: Boolean = false

True when the field player is not the correct entity corresponding to this Player.

Link copied to clipboard
Link copied to clipboard
var mapX: Double = 0.0
Link copied to clipboard
var mapZ: Double = 0.0
Link copied to clipboard
Link copied to clipboard
var player: EntityPlayer
Link copied to clipboard
var secretsAtRunStart: Int? = null
Link copied to clipboard

Maps the index of the tile in Dungeon.dungeonList to the count of ticks the player spent in that Tile. The key -1 is used for time spent dead in clear.

Link copied to clipboard
var yaw: Float = 0.0f