walkmc.nbt.CoordinateAdapter.kt Maven / Gradle / Ivy
package walkmc.nbt
import net.minecraft.server.*
import walkmc.*
/**
* A tag adapter for adapting [Coordinate].
*/
object CoordinateAdapter : TagAdapter {
override fun load(key: String, tag: NBTTagCompound): Coordinate {
return Coordinate.from(tag.getString(key))
}
override fun save(key: String, value: Coordinate, tag: NBTTagCompound) {
tag.setString(key, value.toString())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy