Last active
July 19, 2018 19:40
-
-
Save Samueljh1/b49763887afe41b59dc87740e4367f90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void SetNameTag(string nameTag) | |
{ | |
NameTag = nameTag; | |
var remove = McpeRemoveEntity.CreateObject(); | |
remove.entityIdSelf = EntityId; | |
Level.RelayBroadcast(remove); | |
var add = McpeAddPlayer.CreateObject(); | |
add.uuid = ClientUuid; | |
add.username = nameTag; | |
add.entityIdSelf = EntityId; | |
add.runtimeEntityId = EntityId; | |
add.x = KnownPosition.X; | |
add.y = KnownPosition.Y; | |
add.z = KnownPosition.Z; | |
add.yaw = KnownPosition.Yaw; | |
add.headYaw = KnownPosition.HeadYaw; | |
add.pitch = KnownPosition.Pitch; | |
add.metadata = GetMetadata(); | |
Level.RelayBroadcast(add); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment