Skip to content

Commit

Permalink
Refactor Moon Daggers and Night Vision helm
Browse files Browse the repository at this point in the history
Closes #141 and closes #147
  • Loading branch information
Nincodedo committed Aug 21, 2023
1 parent 7ceb60a commit aa69b14
Show file tree
Hide file tree
Showing 10 changed files with 391 additions and 237 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scoreboard players set moondagger rhcdata 1
scoreboard players set nightvision rhcdata 2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scoreboard players set global goggles 1
scoreboard players set nightvision rhcdata 1
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ scoreboard players set @s[predicate=!nincodedo:is/entity/wearing/netherite/helme

tellraw @a[tag=debug_logging] [{"text":"[Debug] Night Vision Armor: Changed to ","extra":[{"score":{"name":"@s","objective":"nightvision_armor_changed"}}]},{"text":" total: ","extra":[{"score":{"name":"@s","objective":"nightvision_armor_total"}}]}]

item replace entity @s[scores={nightvision_armor_changed=1,nightvision_armor_total=..7}] armor.head with leather_helmet
item replace entity @s[scores={nightvision_armor_changed=2,nightvision_armor_total=8..9}] armor.head with golden_helmet
item replace entity @s[scores={nightvision_armor_changed=3,nightvision_armor_total=10..11}] armor.head with chainmail_helmet
item replace entity @s[scores={nightvision_armor_changed=4,nightvision_armor_total=12..18}] armor.head with iron_helmet
item replace entity @s[scores={nightvision_armor_changed=5,nightvision_armor_total=19..26}] armor.head with diamond_helmet
item replace entity @s[scores={nightvision_armor_changed=6,nightvision_armor_total=27..}] armor.head with netherite_helmet

item modify entity @s[scores={nightvision_armor_changed=1..}] armor.head nincodedo:uniqueitems/nightvision_reconstruct
loot replace entity @s[scores={nightvision_armor_changed=1..}] armor.head loot nincodedo:uniqueitems/nightvision_update

advancement revoke @s only nincodedo:unique_items/nightvision/update_armor
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
scoreboard objectives add used_ms minecraft.used:minecraft.carrot_on_a_stick
scoreboard objectives add goggles dummy
scoreboard objectives add sheephorn dummy
scoreboard objectives add used_th minecraft.used:minecraft.goat_horn
scoreboard objectives add projectilelife dummy
Expand All @@ -14,10 +13,9 @@ execute unless score torchbow rhcdata matches 1 run scoreboard players set torch
execute unless score iridiumrod rhcdata matches 1 run scoreboard players set iridiumrod rhcdata 0
execute unless score mastersword rhcdata matches 1..2 run scoreboard players set mastersword rhcdata 0
execute unless score masterswordfirst rhcdata matches 1.. run scoreboard players set masterswordfirst rhcdata 0
execute unless score global goggles matches 1 run scoreboard players set global goggles 0
execute unless score nightvision rhcdata matches 1..2 run scoreboard players set nightvision rhcdata 0
execute unless score global sheephorn matches 1 run scoreboard players set global sheephorn 0
execute unless score potionhorn rhcdata matches 1..2 run scoreboard players set potionhorn rhcdata 0
execute unless score moondagger rhcdata matches 1 run scoreboard players set moondagger rhcdata 0
scoreboard players set config_torchbow_motion rhcconfig 1
scoreboard players set config_ms_cooldown rhcconfig 40
scoreboard players set config_ms_projlife rhcconfig 30
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "global"
"name": "nightvision"
},
"score": "goggles"
"score": "rhcdata"
},
"range": 0
}
Expand All @@ -49,7 +49,7 @@
]
},
{
"rolls": 2,
"rolls": 1,
"entries": [
{
"type": "minecraft:loot_table",
Expand All @@ -61,11 +61,11 @@
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "moondagger"
"name": "nightvision"
},
"score": "rhcdata"
},
"range": 0
"range": 1
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "global"
"name": "nightvision"
},
"score": "goggles"
"score": "rhcdata"
},
"range": 0
}
Expand Down Expand Up @@ -143,11 +143,11 @@
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "moondagger"
"name": "nightvision"
},
"score": "rhcdata"
},
"range": 0
"range": 1
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pools": [
{
"rolls": 1,
"rolls": 2,
"entries": [
{
"type": "minecraft:item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,6 @@
}
]
}
],
"conditions": [
{
"condition": "minecraft:value_check",
"value": {
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "global"
},
"score": "goggles"
},
"range": 0
}
]
}
],
Expand Down
Loading

0 comments on commit aa69b14

Please sign in to comment.