-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject NBT data into items from a separate file #4114
Labels
Milestone
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
LoneDev6
changed the title
Components with a separate configuration
Inject NBT data into items from a separate file
Dec 6, 2024
I implemented it in 4.0.8 beta-3, available on my Discord. Example{
"components":{
"minecraft:item_name":"'Черепаший нагрудник'",
"minecraft:max_damage":440,
"minecraft:attribute_modifiers":[
{
"id":"turtle_chestplate",
"type":"minecraft:armor",
"amount":6,
"operation":"add_value",
"slot":"chest"
},
{
"id":"turtle_chestplate",
"type":"minecraft:oxygen_bonus",
"amount":1,
"operation":"add_value",
"slot":"chest"
},
{
"id":"turtle_chestplate",
"type":"minecraft:water_movement_efficiency",
"amount":0.3,
"operation":"add_value",
"slot":"chest"
},
{
"id":"turtle_chestplate",
"type":"minecraft:submerged_mining_speed",
"amount":0.26,
"operation":"add_value",
"slot":"chest"
}
],
"minecraft:item_model":"equipments:turtle_chestplate",
"minecraft:equippable":{
"slot":"chest",
"model":"equipments:turtle_armor",
"allowed_entities":"minecraft:player",
"dispensable":true
},
"minecraft:repairable":{
"items":"minecraft:turtle_scute"
}
}
} info:
namespace: test
items:
test_inject_nbt_from_file:
display_name: "Test inject NBT from file"
components_nbt_file: "test_inject_nbt_from_file.json"
resource:
material: IRON_CHESTPLATE
generate: false
model_path: minecraft:item/diamond It also includes a parser for the data, so you get a precise error of where the issue is.
Example malformed json: {
"components":{
"minecraft:item_name":"'Черепаший нагрудник'",
"minecraft:max_damage":440,
"minecraft:attribute_modifiers":[
{
"id":"turtle_chestplate",xxx
"type":"minecraft:armor",
"amount":6,
"operation":"add_value",
"slot":"chest"
}
}
} |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Discord tag (optional)
vova_erofeev
Describe the solution you'd like
I want the components to be independent of the nbt line, like attributes (Attribute modifiers) in the configuration of items.
---- removed old examples, check this message history to read them.
The text was updated successfully, but these errors were encountered: