How would I got about serializing an object that uses itemstack?
These are the fields I have in my object
private int id;
private String sellerUUID;
private ItemStack item;
private int cost;
How would I got about serializing an object that uses itemstack?
These are the fields I have in my object
private int id;
private String sellerUUID;
private ItemStack item;
private int cost;
Configurate serialization already has something registered for serializing ItemStacks, just use default Configurate serialization.
Except IIRC it’s recommended to use ItemStackSnapshot.
UUID’s should be serializable as well, without having it as a string.
Yeah I know but I just have a habit of putting the uuid as as string
You should probably change that then, since UUIDs are definitely more memory efficient than String representations of UUIDs.