Skip to content

Commit

Permalink
⚔️ prevent homing-vines-blinking-lane from appearing aboveground when…
Browse files Browse the repository at this point in the history
… player is too high
  • Loading branch information
TheAfroOfDoom committed Oct 21, 2024
1 parent cd9fac5 commit 72406ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ execute store result storage omegaflowey:utils.math.min b int 1 run scoreboard p
function omegaflowey.utils:math/min
execute store result score @s omegaflowey.attack.position.x run data get storage omegaflowey:utils.math.min out

# Bound y-position so it doesn't aim the blinking lane too high, else
# we can see the blinking lane aboveground sometimes
execute store result score @s omegaflowey.attack.position.y run data get entity @s Pos[1] 100
scoreboard players set @s omegaflowey.math.0 400
scoreboard players operation @s omegaflowey.math.0 += #omegaflowey.bossfight.summit.origin.y omegaflowey.global.flag
execute store result storage omegaflowey:utils.math.min a int 1 run scoreboard players get @s omegaflowey.math.0
execute store result storage omegaflowey:utils.math.min b int 1 run scoreboard players get @s omegaflowey.attack.position.y
function omegaflowey.utils:math/min
execute store result score @s omegaflowey.attack.position.y run data get storage omegaflowey:utils.math.min out

# Randomize delta-z-position of indicator at (z: omegaflowey.player.Position.z, dx: [-1.00..1.00])
# TODO(41): validate this dz range
execute store result score @s omegaflowey.attack.position.z run data get entity @s Pos[2] 100
Expand All @@ -44,4 +54,5 @@ execute store result score @s omegaflowey.attack.position.z run data get storage

# Store new position to NBT
execute store result entity @s Pos[0] double 0.01 run scoreboard players get @s omegaflowey.attack.position.x
execute store result entity @s Pos[1] double 0.01 run scoreboard players get @s omegaflowey.attack.position.y
execute store result entity @s Pos[2] double 0.01 run scoreboard players get @s omegaflowey.attack.position.z
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"render_order": "default",
"allow_mirror_modeling": true,
"from": [-8, 12, -501.1],
"to": [-7.5, 12, 498.9],
"to": [-7.5, 12, 382.9],
"autouv": 0,
"color": 3,
"origin": [0, 11, 0],
Expand Down Expand Up @@ -91,7 +91,7 @@
"render_order": "default",
"allow_mirror_modeling": true,
"from": [7.5, 12, -501.1],
"to": [8, 12, 498.9],
"to": [8, 12, 382.9],
"autouv": 0,
"color": 3,
"origin": [0, 11, 0],
Expand Down Expand Up @@ -176,7 +176,7 @@
"internal": false,
"saved": true,
"uuid": "f5af35d5-3b6f-d0f1-08ce-40d942d8a3ea",
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAAAXNSR0IArs4c6QAAADRJREFUSEtjfHlzwn8GCgDjqAEMo2HAMBoGDMMjDBYaGlFWHowawMA4GgajYQAqD4Z+OgAAVXFVYfqulm0AAAAASUVORK5CYII=",
"source": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAAAXNSR0IArs4c6QAAADRJREFUSEtjfHlzwj8GCgDjqAEMo2HAMBoGDMMjDBYaGlFWHowawMA4GgajYQAqD4Z+OgAAz9JVQS8x2WQAAAAASUVORK5CYII=",
"mode": "bitmap"
}
],
Expand Down

0 comments on commit 72406ff

Please sign in to comment.