Ejemplo n.º 1
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteByte(Type);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
 }
Ejemplo n.º 2
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
     writer.WriteShort(Count);
 }
Ejemplo n.º 3
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteDouble(Position.X);
     writer.WriteDouble(Position.Y);
     writer.WriteDouble(Position.Z);
     writer.WriteFloat(Yaw);
     writer.WriteFloat(Pitch);
 }
Ejemplo n.º 4
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteDouble(Position.X);
     writer.WriteDouble(Position.Y);
     writer.WriteDouble(Position.Z);
     writer.WriteFloat(Yaw);
     writer.WriteFloat(Pitch);
     writer.WriteByte((byte)Flags);
     writer.WriteVarint(TeleportId);
 }
Ejemplo n.º 5
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteDouble(Position.X);
     writer.WriteDouble(Position.Y);
     writer.WriteDouble(Position.Z);
     writer.WriteAngleProto(Yaw);
     writer.WriteAngleProto(Pitch);
     writer.WriteBool(OnGround);
 }
Ejemplo n.º 6
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteUuidProto(Uuid);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
     writer.WriteAngleProto(Yaw);
     writer.WriteAngleProto(Pitch);
     writer.WriteEntityMetadataProto(Metadata);
 }
Ejemplo n.º 7
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteUuidProto(Uuid);
     writer.WriteByte(Type);
     writer.WriteDouble(X);
     writer.WriteDouble(Y);
     writer.WriteDouble(Z);
     writer.WriteAngleProto(Pitch);
     writer.WriteAngleProto(Yaw);
     writer.WriteInt(Data);
     writer.WriteShort(VelocityX);
     writer.WriteShort(VelocityY);
     writer.WriteShort(VelocityZ);
 }
Ejemplo n.º 8
0
 public override void Write(PrimitiveWriter writer)
 {
     writer.WriteVarint(EntityId);
     writer.WriteInt(Properties.Count);
     foreach (var p in Properties)
     {
         writer.WriteStringProto(p.Key);
         writer.WriteDouble(p.Value);
         writer.WriteVarint(p.Modifiers.Count);
         foreach (var m in p.Modifiers)
         {
             writer.WriteUuidProto(m.Uuid);
             writer.WriteDouble(m.Amount);
             writer.WriteByte((byte)m.Operation);
         }
     }
 }
Ejemplo n.º 9
0
        public override void Write(PrimitiveWriter writer)
        {
            writer.WriteVarint((int)Action);
            switch (Action)
            {
            case ActionEnum.SetDiameter:
                writer.WriteDouble(Border.Diameter);
                break;

            case ActionEnum.LerpSize:
                writer.WriteDouble(Border.Diameter);
                writer.WriteDouble(Border.NewDiameter);
                break;

            case ActionEnum.SetCenter:
                writer.WriteDouble(Border.CenterX);
                writer.WriteDouble(Border.CenterZ);
                break;

            case ActionEnum.Initialize:
                writer.WriteDouble(Border.CenterX);
                writer.WriteDouble(Border.CenterZ);
                writer.WriteDouble(Border.Diameter);
                writer.WriteDouble(Border.NewDiameter);
                writer.WriteVarlong(Border.TimeUntilNewDiameter);
                writer.WriteVarint(Border.PortalTeleportBoundary);
                writer.WriteVarint(Border.WarningTime);
                writer.WriteVarint(Border.WarningBlocks);
                break;

            case ActionEnum.SetWarningTime:
                writer.WriteVarint(Border.WarningTime);
                break;

            case ActionEnum.SetWarningBlocks:
                writer.WriteVarint(Border.WarningBlocks);
                break;
            }
        }
Ejemplo n.º 10
0
 internal override void Write(PrimitiveWriter writer) => writer.WriteDouble(Value);