90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!
Data Command Plus
Only required on the Server side, client will need it for full syntax help!
Syntax of the command fits right into Vanilla syntax. see Commands/data on Minecraft Wiki
Always download the latest release to have access to all the features
Squished tree: of /data command
- … get (block <targetPos>|entity <target>|storage <target>|storageplayer <player>) [<path>] [<scale>]
- … merge (block <targetPos>|entity <target>|storage <target>|storageplayer <player>) <nbt>
- … modify (block <targetPos>|entity <target>|storage <target>|storageplayer <player>) <targetPath> (append|insert <index>|merge|prepend|set| operation)
- … from (block <sourcePos>|entity <source>|storage <source>|storageplayer <player>) [<sourcePath>]
- … concat (block <sourcePos>|entity <source>|storage <source>|storageplayer <player>) [<sourcePath>]
- … string (block <sourcePos>|entity <source>|storage <source>|storageplayer <player>) [<sourcePath>] [<start>] [<end>]
- … <(operation one of: =, +=, -=, *=, /=, %=, ^=, <, >)> <double value>
- … value <value>
- … remove (block <targetPos>|entity <target>|storage <target>|storageplayer <player>) <path>
Squished tree: of /Loot command
/loot <TARGET> <SOURCE>where
<TARGET> is:
- give | insert | spawn | replace <targetPos>
- insert entity <to entity> inventory <from entity>
- fish | loot | kill | mine
- inventory <entity> [MaxSlots]
[MaxSlots] is optional and will return up to n Slots (counting from 1), minus will return last n Slots
Example, compacting inventory from one chest minecart into another one:
Concatenate
- String + String
- List of Strings
- Any Array
- Multiple Nbt Values (selected by nbt selector)
- Nbt Compound (only the top layer) as strings with escaped Quotes ("key":"value")
- Return result: amount of elements concatenated
given path will be replaced with new string
p.s. if given path is a string and a string is concatenated, the result is concatenation of those two strings
Math Operation
- performs math operation on the target value, target can be of any numeric type, Error will be thrown and success set to 0 when type is not numeric
- ^= stands for Power, can also be used to calculate Root
- Targeted Path number TYPE will not change
- for command syntax help install this mod client side
- Return result and success: non zero on success
Storageplayer
- store data per player in their own file /players/<UUID>_pds.dat
- works only on players, any other entity will return an error
- ! Data stored in storageplayer will not be synced with clients, it's purely server side !
Loot ... inventory ...
- loot enitiy's inventory into container (works with players, minecarts, boats, merchants, horses, items, and all living entities)
- inserting into double chests is now possible (1up over regular loot command) ...
- Return result: Slots returned
Examples of Loot ... inventory ... can be found in datapack Fafik77 Lib/inventory_manager
Delete Kill Command
Deletes selected entities, no loot dropped, no events fired
Links
Details
Licensed MIT
Published 6 months ago
Updated a month ago