コード例 #1
0
 public void ReadFromStream(IPacketCodec content)
 {
     Locale               = content.ReadString();
     ViewDistance         = content.ReadSByte();
     ChatMode             = content.ReadVarIntEnum <ChatMode>();
     ChatColors           = content.ReadBoolean();
     DisplayedSkinParts   = content.ReadEnum <SkinPart>();
     MainHand             = content.ReadVarIntEnum <HandSide>();
     DisableTextFiltering = content.ReadBoolean();
 }
コード例 #2
0
 public void ReadFromStream(IPacketCodec content)
 {
     EntityId = content.ReadVarInt();
     Position = content.ReadVector3d();
     Rotation = content.ReadAngleRotation();
     OnGround = content.ReadBoolean();
 }
コード例 #3
0
 public void ReadFromStream(IPacketCodec content)
 {
     EntityId            = content.ReadInt32();
     IsHardcore          = content.ReadBoolean();
     Gamemode            = content.ReadEnum <Gamemode>();
     PreviousGamemode    = content.ReadEnum <Gamemode>();
     WorldCount          = content.ReadVarInt();
     WorldNames          = content.ReadIdentifiers(WorldCount);
     DimensionCodec      = content.ReadNbtTag <NbtCompound>();
     Dimension           = content.ReadNbtTag <NbtCompound>();
     WorldName           = content.ReadString();
     HashedSeed          = content.ReadInt64();
     MaxPlayers          = content.ReadVarInt();
     ViewDistance        = content.ReadVarInt();
     ReducedDebugInfo    = content.ReadBoolean();
     EnableRespawnScreen = content.ReadBoolean();
     IsDebug             = content.ReadBoolean();
     IsFlat = content.ReadBoolean();
 }
コード例 #4
0
        public void ReadFromStream(IPacketCodec content)
        {
            EntityId = content.ReadVarInt();
            var delta = new Vector3d {
                X = content.ReadInt16(), Y = content.ReadInt16(), Z = content.ReadInt16()
            };

            delta   *= 0.000244140625 /* 1/4096 */;
            Delta    = delta;
            OnGround = content.ReadBoolean();
        }
コード例 #5
0
        public void ReadFromStream(IPacketCodec content)
        {
            Position = content.ReadVector3d();
            Rotation = content.ReadRotation();
            var flags = content.ReadSByte();

            XKind           = (CoordKind)(flags & 0x01);
            YKind           = (CoordKind)(flags >> 1 & 0x01);
            ZKind           = (CoordKind)(flags >> 2 & 0x01);
            YRotKind        = (CoordKind)(flags >> 3 & 0x01);
            XRotKind        = (CoordKind)(flags >> 4 & 0x01);
            TeleportId      = content.ReadVarInt();
            DismountVehicle = content.ReadBoolean();
        }
コード例 #6
0
 public void ReadFromStream(IPacketCodec content)
 {
     EntityId = content.ReadVarInt();
     Type     = content.ReadVarIntEnum <InteractType>();
     if (Type == InteractType.InteractAt)
     {
         Target = content.ReadVector3();
     }
     if (Type == InteractType.Interact || Type == InteractType.InteractAt)
     {
         Hand = content.ReadVarIntEnum <Hand>();
     }
     Sneaking = content.ReadBoolean();
 }
コード例 #7
0
 public void ReadFromStream(IPacketCodec content)
 {
     Position = content.ReadVector3d();
     OnGround = content.ReadBoolean();
 }
コード例 #8
0
 public void ReadFromStream(IPacketCodec content)
 {
     Difficulty       = content.ReadEnum <Difficulty>();
     DifficultyLocked = content.ReadBoolean();
 }
コード例 #9
0
 public void ReadFromStream(IPacketCodec content)
 {
     Rotation = content.ReadRotation();
     OnGround = content.ReadBoolean();
 }
コード例 #10
0
 public void ReadFromStream(IPacketCodec content)
 {
     OnGround = content.ReadBoolean();
 }