Skip to content

Commit

Permalink
item modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorinanutshell committed May 21, 2022
1 parent c4c9ec1 commit 4e80320
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
execute if data storage nauthack:nauthack nautray.args.nauthack_collision unless block ~ ~ ~ #nauthack:non_solid run scoreboard players set nautray_move nautmath_var 0
execute if data storage nauthack:nauthack nautray.args.nauthack_collision if entity @e[type = !#nauthack:nocoll, distance = ..1.5, team = !nauthack_nocoll] run scoreboard players set nautray_move nautmath_var 0
execute if data storage nauthack:nauthack nautray.args.nauthack_collision if entity @e[type = !#nauthack:nocoll, distance = ..1.5, team = !nautcore_nocoll] run scoreboard players set nautray_move nautmath_var 0
2 changes: 1 addition & 1 deletion data/nauthack/functions/nautray/raycycle.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ function nauthack:nautray/condition
function #nauthack:nautray/effects

scoreboard players remove nautray_power nautmath_var 1
tp ^ ^ ^0.25
execute at @s anchored feet run tp ^ ^ ^0.25

execute if score nautray_move nautmath_var matches 1 at @s anchored feet run function nauthack:nautray/raycycle
10 changes: 9 additions & 1 deletion data/nauthack/functions/nauttime/tick.mcfunction
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
scoreboard players add nauttime_tick nautmath_var 1

execute if score nauttime_tick nautmath_var matches 5 run function nauthack:nauttime/5tick
execute if score nauttime_tick nautmath_var matches 5 run function nauthack:nauttime/5tick

execute unless score nauttime_odd nautmath_var matches 1 run scoreboard players set nauttime_odd nautmath_var 2
execute if score nauttime_odd nautmath_var matches 1 run scoreboard players set nauttime_odd nautmath_var 0
execute if score nauttime_odd nautmath_var matches 2 run scoreboard players set nauttime_odd nautmath_var 1

execute if score nauttime_odd nautmath_var matches 1 unless score nauttime_odd_odd nautmath_var matches 1 run scoreboard players set nauttime_odd_odd nautmath_var 2
execute if score nauttime_odd nautmath_var matches 1 if score nauttime_odd_odd nautmath_var matches 1 run scoreboard players set nauttime_odd_odd nautmath_var 0
execute if score nauttime_odd nautmath_var matches 1 if score nauttime_odd_odd nautmath_var matches 2 run scoreboard players set nauttime_odd_odd nautmath_var 1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "item_attribute_speed"
},
"score": "nautmath_var",
"scale": 0.1
"scale": 0.01
},
"operation": "addition",
"slot": "chest"
Expand Down
6 changes: 6 additions & 0 deletions data/nauthack/item_modifiers/attribute/clear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"function": "minecraft:set_nbt",
"tag": "{AttributeModifiers: []}"
}
]
2 changes: 1 addition & 1 deletion data/nauthack/item_modifiers/attribute/feet/speed.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "item_attribute_speed"
},
"score": "nautmath_var",
"scale": 0.1
"scale": 0.01
},
"operation": "addition",
"slot": "feet"
Expand Down
2 changes: 1 addition & 1 deletion data/nauthack/item_modifiers/attribute/helmet/speed.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "item_attribute_speed"
},
"score": "nautmath_var",
"scale": 0.1
"scale": 0.01
},
"operation": "addition",
"slot": "head"
Expand Down
2 changes: 1 addition & 1 deletion data/nauthack/item_modifiers/attribute/leggings/speed.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "item_attribute_speed"
},
"score": "nautmath_var",
"scale": 0.1
"scale": 0.01
},
"operation": "addition",
"slot": "legs"
Expand Down
3 changes: 2 additions & 1 deletion data/nauthack/item_modifiers/damage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"type": "minecraft:fixed",
"name": "item_damage"
},
"score": "nautmath_var"
"score": "nautmath_var",
"scale": 0.001
},
"add": true
}
Expand Down
3 changes: 1 addition & 2 deletions data/nauthack/tags/entity_types/nocoll.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"minecraft:armor_stand",
"minecraft:eye_of_ender",
"minecraft:fishing_bobber",
"minecraft:marker",
"minecraft:player"
"minecraft:marker"
]
}

0 comments on commit 4e80320

Please sign in to comment.