- Attribute components (#253)
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
"description": "A collection of components.",
|
"description": "A collection of components.",
|
||||||
"required": [],
|
"required": [],
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"minecraftabsorption:": {"$ref": "./components/attribute.json"},
|
||||||
"minecraft:addrider": { "$ref": "./components/addrider.json" },
|
"minecraft:addrider": { "$ref": "./components/addrider.json" },
|
||||||
"minecraft:admire_item": { "$ref": "./components/admire_item.json" },
|
"minecraft:admire_item": { "$ref": "./components/admire_item.json" },
|
||||||
"minecraft:ageable": { "$ref": "./components/ageable.json" },
|
"minecraft:ageable": { "$ref": "./components/ageable.json" },
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
"minecraft:annotation.open_door": { "$ref": "./components/annotation.open_door.json" },
|
"minecraft:annotation.open_door": { "$ref": "./components/annotation.open_door.json" },
|
||||||
"minecraft:area_attack": { "$ref": "./components/area_attack.json" },
|
"minecraft:area_attack": { "$ref": "./components/area_attack.json" },
|
||||||
"minecraft:attack_cooldown": { "$ref": "./components/attack_cooldown.json" },
|
"minecraft:attack_cooldown": { "$ref": "./components/attack_cooldown.json" },
|
||||||
"minecraft:attack_damage": { "$ref": "./components/attack_damage.json" },
|
"minecraft:attack_damage": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:attack": { "$ref": "./components/attack.json" },
|
"minecraft:attack": { "$ref": "./components/attack.json" },
|
||||||
"minecraft:balloonable": { "$ref": "./components/balloonable.json" },
|
"minecraft:balloonable": { "$ref": "./components/balloonable.json" },
|
||||||
"minecraft:barter": { "$ref": "./components/barter.json" },
|
"minecraft:barter": { "$ref": "./components/barter.json" },
|
||||||
@@ -62,7 +63,7 @@
|
|||||||
"minecraft:floats_in_liquid": { "$ref": "./components/floats_in_liquid.json" },
|
"minecraft:floats_in_liquid": { "$ref": "./components/floats_in_liquid.json" },
|
||||||
"minecraft:flocking": { "$ref": "./components/flocking.json" },
|
"minecraft:flocking": { "$ref": "./components/flocking.json" },
|
||||||
"minecraft:flying_speed": { "$ref": "./components/flying_speed.json" },
|
"minecraft:flying_speed": { "$ref": "./components/flying_speed.json" },
|
||||||
"minecraft:follow_range": { "$ref": "./components/follow_range.json" },
|
"minecraft:follow_range": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:friction_modifier": { "$ref": "./components/friction_modifier.json" },
|
"minecraft:friction_modifier": { "$ref": "./components/friction_modifier.json" },
|
||||||
"minecraft:game_event_movement_tracking": { "$ref": "./components/game_event_movement_tracking.json" },
|
"minecraft:game_event_movement_tracking": { "$ref": "./components/game_event_movement_tracking.json" },
|
||||||
"minecraft:genetics": { "$ref": "./components/genetics.json" },
|
"minecraft:genetics": { "$ref": "./components/genetics.json" },
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
"minecraft:group_size": { "$ref": "./components/group_size.json" },
|
"minecraft:group_size": { "$ref": "./components/group_size.json" },
|
||||||
"minecraft:grows_crop": { "$ref": "./components/grows_crop.json" },
|
"minecraft:grows_crop": { "$ref": "./components/grows_crop.json" },
|
||||||
"minecraft:healable": { "$ref": "./components/healable.json" },
|
"minecraft:healable": { "$ref": "./components/healable.json" },
|
||||||
"minecraft:health": { "$ref": "./components/health.json" },
|
"minecraft:health": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:heartbeat": { "$ref": "./components/heartbeat.json" },
|
"minecraft:heartbeat": { "$ref": "./components/heartbeat.json" },
|
||||||
"minecraft:hide": { "$ref": "./components/hide.json" },
|
"minecraft:hide": { "$ref": "./components/hide.json" },
|
||||||
"minecraft:home": { "$ref": "./components/home.json" },
|
"minecraft:home": { "$ref": "./components/home.json" },
|
||||||
@@ -102,11 +103,12 @@
|
|||||||
"minecraft:item_hopper": { "$ref": "./components/item_hopper.json" },
|
"minecraft:item_hopper": { "$ref": "./components/item_hopper.json" },
|
||||||
"minecraft:jump.dynamic": { "$ref": "./components/jump.dynamic.json" },
|
"minecraft:jump.dynamic": { "$ref": "./components/jump.dynamic.json" },
|
||||||
"minecraft:jump.static": { "$ref": "./components/jump.static.json" },
|
"minecraft:jump.static": { "$ref": "./components/jump.static.json" },
|
||||||
"minecraft:knockback_resistance": { "$ref": "./components/knockback_resistance.json" },
|
"minecraft:knockback_resistance": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:lava_movement": { "$ref": "./components/lava_movement.json" },
|
"minecraft:lava_movement": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:leashable": { "$ref": "./components/leashable.json" },
|
"minecraft:leashable": { "$ref": "./components/leashable.json" },
|
||||||
"minecraft:lookat": { "$ref": "./components/lookat.json" },
|
"minecraft:lookat": { "$ref": "./components/lookat.json" },
|
||||||
"minecraft:loot": { "$ref": "./components/loot.json" },
|
"minecraft:loot": { "$ref": "./components/loot.json" },
|
||||||
|
"minecraft:luck": {"$ref": "./components/attribute.json"},
|
||||||
"minecraft:managed_wandering_trader": { "$ref": "./components/managed_wandering_trader.json" },
|
"minecraft:managed_wandering_trader": { "$ref": "./components/managed_wandering_trader.json" },
|
||||||
"minecraft:mark_variant": { "$ref": "./components/mark_variant.json" },
|
"minecraft:mark_variant": { "$ref": "./components/mark_variant.json" },
|
||||||
"minecraft:mob_effect": { "$ref": "./components/mob_effect.json" },
|
"minecraft:mob_effect": { "$ref": "./components/mob_effect.json" },
|
||||||
@@ -120,7 +122,7 @@
|
|||||||
"minecraft:movement.jump": { "$ref": "./components/movement.jump.json" },
|
"minecraft:movement.jump": { "$ref": "./components/movement.jump.json" },
|
||||||
"minecraft:movement.skip": { "$ref": "./components/movement.skip.json" },
|
"minecraft:movement.skip": { "$ref": "./components/movement.skip.json" },
|
||||||
"minecraft:movement.sway": { "$ref": "./components/movement.sway.json" },
|
"minecraft:movement.sway": { "$ref": "./components/movement.sway.json" },
|
||||||
"minecraft:movement": { "$ref": "./components/movement.json" },
|
"minecraft:movement": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:nameable": { "$ref": "./components/nameable.json" },
|
"minecraft:nameable": { "$ref": "./components/nameable.json" },
|
||||||
"minecraft:navigation.climb": { "$ref": "./components/navigation.climb.json" },
|
"minecraft:navigation.climb": { "$ref": "./components/navigation.climb.json" },
|
||||||
"minecraft:navigation.float": { "$ref": "./components/navigation.float.json" },
|
"minecraft:navigation.float": { "$ref": "./components/navigation.float.json" },
|
||||||
@@ -182,7 +184,7 @@
|
|||||||
"minecraft:trust": { "$ref": "./components/trust.json" },
|
"minecraft:trust": { "$ref": "./components/trust.json" },
|
||||||
"minecraft:trusting": { "$ref": "./components/trusting.json" },
|
"minecraft:trusting": { "$ref": "./components/trusting.json" },
|
||||||
"minecraft:type_family": { "$ref": "./components/type_family.json" },
|
"minecraft:type_family": { "$ref": "./components/type_family.json" },
|
||||||
"minecraft:underwater_movement": { "$ref": "./components/underwater_movement.json" },
|
"minecraft:underwater_movement": { "$ref": "./components/attribute.json" },
|
||||||
"minecraft:variable_max_auto_step": { "$ref": "./components/variable_max_auto_step.json" },
|
"minecraft:variable_max_auto_step": { "$ref": "./components/variable_max_auto_step.json" },
|
||||||
"minecraft:variant": { "$ref": "./components/variant.json" },
|
"minecraft:variant": { "$ref": "./components/variant.json" },
|
||||||
"minecraft:vibration_damper": { "$ref": "./components/vibration_damper.json" },
|
"minecraft:vibration_damper": { "$ref": "./components/vibration_damper.json" },
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.attack_damage",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Attack Damage",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": ["value"],
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"type": "integer",
|
|
||||||
"description": "How much an attack should damage a target.",
|
|
||||||
"title": "Value"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description": "Specifies how much damage is dealt by the entity when it attacks.",
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"value": 4
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
27
source/behavior/entities/format/components/attribute.json
Normal file
27
source/behavior/entities/format/components/attribute.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"$id": "blockception.minecraft.behavior.entities.minecraft.attribute",
|
||||||
|
"description": "Specifies the initial value of a specific attribute for an entity when spawned.",
|
||||||
|
"type": "object",
|
||||||
|
"title": "Attribute",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"required": [],
|
||||||
|
"properties": {
|
||||||
|
"min": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "The minimum starting health an entity has.",
|
||||||
|
"title": "Minimum",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"max": {
|
||||||
|
"type": "number",
|
||||||
|
"description": "The maximum starting health an entity has.",
|
||||||
|
"title": "Maximum"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"description": "The amount of health an entity to start with by default.",
|
||||||
|
"title": "Value",
|
||||||
|
"$ref": "../types/range_number_type.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"examples": [{ "value": 1, "max": 1 }]
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.follow_range",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Follow Range",
|
|
||||||
"description": "Defines the range of blocks that a mob will pursue a target.",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [],
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"type": "integer",
|
|
||||||
"description": "The distance this entity can be from the target when following it",
|
|
||||||
"title": "Value"
|
|
||||||
},
|
|
||||||
"max": {
|
|
||||||
"type": "integer",
|
|
||||||
"description": "Maximum distance this entity can be from the target when following it",
|
|
||||||
"title": "Max"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"value": 16,
|
|
||||||
"max": 48
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.health",
|
|
||||||
"description": "Specifies how much life an entity has when spawned.",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Health",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [],
|
|
||||||
"properties": {
|
|
||||||
"min": {
|
|
||||||
"type": "integer",
|
|
||||||
"description": "The minimum starting health an entity has.",
|
|
||||||
"title": "Minimum"
|
|
||||||
},
|
|
||||||
"max": {
|
|
||||||
"type": "integer",
|
|
||||||
"description": "The maximum starting health an entity has.",
|
|
||||||
"title": "Maximum"
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"description": "The amount of health an entity to start with by default.",
|
|
||||||
"title": "Value",
|
|
||||||
"oneOf": [
|
|
||||||
{ "type": "integer", "default": 1 },
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": ["range_min", "range_max"],
|
|
||||||
"properties": {
|
|
||||||
"range_min": {
|
|
||||||
"title": "Range Minimum",
|
|
||||||
"description": "The minimum amount of health this mob could have.",
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"range_max": {
|
|
||||||
"title": "Range Maximum",
|
|
||||||
"description": "The maximum amount of health this mob could have.",
|
|
||||||
"type": "integer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [{ "value": 1, "max": 1 }]
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.knockback_resistance",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Knockback Resistance",
|
|
||||||
"description": "Allows an entity to resist being knocked backwards by a melee attack.",
|
|
||||||
"required": [],
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"title": "Value",
|
|
||||||
"type": "number",
|
|
||||||
"default": 1.0,
|
|
||||||
"description": "Percentage of knockback to reduce with 1.0 being 100% reduction."
|
|
||||||
},
|
|
||||||
"maximum": {
|
|
||||||
"title": "Maximum",
|
|
||||||
"type": "number",
|
|
||||||
"default": 1.0,
|
|
||||||
"description": "The maximum amount of knockback resistance that can be applied to the entity."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"value": 1.0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"value": 100,
|
|
||||||
"maximum": 100
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.lava_movement",
|
|
||||||
"description": "Allows a custom movement speed across lava blocks.",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Lava Movement",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [],
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"type": "number",
|
|
||||||
"title": "Value",
|
|
||||||
"description": "The speed a strider moves over a lava block."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"value": 0.32
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.movement",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Movement",
|
|
||||||
"description": "UNDOCUMENTED.",
|
|
||||||
"$comment": "UNDOCUMENTED",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [],
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"title": "Value",
|
|
||||||
"description": "UNDOCUMENTED.",
|
|
||||||
"$comment": "UNDOCUMENTED",
|
|
||||||
"oneOf": [
|
|
||||||
{
|
|
||||||
"type": "array",
|
|
||||||
"items": [
|
|
||||||
{ "type": "number", "title": "Maximum" },
|
|
||||||
{ "type": "number", "title": "Maximum" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"title": "Range",
|
|
||||||
"properties": {
|
|
||||||
"range_min": {
|
|
||||||
"type": "number",
|
|
||||||
"title": "Range Minimum"
|
|
||||||
},
|
|
||||||
"range_max": {
|
|
||||||
"type": "number",
|
|
||||||
"title": "Range Maximum"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"max": {
|
|
||||||
"type": "number",
|
|
||||||
"title": "Maximum",
|
|
||||||
"description": "UNDOCUMENTED.",
|
|
||||||
"$comment": "UNDOCUMENTED"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"max": 0.0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"$id": "blockception.minecraft.behavior.entities.minecraft.underwater_movement",
|
|
||||||
"description": "Defines the speed with which an entity can move through water.",
|
|
||||||
"type": "object",
|
|
||||||
"title": "Underwater Movement",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [],
|
|
||||||
"properties": {
|
|
||||||
"value": {
|
|
||||||
"type": "number",
|
|
||||||
"title": "Value",
|
|
||||||
"description": "Movement speed of the entity under water."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"examples": [
|
|
||||||
{
|
|
||||||
"value": 0.15
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user