TransWikia.com

Minecraft 1.14.3, unable to stop items despawning using command blocks

Arqade Asked on June 16, 2021

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.

2 Answers

You can execute a command for all items just by using "/execute as @e[type=item]", there's no need on adding a tag.

Also to make the item not despawn, you can simply modify it's "Age" tag to '-32768s', that will make the item never despawn.

/execute as @e[type=item] run data modify entity @s Age set value -32768s

If you want to make this for all items, just put the command on a repeat commandblock, and it'll work for every item that is dropped.

Answered by user248044 on June 16, 2021

You can't really do that to stop blocks from despawning when they've already been dropped. But what you can do is organize. You can place items in chests to stop them from despawning.

Answered by 14113 on June 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP