UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

321 lines 11.6 kB
{ "fields": [ { "id": "genes", "title": "Genes", "dataType": 15, "subForm": { "description": "The list of genes that this entity has and will cross with a partner during breeding.", "fields": [ { "id": "allele_range", "title": "Allele Range", "description": "The range of positive integer allele values for this gene. Spawned mobs will have a random number in this range assigned to them.", "dataType": 0 }, { "id": "genetic_variants", "title": "Genetic Variants", "description": "The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.", "dataType": 15, "subForm": { "description": "The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.", "fields": [ { "id": "birth_event", "title": "Birth Event", "description": "Event to run when this mob is created and matches the allele conditions.", "dataType": 22 }, { "id": "both_allele", "title": "Both Allele", "description": "If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with both. Can also be a range of integers.", "defaultValue": -1, "dataType": 0 }, { "id": "either_allele", "title": "Either Allele", "description": "If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with either. Can also be a range of integers.", "defaultValue": -1, "dataType": 0 }, { "id": "hidden_allele", "title": "Hidden Allele", "description": "If this value is non-negative, compare the mob's hidden allele with this value for a match. Can also be a range of integers.", "defaultValue": -1, "dataType": 0 }, { "id": "main_allele", "title": "Main Allele", "description": "If this value is non-negative, compare the mob's main allele with this value for a match. Can also be a range of integers.", "defaultValue": -1, "dataType": 0 } ] } }, { "id": "mutation_rate", "title": "Mutation Rate", "description": "If this value is non-negative, overrides the chance for this gene that an allele will be replaced with a random one instead of the parent's allele during birth. Non-negative values greater than `1` will be the same as the value `1`.", "defaultValue": -1, "dataType": 3 }, { "id": "name", "title": "Name", "description": "The name of the gene.", "dataType": 2 }, { "id": "use_simplified_breeding", "title": "Use Simplified Breeding", "description": "If true, mobs spawned from breeding will always inherit main alleles from parents' main alleles and hidden alleles from the hidden ones.", "dataType": 2 } ] }, "samples": { "/vanilla/behavior_pack/entities/goat.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": [ { "name": "goat_variant", "use_simplified_breeding": true, "allele_range": { "range_min": 1, "range_max": 100 }, "genetic_variants": [ { "main_allele": { "range_min": 1, "range_max": 2 }, "birth_event": { "event": "minecraft:born_screamer", "target": "self" } }, { "main_allele": { "range_min": 3, "range_max": 100 }, "birth_event": { "event": "minecraft:born_default", "target": "self" } } ] } ] } ], "/vanilla/behavior_pack/entities/panda.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": [ { "name": "panda_variant", "allele_range": { "range_min": 0, "range_max": 15 }, "genetic_variants": [ { "main_allele": 0, "birth_event": { "event": "minecraft:panda_lazy", "target": "self" } }, { "main_allele": 1, "birth_event": { "event": "minecraft:panda_worried", "target": "self" } }, { "main_allele": 2, "birth_event": { "event": "minecraft:panda_playful", "target": "self" } }, { "main_allele": 3, "birth_event": { "event": "minecraft:panda_aggressive", "target": "self" } }, { "both_allele": { "range_min": 4, "range_max": 7 }, "birth_event": { "event": "minecraft:panda_weak", "target": "self" } }, { "both_allele": { "range_min": 8, "range_max": 9 }, "birth_event": { "event": "minecraft:panda_brown", "target": "self" } } ] } ] } ] }, "description": "The list of genes that this entity has and will cross with a partner during breeding." }, { "id": "mutation_rate", "title": "Mutation Rate", "description": "Chance that an allele will be replaced with a random one instead of the parent's allele during birth.", "defaultValue": 0.03125, "dataType": 3, "samples": { "/vanilla/behavior_pack/entities/goat.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": 0.02 } ], "/vanilla/behavior_pack/entities/panda.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": 0.03125 } ] } } ], "description": "Defines the way a mob's genes and alleles are passed on to its offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.", "title": "Genetics", "samples": { "/vanilla/behavior_pack/entities/goat.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": { "mutation_rate": 0.02, "genes": [ { "name": "goat_variant", "use_simplified_breeding": true, "allele_range": { "range_min": 1, "range_max": 100 }, "genetic_variants": [ { "main_allele": { "range_min": 1, "range_max": 2 }, "birth_event": { "event": "minecraft:born_screamer", "target": "self" } }, { "main_allele": { "range_min": 3, "range_max": 100 }, "birth_event": { "event": "minecraft:born_default", "target": "self" } } ] } ] } } ], "/vanilla/behavior_pack/entities/panda.json": [ { "path": "/minecraft:entity/components/minecraft:genetics/", "content": { "mutation_rate": 0.03125, "genes": [ { "name": "panda_variant", "allele_range": { "range_min": 0, "range_max": 15 }, "genetic_variants": [ { "main_allele": 0, "birth_event": { "event": "minecraft:panda_lazy", "target": "self" } }, { "main_allele": 1, "birth_event": { "event": "minecraft:panda_worried", "target": "self" } }, { "main_allele": 2, "birth_event": { "event": "minecraft:panda_playful", "target": "self" } }, { "main_allele": 3, "birth_event": { "event": "minecraft:panda_aggressive", "target": "self" } }, { "both_allele": { "range_min": 4, "range_max": 7 }, "birth_event": { "event": "minecraft:panda_weak", "target": "self" } }, { "both_allele": { "range_min": 8, "range_max": 9 }, "birth_event": { "event": "minecraft:panda_brown", "target": "self" } } ] } ] } } ] }, "id": "minecraft:genetics" }