mirror of
https://github.com/LZStealth/armor-statues.git
synced 2025-06-07 17:16:44 +01:00
Optimized random pose
This commit is contained in:
parent
2563f7fe76
commit
8fd8ab69be
@ -3,10 +3,27 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_x" }].Amount 1000
|
||||
execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_y" }].Amount 1000
|
||||
execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_z" }].Amount 1000
|
||||
function armor_statues:randomizer/body_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Body[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Body[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Body[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
#execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_x" }].Amount 1000
|
||||
#execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_y" }].Amount 1000
|
||||
#execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"body_z" }].Amount 1000
|
||||
#function armor_statues:randomizer/body_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Body[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Body[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Body[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
|
||||
# Sets random angle type
|
||||
scoreboard players set #random_type as_angle 0
|
||||
execute if predicate armor_statues:random_chance_10 run scoreboard players set #random_type as_angle 1
|
||||
execute if score #random_type as_angle matches 1 if predicate armor_statues:random_chance_30 run scoreboard players set #random_type as_angle 2
|
||||
# small angle #random_type=0
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Body[0] float 0.001 run random value -15000..15000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Body[1] float 0.001 run random value -15000..15000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Body[2] float 0.001 run random value -15000..15000
|
||||
# med angle #random_type=1
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Body[0] float 0.001 run random value -30000..30000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Body[1] float 0.001 run random value -30000..30000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Body[2] float 0.001 run random value -30000..30000
|
||||
# extreme angle #random_type=2
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Body[0] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Body[1] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Body[2] float 0.001 run random value -180000..180000
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Description: adjusts probability
|
||||
# Called by: armor_statues:randomizer/body
|
||||
# Called by: UNUSED
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
scoreboard players set #x_negative as_angle 0
|
||||
|
@ -3,10 +3,27 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_x" }].Amount 1000
|
||||
execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_y" }].Amount 1000
|
||||
execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_z" }].Amount 1000
|
||||
function armor_statues:randomizer/head_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Head[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Head[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.Head[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
#execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_x" }].Amount 1000
|
||||
#execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_y" }].Amount 1000
|
||||
#execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"head_z" }].Amount 1000
|
||||
#function armor_statues:randomizer/head_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Head[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Head[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.Head[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
|
||||
# Sets random angle type
|
||||
scoreboard players set #random_type as_angle 0
|
||||
execute if predicate armor_statues:random_chance_20 run scoreboard players set #random_type as_angle 1
|
||||
execute if score #random_type as_angle matches 1 if predicate armor_statues:random_chance_40 run scoreboard players set #random_type as_angle 2
|
||||
# small angle #random_type=0
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Head[0] float 0.001 run random value -30000..30000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Head[1] float 0.001 run random value -30000..30000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.Head[2] float 0.001 run random value -30000..30000
|
||||
# med angle #random_type=1
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Head[0] float 0.001 run random value -60000..60000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Head[1] float 0.001 run random value -60000..60000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.Head[2] float 0.001 run random value -60000..60000
|
||||
# extreme angle #random_type=2
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Head[0] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Head[1] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.Head[2] float 0.001 run random value -180000..180000
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Description: adjusts probability
|
||||
# Called by: armor_statues:randomizer/head
|
||||
# Called by: UNUSED
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
scoreboard players set #x_negative as_angle 0
|
||||
|
@ -3,6 +3,11 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[0] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_x" }].Amount 1000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[1] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_y" }].Amount 1000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[2] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_z" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[0] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_x" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[1] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_y" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[2] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_arm_z" }].Amount 1000
|
||||
|
||||
#
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[0] float 0.001 run random value -180000..180000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[1] float 0.001 run random value -180000..180000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftArm[2] float 0.001 run random value -180000..180000
|
@ -3,10 +3,60 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_x" }].Amount 1000
|
||||
execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_y" }].Amount 1000
|
||||
execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_z" }].Amount 1000
|
||||
function armor_statues:randomizer/left_leg_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
#execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_x" }].Amount 1000
|
||||
#execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_y" }].Amount 1000
|
||||
#execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"left_leg_z" }].Amount 1000
|
||||
#function armor_statues:randomizer/left_leg_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
|
||||
# Sets angle type
|
||||
scoreboard players set #random_type as_angle 0
|
||||
execute if predicate armor_statues:random_chance_30 run scoreboard players set #random_type as_angle 1
|
||||
execute if score #random_type as_angle matches 1 if predicate armor_statues:random_chance_50 run scoreboard players set #random_type as_angle 2
|
||||
# small angle #random_type=0
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run random value -45000..45000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run random value -45000..45000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run random value -45000..45000
|
||||
# med angle #random_type=1
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run random value -90000..90000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run random value -90000..90000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run random value -90000..90000
|
||||
# extreme angle #random_type=2
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run random value -180000..180000
|
||||
# crossing reduction
|
||||
scoreboard players set #no_crossing as_angle 0
|
||||
execute if predicate armor_statues:random_chance_85 run scoreboard players set #no_crossing as_angle 1
|
||||
# x
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.LeftLeg[0]
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[0] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
||||
# y
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.LeftLeg[1]
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[1] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
||||
# z
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.LeftLeg[2]
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.LeftLeg[2] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Description: adjusts probability
|
||||
# Called by: armor_statues:randomizer/left_leg
|
||||
# Called by: UNUSED
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
scoreboard players set #x_negative as_angle 0
|
||||
|
@ -3,6 +3,11 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[0] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_x" }].Amount 1000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[1] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_y" }].Amount 1000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[2] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_z" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[0] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_x" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[1] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_y" }].Amount 1000
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[2] float 0.001 run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_arm_z" }].Amount 1000
|
||||
|
||||
#
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[0] float 0.001 run random value -180000..180000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[1] float 0.001 run random value -180000..180000
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightArm[2] float 0.001 run random value -180000..180000
|
@ -3,10 +3,60 @@
|
||||
# Called by: armor_statues:trigger/random_pose
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_x" }].Amount 1000
|
||||
execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_y" }].Amount 1000
|
||||
execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_z" }].Amount 1000
|
||||
function armor_statues:randomizer/right_leg_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
#execute store result score #x_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_x" }].Amount 1000
|
||||
#execute store result score #y_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_y" }].Amount 1000
|
||||
#execute store result score #z_angle as_angle run data get entity @s ArmorItems[3].tag.AttributeModifiers[{ "Name":"right_leg_z" }].Amount 1000
|
||||
#function armor_statues:randomizer/right_leg_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run scoreboard players get #x_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run scoreboard players get #y_angle as_angle
|
||||
#execute store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run scoreboard players get #z_angle as_angle
|
||||
|
||||
# Sets angle type
|
||||
scoreboard players set #random_type as_angle 0
|
||||
execute if predicate armor_statues:random_chance_30 run scoreboard players set #random_type as_angle 1
|
||||
execute if score #random_type as_angle matches 1 if predicate armor_statues:random_chance_50 run scoreboard players set #random_type as_angle 2
|
||||
# small angle #random_type=0
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run random value -45000..45000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run random value -45000..45000
|
||||
execute if score #random_type as_angle matches 0 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run random value -45000..45000
|
||||
# med angle #random_type=1
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run random value -90000..90000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run random value -90000..90000
|
||||
execute if score #random_type as_angle matches 1 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run random value -90000..90000
|
||||
# extreme angle #random_type=2
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run random value -180000..180000
|
||||
execute if score #random_type as_angle matches 2 store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run random value -180000..180000
|
||||
# crossing reduction
|
||||
scoreboard players set #no_crossing as_angle 0
|
||||
execute if predicate armor_statues:random_chance_85 run scoreboard players set #no_crossing as_angle 1
|
||||
# x
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.RightLeg[0]
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
#execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.RightLeg[0] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
||||
# y
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.RightLeg[1]
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.RightLeg[1] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
||||
# z
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result score #angle as_angle run \
|
||||
data get storage customizable_armor_stands:pose_storage Pose.RightLeg[2]
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
if score #angle as_angle matches 10000..170000 run \
|
||||
scoreboard players operation #angle as_angle -= #var180000 as_angle
|
||||
execute if score #no_crossing as_angle matches 1 \
|
||||
store result storage customizable_armor_stands:pose_storage Pose.RightLeg[2] float 0.001 run \
|
||||
scoreboard players get #angle as_angle
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Description: adjusts probability
|
||||
# Called by: armor_statues:randomizer/right_leg
|
||||
# Called by: UNUSED
|
||||
# Entity @s: temp armor stand
|
||||
#
|
||||
scoreboard players set #x_negative as_angle 0
|
||||
|
@ -4,20 +4,27 @@
|
||||
# Entity @s: armor stand
|
||||
#
|
||||
# Summons temp armor stand
|
||||
summon minecraft:armor_stand ~ 0 ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
#summon minecraft:armor_stand ~ 0 ~ {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1b,Tags:["as_temp_armor_stand"],DisabledSlots:4144959,Silent:1b}
|
||||
#
|
||||
data modify storage customizable_armor_stands:pose_storage Pose set value {Head:[0.0f,0.001f,0.0f], Body:[0.0f,0.001f,0.0f], LeftArm:[-10.0f,0.001f,-10.0f], RightArm:[-15.0f,0.001f,10.0f], LeftLeg:[-1.0f,0.001f,-1.0f], RightLeg:[1.0f,0.001f,1.0f]}
|
||||
#
|
||||
loot replace entity @e[type=minecraft:armor_stand,tag=as_temp_armor_stand] armor.head loot armor_statues:random_pose
|
||||
#loot replace entity @e[type=minecraft:armor_stand,tag=as_temp_armor_stand] armor.head loot armor_statues:random_pose
|
||||
#
|
||||
# Generate randomizers
|
||||
#
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/head
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/body
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/left_arm
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/right_arm
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/left_leg
|
||||
execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/right_leg
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/head
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/body
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/left_arm
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/right_arm
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/left_leg
|
||||
#execute as @e[type=minecraft:armor_stand,sort=nearest,limit=1,tag=as_temp_armor_stand] run function armor_statues:randomizer/right_leg
|
||||
function armor_statues:randomizer/head
|
||||
function armor_statues:randomizer/body
|
||||
function armor_statues:randomizer/left_arm
|
||||
function armor_statues:randomizer/right_arm
|
||||
function armor_statues:randomizer/left_leg
|
||||
function armor_statues:randomizer/right_leg
|
||||
#
|
||||
#
|
||||
# Sets random pose
|
||||
#
|
||||
@ -25,7 +32,7 @@ data modify entity @s Pose set from storage customizable_armor_stands:pose_stora
|
||||
#
|
||||
# Kills temp armor stand
|
||||
#
|
||||
kill @e[type=armor_stand,tag=as_temp_armor_stand]
|
||||
#kill @e[type=armor_stand,tag=as_temp_armor_stand]
|
||||
#
|
||||
# Tag the armor stand as modified
|
||||
#
|
||||
|
@ -1,6 +1,10 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 15,
|
||||
"pack_format": 18,
|
||||
"supported_formats": {
|
||||
"min_inclusive": 18,
|
||||
"max_inclusive": 18
|
||||
},
|
||||
"description": [{"text":"Armor Statues","color":"gold"},{"text":"\n","color":"yellow"}]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user