- Spawn rules (#257)

This commit is contained in:
Xterionix
2024-03-29 18:40:33 +05:00
committed by GitHub
parent 26f68496ce
commit 95be084aa9
11 changed files with 35 additions and 70 deletions

View File

@@ -6,18 +6,21 @@
"description": "This component allows players to set mobs spawn with certain time delays before they will spawn.",
"required": ["identifier"],
"properties": {
"min": { "type": "integer", "description": "This is the minimum delay that a mob spawns.", "title": "Min" },
"max": { "type": "integer", "description": "This is the maximum delay that a mob spawns.", "title": "Max" },
"min": { "type": "integer", "description": "This is the minimum delay that a mob spawns.", "title": "Min", "default": 0 },
"max": { "type": "integer", "description": "This is the maximum delay that a mob spawns.", "title": "Max", "default": 0 },
"identifier": {
"type": "string",
"description": "The identifier of the mob that will spawn.",
"title": "Identifier"
"title": "Identifier",
"$ref": "../../../general/entity/identifier.json"
},
"spawn_chance": {
"title": "Spawn Chance",
"description": "The percent chance that this entity will spawn.",
"type": "number",
"default": 100
"default": 100,
"minimum": 0,
"maximum": 100
}
}
}

View File

@@ -3,6 +3,5 @@
"additionalProperties": false,
"type": "object",
"title": "Disallow Spawns In Bubble",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED"
"description": "Allows creators to keep entities from spawning in bubbles."
}

View File

@@ -8,8 +8,9 @@
"min": {
"type": "integer",
"description": "This is the minimum distance level that a mob spawns.",
"title": "Min"
"title": "Min",
"minimum": 24
},
"max": { "type": "integer", "description": "This is the maximum distance level that a mob spawns.", "title": "Max" }
"max": { "type": "integer", "description": "This is the maximum distance level that a mob spawns.", "title": "Max", "default": 128 }
}
}

View File

@@ -1,44 +0,0 @@
{
"$id": "blockception.minecraft.behavior.spawn_rules.minecraft.entity_types",
"title": "Entity Types",
"description": "entity_types is a specific type of JSON object used by Minecraft: Bedrock Edition in order to encapsulate entity data that can be used in certain behaviors and components..",
"additionalProperties": false,
"type": "object",
"properties": {
"filters": {
"title": "Filters",
"description": "Conditions that make this entry in the list valid.",
"$ref": "../../entities/filters/filters.json"
},
"max_dist": {
"title": "Maximum Distance",
"type": "number",
"default": 16,
"description": "Maximum distance this mob can be away to be a valid choice."
},
"must_see": {
"title": "Must See",
"type": "boolean",
"default": false,
"description": "If true, the mob has to be visible to be a valid choice."
},
"must_see_forget_duration": {
"title": "Must See Forget Duration",
"type": "boolean",
"default": 3.0,
"description": "Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more."
},
"sprint_speed_multiplier": {
"title": "Sprint Speed Multiplier",
"type": "number",
"default": 1.0,
"description": "Multiplier for the running speed. A value of 1.0 means the speed is unchanged."
},
"walk_speed_multiplier": {
"title": "Walk Speed Multiplier",
"type": "number",
"default": 1.0,
"description": "Multiplier for the walking speed. A value of 1.0 means the speed is unchanged."
}
}
}

View File

@@ -11,15 +11,16 @@
"properties": {
"initial_event": {
"title": "Initial Event",
"description": "UNDOCUMENTED.",
"description": "Runs an event on the first entities in a group.",
"$comment": "UNDOCUMENTED",
"type": "string"
},
"initial_event_count": {
"title": "Initial Event Count",
"description": "UNDOCUMENTED.",
"description": "The number of entities that \"initial_event\" should trigger on.",
"$comment": "UNDOCUMENTED",
"type": "integer"
"type": "integer",
"default": 0
},
"min_size": {
"type": "integer",
@@ -29,7 +30,8 @@
"max_size": {
"type": "integer",
"description": "This is the maximum number of mobs that spawn in a herd.",
"title": "Maximum Size"
"title": "Maximum Size",
"maximum": 8
},
"event": {
"type": "string",
@@ -39,7 +41,8 @@
"event_skip_count": {
"type": "integer",
"description": "This is the number of mobs spawned before the specified event is triggered.",
"title": "Event Skip Count"
"title": "Event Skip Count",
"default": 0
}
}
}

View File

@@ -5,12 +5,11 @@
"title": "Player In Village Filter",
"description": "This component lets players be filtered by whether they are in a village or not, using distance and the village border definitions.",
"properties": {
"distance": { "type": "integer", "title": "Distance", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
"distance": { "type": "integer", "title": "Distance", "description": "This is the maximum mob_event level that an entity spawns." },
"village_border_tolerance": {
"type": "integer",
"title": "Village Border Tolerance",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED"
"description": "This is the minimum mob_event level that an entity spawns."
}
}
}

View File

@@ -1,8 +1,7 @@
{
"$id": "blockception.minecraft.behavior.spawn_rules.minecraft.spawn_event",
"title": "Spawn Event",
"description": "UNDOCUMENTED.",
"$comment": "UNDOCUMENTED",
"description": "Event related to the spawning of an entity.",
"type": "object",
"additionalProperties": false,
"properties": {

View File

@@ -8,7 +8,8 @@
"default": {
"type": "integer",
"description": "This is the priority of the mob spawning out of 100.",
"title": "Default"
"title": "Default",
"maximum": 100
},
"rarity": {
"type": "integer",

View File

@@ -3,10 +3,11 @@
"title": "World Age Filter",
"description": "This component allows players to set mobs spawn after a certain amount of time has passed within a world.",
"additionalProperties": false,
"type": "object",
"properties": {
"min": {
"type": "integer",
"description": "This is the minimum world_age_filter level that a mob spawns.",
"description": "This is the minimum world_age_filter level that a mob spawns measured in seconds.",
"title": "Min"
}
}

View File

@@ -3,7 +3,7 @@
"$id": "blockception.behavior.spawn_rules",
"examples": [
{
"format_version": "1.20.41",
"format_version": "1.8.0",
"minecraft:spawn_rules": { "description": { "identifier": "minecraft:entity", "population_control": "ambient" }, "conditions": [{}] }
}
],
@@ -13,7 +13,11 @@
"additionalProperties": false,
"required": ["format_version", "minecraft:spawn_rules"],
"properties": {
"format_version": { "$ref": "../../general/format_version.json" },
"format_version": {
"title": "Format Version",
"description": "A version that tells minecraft what type of data format can be expected when reading this file.",
"enum": ["1.8.0", "1.10.0", "1.12.0"]
},
"minecraft:spawn_rules": {
"type": "object",
"title": "Spawn Rules",
@@ -39,7 +43,7 @@
"title": "Population Control",
"description": "Setting an entity to a pool it will spawn as long as that pool hasn't reached the spawn limit.",
"$comment": "UNDOCUMENTED",
"enum": ["ambient", "animal", "water_animal", "monster", "cat"]
"enum": ["ambient", "animal", "water_animal", "monster", "cat", "pillager"]
}
}
},
@@ -63,7 +67,6 @@
"minecraft:disallow_spawns_in_bubble": { "$ref": "./components/disallow_spawns_in_bubble.json" },
"minecraft:distance_filter": { "$ref": "./components/distance_filter.json" },
"minecraft:height_filter": { "$ref": "./components/height_filter.json" },
"minecraft:entity_types": { "$ref": "./components/entity_types.json" },
"minecraft:herd": { "$ref": "./components/herd.json" },
"minecraft:mob_event_filter": { "$ref": "./components/mob_event_filter.json" },
"minecraft:permute_type": { "$ref": "./components/permute_type.json" },