Skip to content

Commit

Permalink
Card Display: Fix y positioning for negative y coordinates
Browse files Browse the repository at this point in the history
This calculates the correct amount of spaces, even when the y coordinate
becomes negative
  • Loading branch information
NeunEinser committed Mar 4, 2021
1 parent 2e6426a commit 0757702
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/bingo/functions/card_display/display_card.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ scoreboard players enable @s bingo.card_pos
execute store result score $y bingo.tmp run data get entity @s Pos[1]

data modify storage bingo:tmp ySpaces set value [""]
execute if score $y bingo.tmp matches ..99 run data modify storage bingo:tmp ySpaces append value ""
execute if score $y bingo.tmp matches ..9 run data modify storage bingo:tmp ySpaces append value ""
execute if score $y bingo.tmp matches 0..99 run data modify storage bingo:tmp ySpaces append value ""
execute if score $y bingo.tmp matches 0..9 run data modify storage bingo:tmp ySpaces append value ""
execute if score $y bingo.tmp matches -9..-1 run data modify storage bingo:tmp ySpaces append value ""

data modify storage bingo:tmp timeSpaces set value []
execute if score $hours timer_main matches ..99 run data modify storage bingo:tmp timeSpaces append value ""
Expand Down

0 comments on commit 0757702

Please sign in to comment.