-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
215 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Data driven | ||
|
||
## Datapack structure | ||
|
||
+ \<path-to-save\>/datapacks | ||
+ \<pack-name\> | ||
+ data | ||
+ item | ||
+ This directory is items, data type is '.json' | ||
+ block | ||
+ This directory is blocks, data type is '.json' | ||
+ entity | ||
+ This directory is entities, data type is '.json' | ||
+ property | ||
+ item | ||
+ This directory is item properties injectors, data type is '.json' | ||
+ block | ||
+ This directory is block properties injectors, data type is '.json', current is no impls. | ||
+ script | ||
+ This directory is scripts, data type is 'kts', '.ts' and '.js' | ||
|
||
## Templates or components | ||
|
||
For conium templates, see [Conium data driven](/document/data-driven/conium/README.md). | ||
|
||
For bedrock components, see [Bedrock data driven](/document/data-driven/bedrock/README.md). | ||
|
||
## Conium schema | ||
|
||
```json5 | ||
{ | ||
// If using conium schema, 'schema' is required. | ||
"schema_style": "conium", | ||
// The identifier must present. | ||
"identifier": "awa:conium", | ||
"templates": { | ||
// The components where here following listed. | ||
} | ||
} | ||
``` | ||
|
||
Example: | ||
|
||
```json5 | ||
{ | ||
"schema_style": "conium", | ||
"identifier": "awa:conium", | ||
"templates": { | ||
"tool": { | ||
// The damage amount when hitting the entity. | ||
"attack_damage": 100, | ||
// The cooldown modifier after once attack. | ||
"attack_speed": -3.0, | ||
// The durability amount. | ||
"durability": 50, | ||
// Which blocks this tool can mine. | ||
// This value is a tag key. | ||
"effective_blocks": "minecraft:mineable/pickaxe", | ||
// This tool is what material. | ||
"material": "netherite", | ||
// This tool is weapon or not. | ||
// The durability will decrement 2 after this tool damage to entity when it not weapon. | ||
"is_weapon": false | ||
}, | ||
// Setting this tool item can destroy blocks in creative mode. | ||
"can_destroy_in_creative": true, | ||
// The max item stack size. | ||
// The size value must in range 1 to 64. | ||
"max_count": 64 | ||
} | ||
} | ||
``` | ||
|
||
## bedrock schema | ||
|
||
```json5 | ||
{ | ||
// If using bedrock schema, 'schema' can be missing. | ||
"schema_style": "bedrock", | ||
// Format version is always can be missing, conium is supporting to the schemas by all versions. | ||
"format_version": "1.20.10", | ||
"minecraft:item": { | ||
// Description and identifier must present. | ||
"description": { | ||
"identifier": "awa:bedrock" | ||
}, | ||
"components": { | ||
// The components where here following listed. | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Example: | ||
|
||
```json5 | ||
{ | ||
"minecraft:item": { | ||
// Description and identifier must present. | ||
"description": { | ||
"identifier": "awa:bedrock" | ||
}, | ||
"components": { | ||
// The damage amount when hitting the entity. | ||
"minecraft:damage": 10, | ||
// The durability amount of tool item. | ||
// When damage chance is missing, it can be abbreviated as: | ||
// "minecraft:durability": <int> | ||
"minecraft:durability": { | ||
// The amount. | ||
"max_durability": 50 | ||
}, | ||
// The max item stack size. | ||
// The size value must in range 1 to 64. | ||
// It can be abbreviated as: | ||
// "minecraft:max_stack_size": <int> | ||
"minecraft:max_stack_size": { | ||
"value": 64 | ||
} | ||
}, | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Items | ||
|
||
| Bedrock schema impls | Conium schema key | Notes | Value type | | ||
|:------------------------------------------:|------------------------------:|:----------------------------------------------------------------:|:---------------------------:| | ||
| minecraft:damage | attack_damage (```tool```) | Setting tool damage amount to entities | float | | ||
| minecraft:durability | durability (```tool```) | Setting tool durability | int | | ||
| damage_chance (```minecraft:durability```) | damage_chance (```tool```) | Setting the probability of durability consuming | float | | ||
| minecraft:can_destroy_in_creative | can_destroy_in_creative | Setting block breakable in creative mode when holding this item | boolean | | ||
| minecraft:max_stack_size | max_count | Setting the max item stack count of the item | int | | ||
| minecraft:food | food | Setting the item be a food | Food object | | ||
| can_always_eat (```minecraft:food```) | can_always_eat (```food```) | Setting the food can always eats (no cooldown) | boolean | | ||
| nutrition (```minecraft:food```) | nutrition (```food```) | Setting the nutrition of the food | int | | ||
| saturation_modifier (```minecraft:food```) | saturation (```food```) | Setting the saturation of the food | float | | ||
| using_converts_to (minecraft:food) | convert_to (```consumable```) | Setting the item will convert to other item when used | string or Item stack object | | ||
| minecraft:rarity | rarity | Setting the rarity of the item | string | | ||
| minecraft:use_animation | use_action | Setting the using action of the item (client animation) | string | | ||
| minecraft:fuel | fuel | Setting the item can be put into furnaces and provides fuel time | int or Fuel object | | ||
| minecraft:glint | glint | Setting the item will glint showing (client display) | boolean | | ||
| protection (minecraft:wearable) | defense (```armor```) | Setting the armor providing how much protection (defense) | float | | ||
| slot (minecraft:wearable) | slot (```armor```) | Setting the armor can wearing to what slot | string | | ||
|
||
## Blocks | ||
|
||
| Bedrock schema impls | Conium schema key | Notes | Value type | | ||
|:--------------------------------:|------------------:|:------------------------------------------------------------------:|:----------------:| | ||
| minecraft:destructible_by_mining | hardness | Setting the hardness of the block | float | | ||
| minecraft:map_color | map_color | Setting the map color of the block (Not completed) | Map color object | | ||
| minecraft:light_emission | luminance | Setting the lighting of the block (like torch or burning furnaces) | int | | ||
| minecraft:collision_box | collision | Setting the collision box of the block | Collision object | | ||
|
||
## Entities | ||
Entities supported to defines 'component_groups' in bedrock schema, but unable to switching now. | ||
|
||
| Bedrock schema impls | Conium schema key | Notes | Value type | | ||
|:-----------------------:|------------------:|:---------------------------------------------------------------------------:|:--------------------------:| | ||
| minecraft:collision_box | dimension | Setting the collision box of the entity | Dimension object | | ||
| minecraft:pushable | pushable | Setting the entity is can be pushing by other entities or pistons or fluids | boolean or Pushable object | |
Oops, something went wrong.