Skip to content

Commit 8929c64

Browse files
authored
Live Catch - Add salmon sizes (#1182)
1 parent 85727c6 commit 8929c64

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gm4_live_catch/data/gm4_live_catch/function/fish/salmon/summon.mcfunction

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ execute store result storage gm4_live_catch:temp/output Target.Motion[1] double
1414
execute store result storage gm4_live_catch:temp/output Target.Motion[2] double 0.0001 run data get storage gm4_live_catch:temp/input Target.Motion[2] 15000
1515

1616
# summon fish / store data
17-
summon salmon ~ ~1 ~ {Health:1f,Tags:["gm4_lc_salmon_new"]}
17+
execute store result score $salmon_size gm4_live_catch.data run random value 1..1000
18+
execute if score $salmon_size gm4_live_catch.data matches 1..316 run summon salmon ~ ~1 ~ {Health:1f,Tags:["gm4_lc_salmon_new"],type:"small"}
19+
execute if score $salmon_size gm4_live_catch.data matches 317..842 run summon salmon ~ ~1 ~ {Health:1f,Tags:["gm4_lc_salmon_new"],type:"medium"}
20+
execute if score $salmon_size gm4_live_catch.data matches 843..1000 run summon salmon ~ ~1 ~ {Health:1f,Tags:["gm4_lc_salmon_new"],type:"large"}
1821
data modify entity @e[type=salmon,limit=1,tag=gm4_lc_salmon_new] {} merge from storage gm4_live_catch:temp/output Target
1922

2023
# remove

gm4_live_catch/data/gm4_live_catch/function/init.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ execute unless score live_catch gm4_modules matches 1 run data modify storage gm
33
execute unless score live_catch gm4_earliest_version < live_catch gm4_modules run scoreboard players operation live_catch gm4_earliest_version = live_catch gm4_modules
44
scoreboard players set live_catch gm4_modules 1
55

6-
6+
scoreboard objectives add gm4_live_catch.data dummy
77

88
#$moduleUpdateList

0 commit comments

Comments
 (0)