SilkPosition

@Serializable
data class SilkPosition(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0, val worldIdentifier: ResourceLocation? = null, val pitch: Float = 0.0f, val yaw: Float = 0.0f)(source)

A class which can be initialized with all kinds of positions and has the ability to convert them to nearly every other kind of position.

Additionally, this class is serializable.

Constructors

Link copied to clipboard
constructor(blockPos: BlockPos, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(vec3i: Vec3i, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(vec3f: Vector3f, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(vec3d: Vec3, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(entity: Entity)
constructor(chunkPos: ChunkPos, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(chunkSectionPos: SectionPos, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)
constructor(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0, worldIdentifier: ResourceLocation? = null, pitch: Float = 0.0f, yaw: Float = 0.0f)

Properties

Link copied to clipboard
val blockPos: BlockPos
Link copied to clipboard
val chunkPos: ChunkPos
Link copied to clipboard
val chunkSectionPos: SectionPos
Link copied to clipboard
val pitch: Float = 0.0f
Link copied to clipboard
Link copied to clipboard
val roundedBlockPos: BlockPos
Link copied to clipboard
val vec3d: Vec3
Link copied to clipboard
val vec3f: Vector3f
Link copied to clipboard
val vec3i: Vec3i
Link copied to clipboard
val world: Level?
Link copied to clipboard
@Serializable(with = ResourceLocationSerializer::class)
val worldIdentifier: ResourceLocation? = null
Link copied to clipboard
val worldKey: ResourceKey<Level>?
Link copied to clipboard
val x: Double = 0.0
Link copied to clipboard
val y: Double = 0.0
Link copied to clipboard
val yaw: Float = 0.0f
Link copied to clipboard
val z: Double = 0.0