Exemplo n.º 1
0
        public virtual void FromBytes(BinaryReader reader, IClassRegistryAPI instancer)
        {
            Code        = reader.ReadString();
            MinQuantity = reader.ReadInt32();
            MaxQuantity = reader.ReadInt32();


            int q = reader.ReadInt32();

            ValidStacks = new CookingRecipeStack[q];
            for (int i = 0; i < q; i++)
            {
                ValidStacks[i] = new CookingRecipeStack();
                ValidStacks[i].FromBytes(reader, instancer);
            }
        }
Exemplo n.º 2
0
        public new CookingRecipeStack Clone()
        {
            CookingRecipeStack stack = new CookingRecipeStack()
            {
                Code = Code.Clone(),
                ResolvedItemstack = ResolvedItemstack?.Clone(),
                StackSize         = StackSize,
                Type           = Type,
                TextureMapping = (string[])TextureMapping?.Clone(),
                CookedStack    = CookedStack?.Clone()
            };

            if (Attributes != null)
            {
                stack.Attributes = Attributes.Clone();
            }

            stack.ShapeElement = ShapeElement;

            return(stack);
        }