Skip to content

File Layouts

Budschie edited this page Aug 10, 2022 · 1 revision

This page contains information of the format of the different JSON files of this mod.


How to read file layouts:

  • <text in angle brackets> is required.
  • [text in square brackets] is optional.
  • (text in round brackets) should be replaced according to the format inside these brackets.

Three dots after an element indicate a list.

In the format descriptions, quotes are omitted for simplicity.

morph_nbt

Format

{
    <entity_type>: (id of entity type, e.g. "minecraft:pig"),
    [tracked_nbt_keys]: [ (NBT path to preserve, e.g. "VillagerData;profession", use an ";" as a path separation character)... ],
    [data_transformers]: [ (data transformer id, e.g. "bmorph:age_cutter")... ],
    [default_nbt]: (default NBT data this morph should posses, e.g. "{OwnerUUID:\"\"}")
}

Examples

Wolf

{
    "entity_type": "minecraft:wolf",
    "tracked_nbt_keys": [ "CollarColor" ],
    "data_transformers": [ "bmorph:clear_owner" ]
}

Source

Here you can see that we try to preserve the collar color of the killed dog.

A rather interesting thing is the used data transformer named bmorph:clear_owner. This data transformer checks whether the NBT data of the wolf contains a tag named Owner, and replaces its content with an "empty" UUID if that very tag was found. The reason that this is being done is that only wolfs which have been tamed display their collar. The presence of the Owner tag in the NBT data of the wolf effectively means that the dog has been tamed. We cannot just copy the Owner tag over to the morph data though because that would mean that you could have two dogs with the same collar color in your morph inventory. This is because the mod views those two dogs as two distinct morphs because of their different Owner tag. To avoid this problem, we simply replace the Owner tag with a zeroed UUID before copying it over.

This solves the problem described above, we effectively told the game that it does not matter who the owner is but simply that an owner exists.


configured_abilities

Format

{
    <ability>: (ability blueprint ID, e.g. "bmorph:shoot_projectile"),
    [config]:
    {
        (further config data, contents depend on the ability blueprint ID)
    }
}

Examples

bmorph:attack_range

{
    "ability": "bmorph:attribute_modifier",
    "config":
    {
        "attribute": "forge:attack_range",
        "operation": "multiply_base",
        "name": "Increased Reach",
        "amount": 1.5
    }
}

Source

This particular configured ability multiplies the base value of the forge:attack_range attribute by 1.5. Its blueprint ability is bmorph:attribute_modifier.

bmorph:flying

{
    "ability": "bmorph:flying",
    "config":
    {
        "flying_speed": 0.0225
    }
}

Source

This configured ability allows one to fly as if they were in creative mode, with the exception being that the flight speed is at a much slower 0.0225.


ability_groups

Format

{
    <abilities>: [ (ID of configured ability, e.g. "bmorph:egg_yeet")... ]
}

Examples

#bmorph:fire_immunity

{
    "abilities": [ "bmorph:no_fire_damage", "bmorph:no_flames" ]
}

Source

This ability group contains two abilities which, when combined, make the person having this ability immune to fire damage.

#bmorph:normal_fish

{
    "abilities":
    [
        "bmorph:water_breathing",
        "bmorph:water_sanic",
        "bmorph:air_suffocation"
    ]
}

Source

morph_abilities

Format

{
    [entity_type]: (ID of entity type or entity tag to which this ability belongs to, e.g. "minecraft:pig" or "#minecraft:skeletons"),
    [ability_list_name]: (ID this ability list should have, only relevant if "entity_type" field of this JSON is not present),
    [grant]: 
    [
        (ID of ability group or configured ability that this specific morph should posses as an ability)...
    ],
    [revoke]: 
    [
        (ID of ability group or configured ability that this specific morph will definitely not have as an ability)...
    ]
}

Examples

minecraft:bat

{
    "entity_type": "minecraft:bat",
    "grant":
    [
        "bmorph:flying",
        "bmorph:night_vision"
    ],
    "revoke":
    [

    ]
}

Source

A bat can fly and is able to see in the dark.

minecraft:blaze

{
    "entity_type": "minecraft:blaze",
    "grant":
    [
        "bmorph:slow_flying",
        "bmorph:fire_blaze",
        "#bmorph:fire_immunity",
        "bmorph:water_dislike"
    ],
    "revoke":
    [

    ]
}

Source

A blaze can fly at a slower speed than a bat and it takes damage in water, but it is immune to fire and a blaze can shoot blaze projectiles.

minecraft:zombie

{
    "entity_type": "minecraft:zombie",
    "grant":
    [
        "bmorph:burn_in_sun",
        "bmorph:infect_villagers",
        "bmorph:transformations/turn_to_drowned_as_zombie",
        "bmorph:transformations/turn_to_husk_as_zombie",
        "bmorph:water_breathing",
        "bmorph:zombie_armor"
    ],
    "revoke":
    [

    ]
}

Source

A zombie burns in the sun, is able to infect villagers and it may transform to a drowned when being submerged in water. It may also turn into a husk when the zombie is in a hot biome, the zombie has water breathing and it also has 2 armor points.

minecraft:ender_dragon

{
    "entity_type": "minecraft:ender_dragon",
    "grant":
    [
        "bmorph:ender_dragon_flight",
        "bmorph:no_fall_damage",
        "#bmorph:fire_immunity",
        "bmorph:extreme_yeet",
        "bmorph:even_more_damage",
        "bmorph:shoot_ender_dragon",
        "bmorph:ender_dragon_bossbar",
        "bmorph:ender_dragon_bossbar",
        "bmorph:ender_dragon_enabled_visuals",
        "bmorph:no_magic_damage",
        "bmorph:extreme_reach",
        "bmorph:extreme_attack_range",
        "bmorph:disable_ender_dragon"
    ],
    "revoke":
    [
        
    ]
}

Source

An ender dragon flies like an ender dragon might normally do (with the exception that you cannot pass through blocks). You also take no fall damage, are immune to fire, have the ability to catapult foes into the stratosphere, you get a damage boost, you can shoot ender dragon projectiles and you have a bossbar. You also take no magic damage, you have increased reach and attack range, you have an own bossbar and particles appear on spawning. The flip side is that you may only be an ender dragon for a limited amount of time.