My goal is to be able to put a variable amount of gold nuggets in a chest and then run some commands to replace those with gold nuggets that have edited display NBT data.
Is this even possible? I'm encountering a few issues.
First, when checking for the amount of gold nuggets in an inventory with /testforblock, I have to specify the amount of gold nuggets I am testing for. However, I want the amount of nuggets you input to be variable, not restricted to a certain stack size. I also want it to be able to work with every slot in the chest, so somebody can fill the whole thing up.
Second, how would I store the amount of nuggets being inputted into the chest and pass that value to /replaceitem so that I replace the correct number of gold nuggets with edited display NBT nuggets?