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