mcdiscordbot/MinecraftDiscordBot/Models/Item.cs

15 lines
619 B
C#
Raw Normal View History

using Newtonsoft.Json;
using System.Diagnostics;
namespace MinecraftDiscordBot.Models;
[JsonObject(MemberSerialization.OptIn, Description = "Describes an item in a Refined Storage system.", MissingMemberHandling = MissingMemberHandling.Ignore)]
[DebuggerDisplay($"{{{nameof(ToString)}(),nq}}")]
public class Item : Fluid {
[JsonProperty("fingerprint", Required = Required.Always)]
public Md5Hash Fingerprint { get; set; } = default!;
[JsonProperty("nbt", Required = Required.DisallowNull)]
public dynamic? NBT { get; set; }
public override string ToString() => $"{Amount:n0}x {DisplayName}";
}