- 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

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