
net.chestmc.nbt.CoordinateAdapter.kt Maven / Gradle / Ivy
package net.chestmc.nbt
import net.chestmc.Coordinate
import net.minecraft.server.NBTTagCompound
/**
* 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