Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome committed Mar 6, 2025
1 parent 6424af3 commit e2bb3b9
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
#
# For more details, refer to the MPL v2.0.
# ------------------------------------------------------------------------------------------------------------
# @dummy

## === SETUP ===

dummy interaction spawn
fill ~-1 ~-1 ~-1 ~1 ~1 ~1 minecraft:air replace minecraft:barrier
summon minecraft:interaction ~.5 ~ ~1.5 {Tags: ["bs.packtest","bs.packtest.1"], width: 1.0, height: 2.0}
execute as @n[type=minecraft:interaction,tag=bs.packtest,distance=..3] run function #bs.interaction:on_hover_enter { run: "execute unless entity @s[tag=bs.interaction.hovered] run scoreboard players add #packtest.interaction_hover_once bs.data 1", executor: "target" }
Expand All @@ -25,15 +23,15 @@ scoreboard players set #packtest.interaction_hover_once bs.data 0

## === EXPECTED BEHAVIORS ===

assert score #packtest.interaction_hover_once bs.data matches 0
execute positioned ~.5 ~ ~.5 run dummy on_hover_once_1 spawn
await delay 2t
assert score #packtest.interaction_hover_once bs.data matches 1
execute positioned ~.5 ~ ~.5 run dummy on_hover_once spawn
execute positioned ~.5 ~ ~.5 run dummy on_hover_once_2 spawn
await delay 2t
assert score #packtest.interaction_hover_once bs.data matches 1
dummy on_hover_once leave
await delay 1t
dummy on_hover_once_2 leave
await delay 2t
assert score #packtest.interaction_hover_once bs.data matches 1
dummy @s leave
await delay 1t
dummy on_hover_once_1 leave
await delay 2t
assert score #packtest.interaction_hover_once bs.data matches 0

0 comments on commit e2bb3b9

Please sign in to comment.