StructureEntity

interface StructureEntity<Entity, Location>

Represents an entity stored in a structure.

Functions

getEntity
Link copied to clipboard
abstract fun getEntity(): Optional<Entity>
Generates a virtual entity, which is not added to the world but the data can be extracted.
getNbtData
Link copied to clipboard
abstract fun getNbtData(): String
Gets the nbt data of the stored entity in string format.
getSourceLocation
Link copied to clipboard
abstract fun getSourceLocation(): Location
Gets the relative source location inside the structure.
spawnEntity
Link copied to clipboard
abstract fun spawnEntity(location: Location): Optional<Entity>
Tries to spawn an entity from the stored nbt data at the given location.