#(helicas) Edit item for an item that is picked up

1 messages · Page 1 of 1 (latest)

snow lily
#

I would like to change an item's lore, name, etc. based on their script data keys when a player picks up the item. I know that you have to inventory adjust the item, however I am unsure of how to identify the specific item slot that the item that was just picked up was put into. Can anyone help me with this? Thank you.

sinful novaBOT
#

(helicas) Edit item for an item that is picked up

sinful novaBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

snow lily
#

!e entity picks up item

gusty nestBOT
# snow lily !e entity picks up item
Group

Player

Event Lines

<entity> picks up <item> <entity> takes <item>

Triggers

when an entity picks up an item.

Has Player

when the entity picking up the item is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Has NPC

when the entity picking up the item is an npc.

Context

<context.item> returns the ItemTag.
<context.entity> returns the EntityTag of the item being picked up.
<context.pickup_entity> returns the EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.

Determine

"ITEM:" + ItemTag to changed the item being picked up.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

snow lily
#
Determine
"ITEM:" + ItemTag to change the item being picked up.
#

!t <PropertyHolderObject.with[<mechanism>=<value>;...]>

gusty nestBOT
snow lily
#

propertyholderobject can be an itemtag

#

so, you'd use

on player picks up item:
- determine ITEM:<context.item.with[display=CoolName;lore=CoolLore]>
#

right, but how would I then apply the changes to the correct item that was just picked up?

#

!e entity picks up item

gusty nestBOT
# snow lily !e entity picks up item
Group

Player

Event Lines

<entity> picks up <item> <entity> takes <item>

Triggers

when an entity picks up an item.

Has Player

when the entity picking up the item is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Has NPC

when the entity picking up the item is an npc.

Context

<context.item> returns the ItemTag.
<context.entity> returns the EntityTag of the item being picked up.
<context.pickup_entity> returns the EntityTag of the entity picking up the item.
<context.location> returns a LocationTag of the item's location.

Determine

"ITEM:" + ItemTag to changed the item being picked up.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

snow lily
#

<context.item> returns the ItemTag.

#

oooh

#

I see now

#

thank you!

#

np!

modern dirgeBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please type </resolved:1028673926114594866> to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@snow lily