-
Notifications
You must be signed in to change notification settings - Fork 4
JSON API : adding entities
Subaraki edited this page Jun 11, 2022
·
2 revisions
Entities that are affected by the noose are stored in a json file in data/noose_entities. (folder)
Datapacks can be created to add onto the list and allow for modded entities to be strung up too.
You can name the file anything you want. preferably something unique.
Example of the entity list shipped with the mod :
{
"hangable": [
{
"entity": "minecraft:stray",
"offset": "0.5",
"takesDamage": false
},
{
"entity": "minecraft:piglin"
}
]
}
there's two mandatory tags to add in the json file:
- -the "hangable" tag, with is a list of all hangables. the hangable tag is constructed as follows ! "hangable" : []
- -an entity entry constructed with the mandatory tag "entity".
the entity entry must be constructed with an "entity" tag, which takes the entity's ingame id.
there are two optional entries :
- "offset" : offset for the Y level (up and down) of an entity that is hanging on the noose. this is for corrections. almost all entities need this, most biped/humanoid models are exempt of this.
- "takesDamage" dictates whether or not the entity takes damage hanging on the noose. If left out it defaults to true, and the entity will take damage. There is a config override for this setting, so no entity takes damage at all. If the option is set to true however, this option will be respected.