mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
read/writeactor to process all subclasses of Actor, not just a player; actor possession confirmed working
This commit is contained in:
@@ -14,7 +14,8 @@ import java.math.BigInteger
|
||||
object WriteActor {
|
||||
|
||||
operator fun invoke(actor: IngamePlayer): String {
|
||||
return Common.jsoner.toJson(actor)
|
||||
val s = Common.jsoner.toJson(actor, actor.javaClass)
|
||||
return """{"class":"${actor.javaClass.canonicalName}",${s.substring(1)}"""
|
||||
}
|
||||
|
||||
fun encodeToByteArray64(actor: IngamePlayer): ByteArray64 {
|
||||
|
||||
Reference in New Issue
Block a user