Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gm4_heart_canisters/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ meta:
lib_custom_crafters: 3.4.0
schedule_loops: [main]
model_data:
- item: poisonous_potato
- item: player_head
Comment thread
misode marked this conversation as resolved.
template: generated
broadcast:
- reference: item/heart_canister_tier_1
- reference: item/heart_canister_tier_2
- item: poisonous_potato
- item: player_head
reference: gui/advancement/heart_canisters_tier_1
template:
name: advancement
forward: item/heart_canister_tier_1
- item: poisonous_potato
- item: player_head
template:
name: advancement
forward: item/heart_canister_tier_2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"display": {
"icon": {
"id": "poisonous_potato",
"id": "player_head",
"components": {
"minecraft:custom_model_data": "gui/advancement/heart_canisters_max",
"minecraft:profile": "$heart_canister_tier_2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"display": {
"icon": {
"id": "poisonous_potato",
"id": "player_head",
"components": {
"minecraft:custom_model_data": "gui/advancement/heart_canisters_tier_1",
"minecraft:profile": "$heart_canister_tier_1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"display": {
"icon": {
"id": "poisonous_potato",
"id": "player_head",
"components": {
"minecraft:custom_model_data": "gui/advancement/heart_canisters_tier_2",
"minecraft:profile": "$heart_canister_tier_2"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"criteria": {
"upgrade_heart_canisters": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": "player_head",
"predicates": {
"minecraft:custom_data": {
"gm4_heart_canister": 1
}
}
}
]
}
}
},
"rewards": {
"function": "gm4_heart_canisters:upgrade_path/upgrade_heart_canisters"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

execute if score $tier_1 gm4_heart_can matches 1.. run loot give @s loot gm4_heart_canisters:items/tier_1_heart_canister
scoreboard players remove $tier_1 gm4_heart_can 1
execute if score $tier_1 gm4_heart_can matches 1.. run function gm4_heart_canisters:upgrade_path/loop_1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

execute if score $tier_2 gm4_heart_can matches 1.. run loot give @s loot gm4_heart_canisters:items/tier_2_heart_canister
scoreboard players remove $tier_2 gm4_heart_can 1
execute if score $tier_2 gm4_heart_can matches 1.. run function gm4_heart_canisters:upgrade_path/loop_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
advancement revoke @s only gm4_heart_canisters:upgrade_path

execute store result score $tier_1 gm4_heart_can run clear @s player_head[minecraft:custom_data~{gm4_heart_canister_tier:1b}]
execute store result score $tier_2 gm4_heart_can run clear @s player_head[minecraft:custom_data~{gm4_heart_canister_tier:2b}]

execute if score $tier_1 gm4_heart_can matches 1.. run function gm4_heart_canisters:upgrade_path/loop_1
execute if score $tier_2 gm4_heart_can matches 1.. run function gm4_heart_canisters:upgrade_path/loop_2
Loading