예제 #1
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(ProtocolVersion);
     stream.WriteString(ServerHostname);
     stream.WriteUInt16(ServerPort);
     stream.WriteVarInt((int)NextState);
     return NextState;
 }
예제 #2
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(KeepAlive);
     return mode;
 }
예제 #3
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     if (direction == PacketDirection.Clientbound)
     {
         stream.WriteVarInt(Completions.Length);
         for (long i = 0; i < Completions.Length; i++)
             stream.WriteString(Completions[i]);
     }
     else
         stream.WriteString(Text);
     return mode;
 }
예제 #4
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteInt16(VelocityX);
     stream.WriteInt16(VelocityY);
     stream.WriteInt16(VelocityZ);
     return mode;
 }
예제 #5
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8(Type);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     stream.WriteUInt8(Yaw);
     stream.WriteUInt8(Pitch);
     stream.WriteUInt8(HeadYaw);
     stream.WriteInt16(VelocityX);
     stream.WriteInt16(VelocityY);
     stream.WriteInt16(VelocityZ);
     Metadata.WriteTo(stream);
     return mode;
 }
예제 #6
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(ItemId);
     stream.WriteVarInt(PlayerId);
     return mode;
 }
예제 #7
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
        public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction) {
            if (direction == PacketDirection.Serverbound)
                return mode;

            stream.WriteVarInt(EntityId);
            stream.WriteUInt8((byte)Animation);
            return mode;
        }
예제 #8
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteSingle(Health);
     stream.WriteVarInt(Food);
     stream.WriteSingle(FoodSaturation);
     return mode;
 }
예제 #9
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteInt32(X);
     stream.WriteInt32(Z);
     stream.WriteBoolean(GroundUpContinuous);
     stream.WriteUInt16(PrimaryBitMap);
     stream.WriteVarInt(Data.Length);
     stream.WriteUInt8Array(Data);
     return mode;
 }
예제 #10
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteSingle(ExperienceBar);
     stream.WriteVarInt(Level);
     stream.WriteVarInt(TotalExperience);
     return mode;
 }
예제 #11
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8(EffectId);
     return mode;
 }
예제 #12
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8(EffectId);
     stream.WriteUInt8(Amplifier);
     stream.WriteVarInt(Duration);
     stream.WriteBoolean(HideParticles);
     return mode;
 }
예제 #13
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     Metadata.WriteTo(stream);
     return mode;
 }
예제 #14
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     stream.WriteUInt8(Yaw);
     stream.WriteUInt8(Pitch);
     stream.WriteBoolean(OnGround);
     return mode;
 }
예제 #15
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(Data.Length);
     stream.WriteUInt8Array(Data);
     return mode;
 }
예제 #16
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteInt16((short)Slot);
     Item.WriteTo(stream);
     return mode;
 }
예제 #17
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
        public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
        {
            stream.WriteInt32(ChunkX);
            stream.WriteInt32(ChunkZ);
            stream.WriteVarInt(RecordCount);

            for (int i = 0; i < RecordCount; i++) {
                stream.WriteUInt8(Records[i].HorizonalPosition);
                stream.WriteUInt8(Records[i].Y);
                stream.WriteVarInt(Records[i].BlockId);
            }

            return mode;
        }
예제 #18
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WritePosition(Location);
     stream.WriteVarInt(BlockType);
     return mode;
 }
예제 #19
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteInt32(X);
     stream.WriteInt16(Y);
     stream.WriteInt32(Z);
     stream.WriteUInt8(Data1);
     stream.WriteUInt8(Data2);
     stream.WriteVarInt(BlockId);
     return mode;
 }
예제 #20
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8Array(PlayerUuid.ToByteArray());
     stream.WriteString(PlayerName);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     stream.WriteUInt8(Yaw);
     stream.WriteUInt8(Pitch);
     stream.WriteInt16(HeldItem);
     Metadata.WriteTo(stream);
     return mode;
 }
예제 #21
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8(Type);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     return mode;
 }
예제 #22
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteUInt8(Type);
     stream.WriteInt32(X);
     stream.WriteInt32(Y);
     stream.WriteInt32(Z);
     stream.WriteUInt8(Yaw);
     stream.WriteUInt8(Pitch);
     stream.WriteInt32(Data);
     if (Data != 0)
     {
         stream.WriteInt16(SpeedX.Value);
         stream.WriteInt16(SpeedY.Value);
         stream.WriteInt16(SpeedZ.Value);
     }
     return mode;
 }
예제 #23
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(Statistics.Length);
     for (long i = 0; i < Statistics.LongLength; i++)
     {
         stream.WriteString(Statistics[i].Name);
         stream.WriteVarInt(Statistics[i].Value);
     }
     return mode;
 }
예제 #24
0
파일: Packets.cs 프로젝트: umby24/Craft.Net
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteVarInt(EntityId);
     stream.WriteString(Title);
     stream.WritePosition(Location);
     stream.WriteUInt8(Direction);
     return mode;
 }
예제 #25
0
 public NetworkMode WritePacket(MinecraftStream stream, NetworkMode mode, PacketDirection direction)
 {
     stream.WriteInt32(X);
     stream.WriteUInt8(Y);
     stream.WriteInt32(Z);
     stream.WriteVarInt(BlockType);
     stream.WriteUInt8(BlockMetadata);
     return mode;
 }