Skip to content

Commit

Permalink
- Updated for 1.21.40 (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xterionix authored Nov 18, 2024
1 parent 31ad665 commit 32d6a0e
Show file tree
Hide file tree
Showing 17 changed files with 300 additions and 97 deletions.
6 changes: 5 additions & 1 deletion .vscode/easy.code-snippets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"speed_multiplier": {
"prefix": "snippet.speed_multiplier",
"body": ["\"priority\": { \"$ref\": \"types/base_priority.json\" },", "\"speed_multiplier\": { \"$ref\": \"types/base_speed_multiplier.json\" },"]
"body": [ "\"priority\": { \"$ref\": \"types/base_priority.json\" },", "\"speed_multiplier\": { \"$ref\": \"types/base_speed_multiplier.json\" }," ]
},
"priority": {
"prefix": "snippet.priority",
Expand All @@ -22,5 +22,9 @@
"string": {
"prefix": "json.string",
"body": "\"title\": \"\",\n\"description\": \"\",\n\"type\": \"string\""
},
"boolean": {
"prefix": "json.boolean",
"body": "\"title\": \"\",\n\"description\": \"\",\n\"type\": \"boolean\",\n\"default\": false"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.redstone_conductivity",
"title": "Redstone Conductivity",
"description": "The basic redstone properties of a block; if the component is not provided the default values are used. Requires the Upcoming Creator Features experiment.",
"description": "The basic redstone properties of a block; if the component is not provided the default values are used.",
"type": "object",
"additionalProperties": false,
"required": [ ],
Expand Down
3 changes: 2 additions & 1 deletion source/behavior/entities/format/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"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:looked_at": { "$ref": "./components/looked_at.json" },
"minecraft:loot": { "$ref": "./components/loot.json" },
"minecraft:luck": { "$ref": "./components/attribute.json" },
"minecraft:managed_wandering_trader": { "$ref": "./components/managed_wandering_trader.json" },
Expand Down Expand Up @@ -185,6 +185,7 @@
"minecraft:trade_table": { "$ref": "./components/trade_table.json" },
"minecraft:trail": { "$ref": "./components/trail.json" },
"minecraft:transformation": { "$ref": "./components/transformation.json" },
"minecraft:transient": { "$ref": "./components/transient.json" },
"minecraft:trust": { "$ref": "./components/trust.json" },
"minecraft:trusting": { "$ref": "./components/trusting.json" },
"minecraft:type_family": { "$ref": "./components/type_family.json" },
Expand Down
18 changes: 14 additions & 4 deletions source/behavior/entities/format/components/damage_sensor.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,20 @@
"title": "Damage Multiplier"
},
"deals_damage": {
"type": "boolean",
"default": true,
"description": "If true, the damage dealt to the entity will take away health from it, set to false to make the entity ignore that damage.",
"title": "Deals Damage"
"anyOf": [
{
"type": "boolean",
"default": true,
"description": "If true, the damage dealt to the entity will take away health from it, set to false to make the entity ignore that damage.",
"title": "Deals Damage"
},
{
"default": "yes",
"title": "Deals Damage",
"enum": [ "yes", "no", "no_but_side_effects_apply" ],
"description": "Defines how received damage affects the entity:\n- 'yes', received damage is applied to the entity.\n- 'no', received damage is not applied to the entity.\n- 'no_but_side_effects_apply', received damage is not applied to the entity, but the side effects of the attack are. This means that the attacker's weapon loses durability, enchantment side effects are applied, and so on."
}
]
},
"on_damage": {
"type": "object",
Expand Down
42 changes: 42 additions & 0 deletions source/behavior/entities/format/components/explode.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"additionalProperties": false,
"description": "Defines how the entity explodes.",
"properties": {
"allow_underwater": {
"title": "Allow Underwater",
"description": "If true, the explosion will affect blocks and entities under water.",
"type": "boolean",
"default": false
},
"breaks_blocks": {
"type": "boolean",
"default": true,
Expand All @@ -17,6 +23,12 @@
"description": "If true, blocks in the explosion radius will be set on fire.",
"title": "Causes Fire"
},
"damage_scaling": {
"title": "Damage Scaling",
"description": "A scale factor applied to the explosion's damage to entities. A value of 0 prevents the explosion from dealing any damage. Negative values cause the explosion to heal entities instead.",
"type": "number",
"default": 1.0
},
"destroy_affected_by_griefing": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -56,16 +68,46 @@
"description": "If true, the fuse is already lit when this component is added to the entity.",
"title": "Fuse Lit"
},
"knockback_scaling": {
"title": "Knockback Scaling",
"description": "A scale factor applied to the knockback force caused by the explosion.",
"type": "number",
"default": 1.0
},
"max_resistance": {
"type": "number",
"description": "A blocks explosion resistance will be capped at this value when an explosion occurs.",
"title": "Maximum Resistance"
},
"negates_fall_damage": {
"title": "Negates Fall Damage",
"description": "Defines whether the explosion should apply fall damage negation to Players above the point of collision.",
"type": "boolean",
"default": false
},
"particle_effect": {
"title": "Particle Effect",
"description": "The name of the particle effect to use.",
"enum": ["explosion", "wind_burst", "breeze_wind_burst"],
"default": "explosion"
},
"power": {
"type": "number",
"default": 3,
"description": "The radius of the explosion in blocks and the amount of damage the explosion deals.",
"title": "Power"
},
"sound_effect": {
"title": "Sound Effect",
"description": "The name of the sound effect played when the explosion triggers.",
"type": "string",
"default": "explode"
},
"toggles_blocks": {
"title": "Toggles Blocks",
"description": "If true, the explosion will toggle blocks in the explosion radius.",
"type": "boolean",
"default": false
}
},
"examples": [
Expand Down
8 changes: 7 additions & 1 deletion source/behavior/entities/format/components/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
"type": "string",
"$ref": "../../../../general/item/identifier.json"
}
},
"restriction_type": {
"title": "Restriction Type",
"description": "Defines how the the entity will be restricted to its home position. The possible values are:\n- 'none', which poses no restriction.\n- 'random_movement', which restricts randomized movement to be around the home position.\n- [Beta] 'all_movement', which restricts any kind of movement to be around the home position. However, entities that somehow got too far away from their home will always be able to move closer to it, if prompted to do so.",
"enum": [ "none", "random_movement", "all_movement" ],
"default": "none"
}
},
"examples": [
{
"restriction_radius": -1,
"home_block_list": []
"home_block_list": [ ]
}
]
}
50 changes: 0 additions & 50 deletions source/behavior/entities/format/components/lookat.json

This file was deleted.

84 changes: 84 additions & 0 deletions source/behavior/entities/format/components/looked_at.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.looked_at",
"description": "Defines the behavior when another entity looks at this entity.",
"type": "object",
"title": "Looked At",
"additionalProperties": false,
"properties": {
"field_of_view": {
"type": "number",
"default": 26,
"description": "[Beta] Defines, in degrees, the width of the field of view for entities looking at the owner entity. If 'scale_fov_by_distance' is set to true, this value corresponds to the field of view at a distance of one block between the entities.",
"title": "Field Of View"
},
"filters": {
"$ref": "../../filters/filters.json",
"description": "Defines the entities that can trigger this component.",
"title": "Filters"
},
"find_players_only": {
"title": "Find Players Only",
"description": "[Beta] Limits the search to only the nearest Player that meets the specified \"filters\" rather than all nearby entities.",
"type": "boolean",
"default": false
},
"line_of_sight_obstruction_type": {
"title": "Line Of Sight Obstruction Type",
"description": "[Beta] Defines the type of block shape used to check for line of sight obstructions.",
"type": "string",
"enum": [ "outline", "collision", "collision_for_camera" ],
"default": "collision"
},
"look_at_locations": {
"title": "Look At Locations",
"description": "[Beta] A list of locations on the owner entity towards which line of sight checks are performed. At least one location must be unobstructed for the entity to be considered as looked at.",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"enum": [ "head", "body", "feet" ]
}
},
"looked_at_cooldown": {
"$ref": "../types/range_number_type.json",
"default": [ 0.0, 0.0 ],
"description": "The range for the random amount of time during which the entity is `cooling down` and won't get angered or look for a target.",
"title": "Look Cooldown"
},
"looked_at_event": {
"description": "The event identifier to run when the entities specified in filters look at this entity.",
"title": "Looked At Event",
"$ref": "../types/event_object.json"
},
"not_looked_at_event": {
"description": "[Beta] Defines the event to trigger when no entity is found looking at the owner entity.",
"title": "Not Looked At Event",
"$ref": "../types/event_object.json"
},
"scale_fov_by_distance": {
"title": "Scale Fov By Distance",
"description": "[Beta] When true, the field of view narrows as the distance between the owner entity and the entity looking at it increases. This ensures that the width of the view cone remains somewhat constant towards the owner entity position, regardless of distance.",
"type": "boolean",
"default": false
},
"search_radius": {
"type": "number",
"default": 10,
"description": "Maximum distance this entity will look for another entity looking at it.",
"title": "Search Radius"
},
"set_target": {
"title": "Set Target",
"description": "Defines if and how the owner entity will set entities that are looking at it as its combat targets. Valid values:\n- \"never\", looking entities are never set as targets, but events are emitted.\n- \"once_and_stop_scanning\", the first detected looking entity is set as target. Scanning and event emission is suspended if and until the owner entity has a target.\n- [Beta] \"once_and_keep_scanning\", the first detected looking entity is set as target. Scanning and event emission continues.",
"type": "string",
"default": "once_and_stop_scanning",
"enum": [ "never", "once_and_stop_scanning", "once_and_keep_scanning" ]
}
},
"examples": [
{
"search_radius": 10,
"set_target": true
}
]
}
6 changes: 6 additions & 0 deletions source/behavior/entities/format/components/projectile.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,12 @@
"description": "Determines the velocity of the projectile.",
"title": "Power"
},
"reflect_immunity": {
"type": "number",
"default": 0,
"description": "During the specified time, in seconds, the projectile cannot be reflected by hitting it",
"title": "Reflect Immunity"
},
"reflect_on_hurt": {
"type": "boolean",
"default": false,
Expand Down
9 changes: 9 additions & 0 deletions source/behavior/entities/format/components/transient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.transient",
"type": "object",
"title": "Transient",
"additionalProperties": false,
"description": "An entity with this component will NEVER persist, and forever disappear when unloaded.",
"required": [ ],
"properties": { }
}
Loading

0 comments on commit 32d6a0e

Please sign in to comment.