Skip to content

Commit

Permalink
fix: resummon max iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
edayot committed Nov 1, 2023
1 parent dc85278 commit 6148db7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/simpledrawer/functions/impl/20tick.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set #count_summon simpledrawer.math 0
execute as @e[tag=simpledrawer.new_drawer.part.base] at @s run function simpledrawer:impl/new_drawer/20tick


Expand Down
1 change: 1 addition & 0 deletions data/simpledrawer/functions/impl/load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ scoreboard players set #10000000 simpledrawer.math 10000000
scoreboard players set #100000000 simpledrawer.math 100000000
scoreboard players set #1000000000 simpledrawer.math 1000000000

scoreboard players set #max_resummon simpledrawer.math 32

execute unless score #configured simpledrawer.config matches 1 run function simpledrawer:impl/config/load_default

Expand Down
2 changes: 2 additions & 0 deletions data/simpledrawer/functions/impl/new_drawer/20tick.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ execute
execute
if score #player_nearby simpledrawer.math matches 1
if score @s simpledrawer.new_drawer.as_players_entities matches 0
if score #count_summon simpledrawer.math < #max_resummon simpledrawer.math
run function ./resummon_player_entities:
scoreboard players add #count_summon simpledrawer.math 1
data remove storage simpledrawer:main temp
data modify storage simpledrawer:main temp.simpledrawer set from storage simpledrawer:main ItemsNBT.new_drawer.tag.BlockEntityTag.Items[0].tag.simpledrawer
data modify storage simpledrawer:main temp.simpledrawer set from entity @s item.tag.simpledrawer
Expand Down

0 comments on commit 6148db7

Please sign in to comment.