I am trying to add multiple effect to my item, I have wrote a custom potion api to make my own potion. I stored the potion's effect type into the PDC as a String, and it can only store one string, but I want a list of string so that I can add two or more effect into one potion. So I wonder if I can store some object in the PDC to make something more interesting and flexible.What are you trying to achieve exactly (might be an XY problem). Regardless, I would say if your storing something like a list of strings then store the list as a single string with a delimiter. Storing something like an object seems overkill for PDC but you could store each property into multiple data containers.
For example, I can store a list of itemstack in a block's PDC, so I can add the itemstack to the drops when player breaks the block.What are you trying to achieve exactly (might be an XY problem). Regardless, I would say if your storing something like a list of strings then store the list as a single string with a delimiter. Storing something like an object seems overkill for PDC but you could store each property into multiple data containers.