Entity.description
This commit is contained in:
parent
7973724193
commit
b8a8e79819
@ -88,6 +88,8 @@ abstract class AbstractEntity(path: String) : JsonDriven(path) {
|
|||||||
var uniqueID: String? = null
|
var uniqueID: String? = null
|
||||||
protected set
|
protected set
|
||||||
|
|
||||||
|
var description = ""
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whenever this entity should be removed when chunk containing it is being unloaded
|
* Whenever this entity should be removed when chunk containing it is being unloaded
|
||||||
*
|
*
|
||||||
|
@ -49,10 +49,9 @@ class PlayerEntity() : HumanoidActorEntity("/") {
|
|||||||
|
|
||||||
constructor(data: DataInputStream, isLegacy: Boolean) : this() {
|
constructor(data: DataInputStream, isLegacy: Boolean) : this() {
|
||||||
uniqueID = data.readInternedString()
|
uniqueID = data.readInternedString()
|
||||||
println(data.readInternedString())
|
description = data.readInternedString()
|
||||||
gamemode = PlayerGamemode.entries[if (isLegacy) data.readInt() else data.readUnsignedByte()]
|
gamemode = PlayerGamemode.entries[if (isLegacy) data.readInt() else data.readUnsignedByte()]
|
||||||
humanoidData = HumanoidData.read(data, isLegacy)
|
humanoidData = HumanoidData.read(data, isLegacy)
|
||||||
println(humanoidData)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override val type: EntityType
|
override val type: EntityType
|
||||||
@ -62,7 +61,7 @@ class PlayerEntity() : HumanoidActorEntity("/") {
|
|||||||
|
|
||||||
override fun writeNetwork(stream: DataOutputStream, isLegacy: Boolean) {
|
override fun writeNetwork(stream: DataOutputStream, isLegacy: Boolean) {
|
||||||
stream.writeBinaryString(uniqueID!!)
|
stream.writeBinaryString(uniqueID!!)
|
||||||
stream.writeBinaryString("")
|
stream.writeBinaryString(description)
|
||||||
if (isLegacy) stream.writeInt(gamemode.ordinal) else stream.writeByte(gamemode.ordinal)
|
if (isLegacy) stream.writeInt(gamemode.ordinal) else stream.writeByte(gamemode.ordinal)
|
||||||
humanoidData.write(stream, isLegacy)
|
humanoidData.write(stream, isLegacy)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user