#how would I make it if a item is thrown into another item both are deleted and a function happens?

1 messages · Page 1 of 1 (latest)

summer jolt
#

^

carmine zincBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1740865432:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

misty depot
#

Run a command in your ticking function as all item entities, that checks what item they are, and if they are one of the desired items, runs a function

carmine zincBOT
#
Question Closed

Your question, #1345504335609466920 (how would I make it if a item is thrown into another item both are deleted and a function happens?), was resolved!

Original Message

#1345504335609466920 message

Duration open

3m

summer jolt
misty depot
#

Try writing it yourself and we'll help from there

summer jolt
sharp lion
#

name=erd is detecting if the entity is called erd, I assume you are trying to detect an item itself called erd?

summer jolt
#

Yeah!

sharp lion
# summer jolt Yeah!

Item name is an item component, so it would be written like this,
@e[type=item,nbt={Item:{id:"minecraft:cobblestone",count:1,components:{"minecraft:item_name":'"erd"'}}}]
(also I put count:1 for more precision for only 1 item, but you can remove that if you like)

But, if its a custom name(eg. named on an anvil), then replace item_name with custom_name

misty depot
#

You should also use if items rather than an NBT check in the item

carmine zincBOT
#
Closed for inactivity

This question has been inactive for some time, so it's going to be closed for inactivity. If you still need it, please disregard this message.