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.
Resource bars cannot have fully dynamic max values, at least not yet. This means that you would need to modify the power JSON file just to adjust the max value, which is quite a hassle, especially in an environment where you want it to be configurable in-game easily.
Luckily, we can copy the value of a resource to a score holder in a scoreboard objective, and vice versa. Mix this with being able to do math operations in scoreboard, you can now have a resource with a pseudo-dynamic max value.
First, we would need to create two scoreboard objectives: one for storing the current value of the resource, and one for indicating the max value of the resource. In this example, we'll be naming the scoreboard objectives resource.cur
and resource.max
respectively