- Attribute components (#253)

This commit is contained in:
Xterionix
2024-03-28 15:16:57 +05:00
committed by GitHub
parent fb034c6c90
commit 0fe15823e0
9 changed files with 36 additions and 223 deletions

View File

@@ -6,6 +6,7 @@
"description": "A collection of components.",
"required": [],
"properties": {
"minecraftabsorption:": {"$ref": "./components/attribute.json"},
"minecraft:addrider": { "$ref": "./components/addrider.json" },
"minecraft:admire_item": { "$ref": "./components/admire_item.json" },
"minecraft:ageable": { "$ref": "./components/ageable.json" },
@@ -16,7 +17,7 @@
"minecraft:annotation.open_door": { "$ref": "./components/annotation.open_door.json" },
"minecraft:area_attack": { "$ref": "./components/area_attack.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:balloonable": { "$ref": "./components/balloonable.json" },
"minecraft:barter": { "$ref": "./components/barter.json" },
@@ -62,7 +63,7 @@
"minecraft:floats_in_liquid": { "$ref": "./components/floats_in_liquid.json" },
"minecraft:flocking": { "$ref": "./components/flocking.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:game_event_movement_tracking": { "$ref": "./components/game_event_movement_tracking.json" },
"minecraft:genetics": { "$ref": "./components/genetics.json" },
@@ -71,7 +72,7 @@
"minecraft:group_size": { "$ref": "./components/group_size.json" },
"minecraft:grows_crop": { "$ref": "./components/grows_crop.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:hide": { "$ref": "./components/hide.json" },
"minecraft:home": { "$ref": "./components/home.json" },
@@ -102,11 +103,12 @@
"minecraft:item_hopper": { "$ref": "./components/item_hopper.json" },
"minecraft:jump.dynamic": { "$ref": "./components/jump.dynamic.json" },
"minecraft:jump.static": { "$ref": "./components/jump.static.json" },
"minecraft:knockback_resistance": { "$ref": "./components/knockback_resistance.json" },
"minecraft:lava_movement": { "$ref": "./components/lava_movement.json" },
"minecraft:knockback_resistance": { "$ref": "./components/attribute.json" },
"minecraft:lava_movement": { "$ref": "./components/attribute.json" },
"minecraft:leashable": { "$ref": "./components/leashable.json" },
"minecraft:lookat": { "$ref": "./components/lookat.json" },
"minecraft:loot": { "$ref": "./components/loot.json" },
"minecraft:luck": {"$ref": "./components/attribute.json"},
"minecraft:managed_wandering_trader": { "$ref": "./components/managed_wandering_trader.json" },
"minecraft:mark_variant": { "$ref": "./components/mark_variant.json" },
"minecraft:mob_effect": { "$ref": "./components/mob_effect.json" },
@@ -120,7 +122,7 @@
"minecraft:movement.jump": { "$ref": "./components/movement.jump.json" },
"minecraft:movement.skip": { "$ref": "./components/movement.skip.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:navigation.climb": { "$ref": "./components/navigation.climb.json" },
"minecraft:navigation.float": { "$ref": "./components/navigation.float.json" },
@@ -182,7 +184,7 @@
"minecraft:trust": { "$ref": "./components/trust.json" },
"minecraft:trusting": { "$ref": "./components/trusting.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:variant": { "$ref": "./components/variant.json" },
"minecraft:vibration_damper": { "$ref": "./components/vibration_damper.json" },

View File

@@ -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
}
]
}

View 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 }]
}

View File

@@ -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
}
]
}

View File

@@ -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 }]
}

View File

@@ -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
}
]
}

View File

@@ -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
}
]
}

View File

@@ -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
}
]
}

View File

@@ -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
}
]
}