From 77f0e689f84a601f5da4aaf2308bccf74a531346 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 24 Jul 2021 16:59:58 +0800 Subject: Initial public release (minecraft 1.17.1). --- .../structgen/helpers/amethyst/cast_ray.mcfunction | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction (limited to 'data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction') 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 -- cgit v1.2.3