protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
 {
     buffer.WriteVarint(ID);
     buffer.WriteVarint(PlayerEntityId);
     buffer.WriteString(PlayerUUID);
     buffer.WriteString(PlayerName);
     buffer.WriteFixedPoint(PlayerX);
     buffer.WriteFixedPoint(PlayerY);
     buffer.WriteFixedPoint(PlayerZ);
     buffer.WriteByte(PlayerYaw);
     buffer.WriteByte(PlayerPitch);
     buffer.WriteShort(CurrentItem);
     buffer.WriteByte((3 << 5) | 6);
     buffer.WriteFloat(Health);
     buffer.WriteByte(0x7F);
 }
Exemplo n.º 2
0
 protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
 {
     buffer.WriteVarint(ID);
     buffer.WriteInt(Dimension);
     buffer.WriteByte(Difficulty);
     buffer.WriteByte(Gamemode);
     buffer.WriteString(LevelType);
 }
Exemplo n.º 3
0
        protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
        {
            client.PlayerMetadata.GameMode = 1;

            buffer.WriteVarint(ID);
            buffer.WriteInt(4);
            buffer.WriteByte(1);
            buffer.WriteByte(0);
            buffer.WriteByte(1);
            buffer.WriteByte(32);
            buffer.WriteString("default");
        }
Exemplo n.º 4
0
 protected override void OnBeforeWrite(Network.Client client, Server.Core.Stream.ByteBuffer buffer)
 {
     buffer.WriteVarint(ID);
     buffer.WriteString("{\"version\":{\"name\":\"1.7.2\",\"protocol\":4},\"players\":{\"max\":" + client.Server._config.maxPlayers + ",\"online\":" + client.Server.GetPlayerCount() + ",\"sample\":[]},\"description\":{\"text\":\"" + client.Server._config.name + "\"},\"favicon\":\"data:image/png;base64,\"}");
 }