Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oOBoomberOo committed Oct 22, 2019
1 parent ac7ae36 commit ea0ec75
Show file tree
Hide file tree
Showing 18 changed files with 52 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"display": {
"title": "Armor Stand Editor v0.1.1",
"title": "Armor Stand Editor v0.2.0",
"description": [
{"text": "Intuitive armor stand editing"}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
scoreboard players operation #bb.ae.sneaking bb.variable = @s bb.ae.alt

execute as @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, sort=nearest, limit=1, distance=..2.3] run tag @s add boomber.armor_stand.target_stand

function boomber:armor_stand/unique_vector/location
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
tp @s ~ ~ ~
tp @s ~ ~ ~

data merge entity @s {Health: 20.0f}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^ ^-0.7 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^ ^-0.7 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^ ^0.2 ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 5
function boomber:armor_stand/part/remove
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^ ^0.1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^ ^0.1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^ ^0.60 ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 6
function boomber:armor_stand/part/remove
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^0.4 ^-0.33 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^0.4 ^-0.33 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^0.2 ^0.33 ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 1
function boomber:armor_stand/part/remove
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^0.15 ^-1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^0.15 ^-1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^0.05 ^ ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 3
function boomber:armor_stand/part/remove
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^-0.4 ^-0.33 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^-0.4 ^-0.33 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^-0.2 ^0.33 ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 2
function boomber:armor_stand/part/remove
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute at @s anchored eyes positioned ^-0.15 ^-1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 0b}] at @s anchored eyes positioned ^-0.15 ^-1 ^ run function boomber:armor_stand/part/part
execute if entity @s[nbt={Small: 1b}] at @s anchored eyes positioned ^-0.05 ^ ^ run function boomber:armor_stand/part/part
execute if entity @e[type=area_effect_cloud, tag=boomber.armor_stand.part, distance=..0.2] run scoreboard players set #bb.ae.part bb.success 4
function boomber:armor_stand/part/remove
4 changes: 3 additions & 1 deletion data/boomber/functions/armor_stand/player/main.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ scoreboard players set #bb.ae.is_holding_wand bb.success 0
execute if data entity @s SelectedItem.tag.ucit{id: "editor_wand", from: "boomber:armor_stand"} run scoreboard players set #bb.ae.is_holding_wand bb.success 1

execute if score #bb.ae.is_holding_wand bb.success matches 1 if entity @s[tag=!boomber.armor_stand.editor_mage] run function boomber:armor_stand/editor_mage/equip
execute if entity @s[tag=boomber.armor_stand.editor_mage] run function boomber:armor_stand/editor_mage/main
execute if entity @s[tag=boomber.armor_stand.editor_mage] run function boomber:armor_stand/editor_mage/main

execute if score @s bb.ae.alt matches 1.. run scoreboard players set @s bb.ae.alt 0
2 changes: 2 additions & 0 deletions data/boomber/functions/armor_stand/setup.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ scoreboard objectives add bb.variable dummy
scoreboard objectives add bb.calculation dummy
scoreboard objectives add bb.success dummy
scoreboard objectives add bb.config dummy

scoreboard objectives add bb.ae.uid dummy
scoreboard objectives add bb.ae.select minecraft.custom:minecraft.talked_to_villager
scoreboard objectives add bb.ae.alt minecraft.custom:minecraft.sneak_time

scoreboard players set #-1 bb.variable -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ tag @s remove boomber.armor_stand.edit.left_leg
tag @s remove boomber.armor_stand.edit.right_leg
tag @s remove boomber.armor_stand.edit.body
tag @s remove boomber.armor_stand.edit.head
tag @s remove boomber.armor_stand.edit.base_plate
tag @s remove boomber.armor_stand.edit.base_plate
tag @s remove boomber.armor_stand.small
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tag @s remove boomber.armor_stand.small
execute if entity @s[nbt={Small: 1b}] run tag @s add boomber.armor_stand.small
24 changes: 17 additions & 7 deletions data/boomber/functions/armor_stand/smart_stand/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
function boomber:armor_stand/smart_stand/get_orientation
function boomber:armor_stand/smart_stand/is_small

scoreboard players operation #bb.ae.target_uid bb.ae.uid = @s bb.ae.uid
execute as @a if score @s bb.ae.uid = #bb.ae.target_uid bb.ae.uid at @s anchored eyes positioned ^ ^ ^1.5 run function boomber:armor_stand/player/create_target_point
execute as @s[tag=boomber.armor_stand.edit.left_arm] rotated ~ 0 anchored eyes positioned ^0.4 ^-0.33 ^ run function boomber:armor_stand/smart_stand/part/left_arm
execute as @s[tag=boomber.armor_stand.edit.right_arm] rotated ~ 0 anchored eyes positioned ^-0.4 ^-0.33 ^ run function boomber:armor_stand/smart_stand/part/right_arm
execute as @s[tag=boomber.armor_stand.edit.left_leg] rotated ~ 0 anchored eyes positioned ^0.15 ^-1 ^ run function boomber:armor_stand/smart_stand/part/left_leg
execute as @s[tag=boomber.armor_stand.edit.right_leg] rotated ~ 0 anchored eyes positioned ^-0.15 ^-1 ^ run function boomber:armor_stand/smart_stand/part/right_leg
execute as @s[tag=boomber.armor_stand.edit.body] rotated ~ 0 anchored eyes positioned ^ ^-0.2 ^ run function boomber:armor_stand/smart_stand/part/body
execute as @s[tag=boomber.armor_stand.edit.head] rotated ~ 0 anchored eyes positioned ^ ^-0.2 ^ run function boomber:armor_stand/smart_stand/part/head
execute as @s[tag=boomber.armor_stand.edit.base_plate] rotated ~ 0 run function boomber:armor_stand/smart_stand/part/base_plate

execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.left_arm] rotated ~ 0 anchored eyes positioned ^0.4 ^-0.33 ^ run function boomber:armor_stand/smart_stand/part/left_arm
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.right_arm] rotated ~ 0 anchored eyes positioned ^-0.4 ^-0.33 ^ run function boomber:armor_stand/smart_stand/part/right_arm
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.left_leg] rotated ~ 0 anchored eyes positioned ^0.15 ^-1 ^ run function boomber:armor_stand/smart_stand/part/left_leg
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.right_leg] rotated ~ 0 anchored eyes positioned ^-0.15 ^-1 ^ run function boomber:armor_stand/smart_stand/part/right_leg
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.body] rotated ~ 0 anchored eyes positioned ^ ^-0.2 ^ run function boomber:armor_stand/smart_stand/part/body
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.head] rotated ~ 0 anchored eyes positioned ^ ^-0.2 ^ run function boomber:armor_stand/smart_stand/part/head
execute as @s[tag=!boomber.armor_stand.small, tag=boomber.armor_stand.edit.base_plate] rotated ~ 0 run function boomber:armor_stand/smart_stand/part/base_plate

execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.left_arm] rotated ~ 0 anchored eyes positioned ^0.2 ^0.33 ^ run function boomber:armor_stand/smart_stand/part/left_arm
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.right_arm] rotated ~ 0 anchored eyes positioned ^-0.2 ^0.33 ^ run function boomber:armor_stand/smart_stand/part/right_arm
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.left_leg] rotated ~ 0 anchored eyes positioned ^0.05 ^ ^ run function boomber:armor_stand/smart_stand/part/left_leg
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.right_leg] rotated ~ 0 anchored eyes positioned ^-0.05 ^ ^ run function boomber:armor_stand/smart_stand/part/right_leg
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.body] rotated ~ 0 anchored eyes positioned ^ ^0.35 ^ run function boomber:armor_stand/smart_stand/part/body
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.head] rotated ~ 0 anchored eyes positioned ^ ^0.35 ^ run function boomber:armor_stand/smart_stand/part/head
execute as @s[tag=boomber.armor_stand.small, tag=boomber.armor_stand.edit.base_plate] rotated ~ 0 run function boomber:armor_stand/smart_stand/part/base_plate

kill @e[type=area_effect_cloud, tag=boomber.armor_stand.target]
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
execute if score #bb.ae.part bb.success matches 1..2 run function boomber:armor_stand/smart_stand/toggle/arms
execute if score #bb.ae.part bb.success matches 5 run function boomber:armor_stand/smart_stand/toggle/body
execute if score #bb.ae.part bb.success matches 5 if score #bb.ae.sneaking bb.variable matches 0 run function boomber:armor_stand/smart_stand/toggle/invisible
execute if score #bb.ae.part bb.success matches 5 if score #bb.ae.sneaking bb.variable matches 1.. run function boomber:armor_stand/smart_stand/toggle/body_size
execute if score #bb.ae.part bb.success matches 7 run function boomber:armor_stand/smart_stand/toggle/base_plate

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute store result score #bb.ae.body_size bb.success run data get entity @s Small
execute if score #bb.ae.body_size bb.success matches 0 run data merge entity @s {Small: 1b}
execute if score #bb.ae.body_size bb.success matches 1 run data merge entity @s {Small: 0b}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute store result score #bb.ae.invisible bb.success run data get entity @s Invisible
execute if score #bb.ae.invisible bb.success matches 0 run data merge entity @s {Invisible: 1b}
execute if score #bb.ae.invisible bb.success matches 1 run data merge entity @s {Invisible: 0b}

0 comments on commit ea0ec75

Please sign in to comment.