1
0
mirror of https://github.com/LZStealth/armor-statues.git synced 2025-08-12 21:15:52 +01:00

Initial commit for armor statues

This commit is contained in:
MSpaceDev
2021-04-17 12:07:53 +02:00
parent 490890cd34
commit dafdb83c30
116 changed files with 3229 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,31 @@
#
# Description: adjusts probability
# Called by: armor_statues:randomizer/body
# Entity @s: temp armor stand
#
scoreboard players set #x_negative as_angle 0
scoreboard players set #y_negative as_angle 0
scoreboard players set #z_negative as_angle 0
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
# negative modulo
execute if score #random_type as_angle matches 0..1 if score #x_angle as_angle matches ..-1 run scoreboard players set #x_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #y_angle as_angle matches ..-1 run scoreboard players set #y_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #z_angle as_angle matches ..-1 run scoreboard players set #z_negative as_angle 1
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle
# small angle #random_type=0
execute if score #random_type as_angle matches 0 run scoreboard players operation #x_angle as_angle %= #var15000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #y_angle as_angle %= #var15000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #z_angle as_angle %= #var15000 as_angle
# med angle #random_type=1
execute if score #random_type as_angle matches 1 run scoreboard players operation #x_angle as_angle %= #var30000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #y_angle as_angle %= #var30000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #z_angle as_angle %= #var30000 as_angle
# extreme angle #random_type=2 (no modulo)
# reversed negative
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle

View File

@@ -0,0 +1,12 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,31 @@
#
# Description: adjusts probability
# Called by: armor_statues:randomizer/head
# Entity @s: temp armor stand
#
scoreboard players set #x_negative as_angle 0
scoreboard players set #y_negative as_angle 0
scoreboard players set #z_negative as_angle 0
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
# negative modulo
execute if score #random_type as_angle matches 0..1 if score #x_angle as_angle matches ..-1 run scoreboard players set #x_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #y_angle as_angle matches ..-1 run scoreboard players set #y_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #z_angle as_angle matches ..-1 run scoreboard players set #z_negative as_angle 1
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle
# small angle #random_type=0
execute if score #random_type as_angle matches 0 run scoreboard players operation #x_angle as_angle %= #var30000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #y_angle as_angle %= #var30000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #z_angle as_angle %= #var30000 as_angle
# med angle #random_type=1
execute if score #random_type as_angle matches 1 run scoreboard players operation #x_angle as_angle %= #var60000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #y_angle as_angle %= #var60000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #z_angle as_angle %= #var60000 as_angle
# extreme angle #random_type=2 (no modulo)
# reversed negative
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle

View File

@@ -0,0 +1,8 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,12 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,37 @@
#
# Description: adjusts probability
# Called by: armor_statues:randomizer/left_leg
# Entity @s: temp armor stand
#
scoreboard players set #x_negative as_angle 0
scoreboard players set #y_negative as_angle 0
scoreboard players set #z_negative as_angle 0
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
# 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
#execute if score #no_crossing as_angle matches 1 if score #x_angle as_angle matches 10000..170000 run scoreboard players operation #x_angle as_angle -= #var180000 as_angle
execute if score #no_crossing as_angle matches 1 if score #y_angle as_angle matches 10000..170000 run scoreboard players operation #y_angle as_angle -= #var180000 as_angle
execute if score #no_crossing as_angle matches 1 if score #z_angle as_angle matches 10000..170000 run scoreboard players operation #z_angle as_angle -= #var180000 as_angle
# negative modulo
execute if score #random_type as_angle matches 0..1 if score #x_angle as_angle matches ..-1 run scoreboard players set #x_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #y_angle as_angle matches ..-1 run scoreboard players set #y_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #z_angle as_angle matches ..-1 run scoreboard players set #z_negative as_angle 1
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle
# small angle #random_type=0
execute if score #random_type as_angle matches 0 run scoreboard players operation #x_angle as_angle %= #var45000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #y_angle as_angle %= #var45000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #z_angle as_angle %= #var45000 as_angle
# med angle #random_type=1
execute if score #random_type as_angle matches 1 run scoreboard players operation #x_angle as_angle %= #var90000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #y_angle as_angle %= #var90000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #z_angle as_angle %= #var90000 as_angle
# extreme angle #random_type=2 (no modulo)
# reversed negative
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle

View File

@@ -0,0 +1,8 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,12 @@
#
# Description: Randomizes appendage rotation
# 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

View File

@@ -0,0 +1,37 @@
#
# Description: adjusts probability
# Called by: armor_statues:randomizer/right_leg
# Entity @s: temp armor stand
#
scoreboard players set #x_negative as_angle 0
scoreboard players set #y_negative as_angle 0
scoreboard players set #z_negative as_angle 0
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
# 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
#execute if score #no_crossing as_angle matches 1 if score #x_angle as_angle matches -170000..-10000 run scoreboard players operation #x_angle as_angle += #var180000 as_angle
execute if score #no_crossing as_angle matches 1 if score #y_angle as_angle matches -170000..-10000 run scoreboard players operation #y_angle as_angle += #var180000 as_angle
execute if score #no_crossing as_angle matches 1 if score #z_angle as_angle matches -170000..-10000 run scoreboard players operation #z_angle as_angle += #var180000 as_angle
# negative modulo
execute if score #random_type as_angle matches 0..1 if score #x_angle as_angle matches ..-1 run scoreboard players set #x_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #y_angle as_angle matches ..-1 run scoreboard players set #y_negative as_angle 1
execute if score #random_type as_angle matches 0..1 if score #z_angle as_angle matches ..-1 run scoreboard players set #z_negative as_angle 1
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle
# small angle #random_type=0
execute if score #random_type as_angle matches 0 run scoreboard players operation #x_angle as_angle %= #var45000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #y_angle as_angle %= #var45000 as_angle
execute if score #random_type as_angle matches 0 run scoreboard players operation #z_angle as_angle %= #var45000 as_angle
# med angle #random_type=1
execute if score #random_type as_angle matches 1 run scoreboard players operation #x_angle as_angle %= #var90000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #y_angle as_angle %= #var90000 as_angle
execute if score #random_type as_angle matches 1 run scoreboard players operation #z_angle as_angle %= #var90000 as_angle
# extreme angle #random_type=2 (no modulo)
# reversed negative
execute if score #x_negative as_angle matches 1 run scoreboard players operation #x_angle as_angle *= #var-1 as_angle
execute if score #y_negative as_angle matches 1 run scoreboard players operation #y_angle as_angle *= #var-1 as_angle
execute if score #z_negative as_angle matches 1 run scoreboard players operation #z_angle as_angle *= #var-1 as_angle