Entity Custom Data - Document
Auther
RedstoneOre@modrinth.com
RedstoneOre@github.com
LICENSE: BSD-2-Clause
File
LICENSE
Configuares
Clear Data of Dead Entities
- Count of entities to check every time
scoreboard players set delete_check.count_p_1_time entity_custom_data.config
- Time delay between every 2 times(Unit:tick)
scoreboard players set delete_check.count_p_1_time entity_custom_data.config
Expressions
the argument format will been expressed in this format:<(name):(type)>
Name Of Type | Description | Format |
---|---|---|
DataFrom | the data from a existed path | String: [ block <x> <y> <z> | entity <selector> | storage <name> ] <path:string> |
DataPath | express a data | One of the following format: {value:<value:object>} {from:<path:DataFrom>} |
GetPathFormat | the format of getpath result | One of fullpath ,jsontext ,jsontext-child ,split |
string | normal string | / |
int | normal int value | / |
object{} | nbt object | {...} |
Tip Links
tip.string_espace
If a string have this tip,you should espace the input(espace double quotes).
Like if you want to express 'components."minecraft:block_state"'
,
you should input '\\"components.\\\\\\"minecraft:block_state\\\\\\"\\"'
,
instead of 'components."minecraft:block_state"'
- But if the string exludes spaces and quots,you can just use
"ThisFormat"
- if you want to input with out espacing,see tip.special_usage
tip.no_string
you cannot set the value to a string with spaces and quots, if you want to use it,see tip.special_usage
Usages
Get
Command Line:
function entity_custom_data:get.[print|run|save] {path:{val: <path:string>}}
Requires:
Runner:(The target) Tip: **save_position_path:**tip.fullpath
Result:
Same as data get ... (The value)
If you chose
entity_custom_data:get.print
,the nearest player can receive the data If you choseentity_custom_data:get.save
,the data will been saved instorage entity_custom_data:result get-save
Merge
Command Line:
function entity_custom_data:merge {data: <data:object{}>}
Requires:
Runner:(The target)
Result:
Same as data merge ... (The value)
Modify - Merge
Command Line:
function entity_custom_data:modify.merge {data: <data:DataPath>,path:{val: <path:string>}}
Requires:
Runner:(The target)
Result:
Same as data modify ... (The path) merge value (The value)
Modify - [Set / Append / Prepend]
Command Line:
function entity_custom_data:modify.[set/append/prepend] {data: <data:DataPath>,path:{val: <path:string>}
Requires:
Runner:(The target)
Result:
Same as data modify ... (The path) [set/append/prepend] value (The value)
Modify - Insert
Command Line:
function entity_custom_data:modify.insert {idx: <index:int>,data: <data:DataPath>,path:{val: <path:string>}}
Requires:
Runner:(The target)
Result:
Same as data modify ... (The path) insert (The index) value (The value)
Remove
Command Line:
function entity_custom_data:remove {path:{val: <path:string>}}
Requires:
Runner:(The target)
Result:
Same as data remove ... (The value)
Use In Your Datapack
- KEEP THE FILE
README.entity_custom_data.md
andLICENSE
(you can rename it toLICENSE.entity_custom_data.md
) while using this datapack - Because of the limit of Minecraft,you need to merge the
/pack.mcmeta
and/data/minecraft/
and add you namespace. - If you want to use a newer version,you can just replace the namespace folder
entity_custom_data
without/UPGRADE.md