I am making a puzzle adventure map which involves dropping items onto pressure plates to keep doors open. Of course, an item despawning would break the map, so I've been trying to find ways to prevent this.
At the moment, I'm running two repeating command blocks both set to 'Unconditional' and 'Always active' with these commands:
/tag @e[type=minecraft:item] add Remain
/execute as @e[tag=Remain] run data merge entity @s {Age:0}
The first command gives the 'Remain' tag to all items, and the second command continuously sets their age to 0. Unfortunately, items are still despawning. Any help would be greatly appreciated.