serialize
fun serialize(entity: Entity, remove: Boolean = false, nbtModifier: (CompoundTag) -> CompoundTag? = null): ByteArray
Serializes an BukkitEntity to a ByteArray.
Parameters
remove
If the serialized BukkitEntity should be removed from the world.
nbtModifier
Called before the CompoundTag gets compressed to a ByteArray to allow modifications.