/resource
The /resource
command can be used to change (add/subtract), get, set, and do operations on resource. Resource operations can only do scoreboard objective to resource, not resource to resource.
resource has <target> <power>
-
<target>
being a target selector, can only select one entity at a time.- (e.g:
@a[limit = 1, sort = random]
)
- (e.g:
-
<power>
being the namespace and ID of a power.- (e.g:
origins:arcane_skin
(data/origins/powers/arcane_skin.json
))
- (e.g:
resource get <target> <power>
-
<target>
being a target selector, can only select one entity at a time.- (e.g:
@a[limit = 1, sort = random]
)
- (e.g:
-
<power>
being the namespace and ID of a power.- (e.g:
origins:arcane_skin
(data/origins/powers/arcane_skin.json
))
- (e.g:
resource change <target> <power> <value>
-
<target>
being a target selector, can only select one entity at a time.- (e.g:
@a[limit = 1, sort = random]
)
- (e.g:
-
<power>
being the namespace and ID of a power.- (e.g:
origins:arcane_skin
(data/origins/powers/arcane_skin.json
))
- (e.g:
-
<value>
being an integer.
resource operation <target> <power> <operation> <sourceEntity> <sourceObjective>
-
<target>
being a target selector, can only select one entity at a time.- (e.g:
@a[limit = 1, sort = random]
)
- (e.g:
-
<power>
being the namespace and ID of a power.- (e.g:
origins:arcane_skin
(data/origins/powers/arcane_skin.json
))
- (e.g:
-
<operation>
being an operation.- (e.g:
%=
,*=
,+=
,-=
,/=
,<
,=
,>
,><
)
- (e.g:
-
<sourceEntity>
being a target selector, to select the entity to operate the score from, can only select one at a time.- (e.g:
@a[tag = tagName]
)
- (e.g:
-
<sourceObjective>
being the scoreboard objective to operate the value of the resource from.- (e.g:
testObj
(created with/scoreboard objectives add testObj dummy
))
- (e.g: