diff options
author | Chris Xiong <chirs241097@gmail.com> | 2021-07-24 16:59:58 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2021-07-24 16:59:58 +0800 |
commit | 77f0e689f84a601f5da4aaf2308bccf74a531346 (patch) | |
tree | 8154832f6c4ac0d071a771657c4a67c6a024f398 /data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction | |
download | bktmc-skyblock-77f0e689f84a601f5da4aaf2308bccf74a531346.tar.xz |
Initial public release (minecraft 1.17.1).
Diffstat (limited to 'data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction')
-rw-r--r-- | data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction b/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction new file mode 100644 index 0000000..74ec2b3 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction @@ -0,0 +1,13 @@ +summon armor_stand ~ ~ ~ {Glowing:1,NoGravity:1} + +scoreboard players set #a lim 360 +function bktsb:rng +execute store result entity @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] Rotation[0] float 1.0 run scoreboard players get #a randr + +scoreboard players set #a lim 181 +function bktsb:rng +scoreboard players set #a lim 90 +scoreboard players operation #a randr -= #a lim +execute store result entity @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] Rotation[1] float 1.0 run scoreboard players get #a randr + +tag @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] add ame_rays |