To determine which entity initiated the pickpocket, you'll need to add the pickpocket.actor
tag to the entity via the /tag
command. Afterwards, you can execute the pickpocket:this
function using the /function
command as the entity you wish to pickpocket from.
You can customize how many items can be taken (1 by default) by setting the score of the take
score holder in the pickpocket
scoreboard objective, like so:
# This example will make the pickpocket power take 10
scoreboard players set take pickpocket 10
You can specify which slots will be potentially targeted (0 to 8 by default) by specifying an array of integers as the value for the slots
NBT of the pickpocket:input
command NBT storage, like so:
# This example will make the power affect slots from slot 36 to slot 39
# 36 = feet, 37 = legs, 38 = chest and 39 = head
data modify storage pickpocket:input slots set value [36, 37, 38, 39]
You can make the pickpocket power only target a specific slot by specifying an integer as the value for the slots
NBT of the pickpocket:input
command NBT storage, like so:
# This example will make the power only target the offhand slot of the target entity
data modify storage pickpocket:input slots set value 40