Exemplo n.º 1
0
        public static EntityPropertyList FromReader(IMinecraftDataReader reader)
        {
            var count = reader.ReadInt();

            var value = new EntityPropertyList();

            for (int i = 0; i < count; i++)
            {
                var property = new EntityProperty();

                property.Key   = reader.ReadString();
                property.Value = (float)reader.ReadDouble();
                var listLength = reader.ReadVarInt();

                property.Modifiers = new Modifiers[listLength];
                for (var j = 0; j < listLength; j++)
                {
                    var item = new Modifiers
                    {
                        UUID      = reader.ReadBigInteger(),
                        Amount    = (float)reader.ReadDouble(),
                        Operation = reader.ReadSByte()
                    };

                    property.Modifiers[j] = item;
                }

                value[i] = property;
            }

            return(value);
        }
Exemplo n.º 2
0
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            X = reader.ReadDouble();
            Z = reader.ReadDouble();

            return(this);
        }
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            X = reader.ReadDouble();
            Z = reader.ReadDouble();

            return this;
        }
Exemplo n.º 4
0
 public static Vector3 FromReaderDouble(IMinecraftDataReader reader)
 {
     return(new Vector3(
                reader.ReadDouble(),
                reader.ReadDouble(),
                reader.ReadDouble()
                ));
 }
Exemplo n.º 5
0
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            OldRadius = reader.ReadDouble();
            NewRadius = reader.ReadDouble();
            //Speed = reader.ReadVarLong(); TODO: VarLong

            return(this);
        }
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            OldRadius = reader.ReadDouble();
            NewRadius = reader.ReadDouble();
            //Speed = reader.ReadVarLong(); TODO: VarLong

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            X = reader.ReadDouble();
            FeetY = reader.ReadDouble();
            Z = reader.ReadDouble();
            OnGround = reader.ReadBoolean();

            return this;
        }
        public IPacket ReadPacket(IMinecraftDataReader reader)
        {
            X        = reader.ReadDouble();
            FeetY    = reader.ReadDouble();
            Z        = reader.ReadDouble();
            OnGround = reader.ReadBoolean();

            return(this);
        }
Exemplo n.º 9
0
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            X = reader.ReadDouble();
            Z = reader.ReadDouble();

            OldRadius = reader.ReadDouble();
            NewRadius = reader.ReadDouble();
            //Speed = reader.ReadVarLong(); TODO: VarLong
            PortalTeleportBoundary = reader.ReadVarInt();
            WarningTime            = reader.ReadVarInt();
            WarningBlocks          = reader.ReadVarInt();

            return(this);
        }
Exemplo n.º 10
0
        public IWorldBorder FromReader(IMinecraftDataReader reader)
        {
            X = reader.ReadDouble();
            Z = reader.ReadDouble();

            OldRadius = reader.ReadDouble();
            NewRadius = reader.ReadDouble();
            //Speed = reader.ReadVarLong(); TODO: VarLong
            PortalTeleportBoundary = reader.ReadVarInt();
            WarningTime = reader.ReadVarInt();
            WarningBlocks = reader.ReadVarInt();

            return this;
        }