/// <summary> /// Reads the contents of the block bytes and converts it into a block. /// </summary> /// <param name="reader">The reader of the block</param> /// <param name="instancer">The block registry</param> public virtual void FromBytes(BinaryReader reader, IClassRegistryAPI instancer) { Type = (EnumItemClass)reader.ReadInt16(); Code = new AssetLocation(reader.ReadString()); Quantity = NatFloat.One; Quantity.FromBytes(reader); ResolvedItemstack = new ItemStack(reader); LastDrop = reader.ReadBoolean(); if (reader.ReadBoolean()) { DropModbyStat = reader.ReadString(); } }