Skip to content

Commit

Permalink
v0.3.0 - User Friendly Update
Browse files Browse the repository at this point in the history
  • Loading branch information
oOBoomberOo committed Nov 1, 2019
1 parent 991521f commit 0190295
Show file tree
Hide file tree
Showing 58 changed files with 245 additions and 268 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"display": {
"title": "Armor Stand Editor v0.2.0",
"title": "Armor Stand Editor v0.3.0",
"description": [
{"text": "Intuitive armor stand editing"}
],
Expand Down
17 changes: 17 additions & 0 deletions data/boomber/advancements/armor_stand/recipe/editor_wand.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"display": {
"title": "Armor Stand Editor Wand",
"description": "2 Iron nuggets + 1 Stick in diagonal line",
"icon": {
"item": "minecraft:crafting_table"
},
"announce_to_chat": false,
"show_toast": false
},
"criteria": {
"tick": {
"trigger": "minecraft:tick"
}
},
"parent": "boomber:armor_stand/armor_stand_editor"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "Armed Armor Stand",
"description": [{"text": "Make armor stand with arm by Left-clicking armor stand's arm"}],
"icon": {
"item": "minecraft:spruce_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/more_like_human"
}
15 changes: 15 additions & 0 deletions data/boomber/advancements/armor_stand/story/editor_wand.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "Editing armor stand!",
"description": "Craft 'Armor Stand Editor Wand' and use it!",
"icon": {
"item": "minecraft:armor_stand"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "minecraft:story/smelt_iron"
}
15 changes: 15 additions & 0 deletions data/boomber/advancements/armor_stand/story/more_like_human.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "More Like Human",
"description": [{"text": "Remove base plate by Left-clicking armor stand's base plate"}],
"icon": {
"item": "minecraft:birch_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/smoll_armor_stand"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "Flying Armor Stand",
"description": [{"text": "Pick up armor stand by Right-Clicking armor stand's base plate"}],
"icon": {
"item": "minecraft:dark_oak_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/spooky"
}
15 changes: 15 additions & 0 deletions data/boomber/advancements/armor_stand/story/reset_part.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "Oops, didn't mean to",
"description": [{"text": "Reset part by Left-clicking while you're editing it"}],
"icon": {
"item": "minecraft:jungle_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/armor_stand_with_arm"
}
15 changes: 15 additions & 0 deletions data/boomber/advancements/armor_stand/story/smoll_armor_stand.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "Smoll Armor Stand",
"description": [{"text": "Shrink armor stand by Sneak + Left-clicking armor stand's body"}],
"icon": {
"item": "minecraft:oak_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/editor_wand"
}
15 changes: 15 additions & 0 deletions data/boomber/advancements/armor_stand/story/spooky.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"display": {
"title": "~Spooky~",
"description": [{"text": "Turn armor stand invisible by Left-clicking armor stand's body"}],
"icon": {
"item": "minecraft:acacia_sign"
}
},
"criteria": {
"impossible": {
"trigger": "minecraft:impossible"
}
},
"parent": "boomber:armor_stand/story/reset_part"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ scoreboard players operation #bb.ae.target_uid bb.ae.uid = @s bb.ae.uid
execute as @e[type=villager, tag=boomber.armor_stand.editor_node] if score @s bb.ae.uid = #bb.ae.target_uid bb.ae.uid run tag @s add boomber.armor_stand.target_node
execute anchored eyes positioned ^ ^ ^0.5 as @e[type=villager, tag=boomber.armor_stand.target_node] run function boomber:armor_stand/editor_node/move

execute unless entity @e[type=villager, tag=boomber.armor_stand.target_node] run function boomber:armor_stand/editor_mage/unequip
execute if score #bb.ae.is_holding_wand bb.success matches 0 run function boomber:armor_stand/editor_mage/unequip

execute if score @s[tag=!boomber.armor_stand.editing] bb.ae.select matches 1.. run function boomber:armor_stand/editor_mage/selection/attempt_selection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
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
advancement grant @s only boomber:armor_stand/story/editor_wand
tag @s add boomber.armor_stand.target_editor

function boomber:armor_stand/unique_vector/location
scoreboard players operation #bb.ae.pos.x bb.variable = #bb.ae.result.x bb.variable
scoreboard players operation #bb.ae.pos.y bb.variable = #bb.ae.result.y bb.variable
scoreboard players operation #bb.ae.pos.z bb.variable = #bb.ae.result.z bb.variable
execute as @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, tag=!global.ignore.pos, sort=nearest, limit=1, distance=..2.3] run tag @s add boomber.armor_stand.target_stand

execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/get_part
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/get_part/run
execute if score #bb.ae.part bb.success matches 1.. run function boomber:armor_stand/editor_mage/selection/select

tag @e[type=armor_stand, tag=boomber.armor_stand.target_stand] remove boomber.armor_stand.target_stand
tag @e[type=armor_stand, tag=boomber.armor_stand.target_stand] remove boomber.armor_stand.target_stand
tag @s remove boomber.armor_stand.target_editor
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
execute if entity @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, distance=..2] run function boomber:armor_stand/editor_mage/selection/armor_stand
execute if entity @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, tag=!global.ignore.pos, distance=..2] run function boomber:armor_stand/editor_mage/selection/armor_stand
execute as @s[distance=..5.5] if score #bb.ae.raycast bb.success matches 0 positioned ^ ^ ^0.1 run function boomber:armor_stand/editor_mage/selection/raycast
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tag @s add boomber.armor_stand.editing
scoreboard players set #bb.ae.raycast bb.success 1
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/select
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/get_part/convert
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
scoreboard players operation #bb.ae.sneaking bb.variable = @s bb.ae.alt
advancement grant @s only boomber:armor_stand/story/editor_wand

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
scoreboard players operation #bb.ae.pos.x bb.variable = #bb.ae.result.x bb.variable
scoreboard players operation #bb.ae.pos.y bb.variable = #bb.ae.result.y bb.variable
scoreboard players operation #bb.ae.pos.z bb.variable = #bb.ae.result.z bb.variable

execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/get_part
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/get_part/run
execute if score #bb.ae.part bb.success matches 1.. run function boomber:armor_stand/editor_mage/submit/toggle

tag @e[type=armor_stand, tag=boomber.armor_stand.target_stand] remove boomber.armor_stand.target_stand
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
execute if entity @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, distance=..2] run function boomber:armor_stand/editor_mage/submit/armor_stand
execute if entity @e[type=armor_stand, tag=!boomber.armor_stand.editing, tag=!global.ignore, tag=!global.ignore.pos, distance=..2] run function boomber:armor_stand/editor_mage/submit/armor_stand
execute as @s[distance=..5.5] if score #bb.ae.raycast bb.success matches 0 positioned ^ ^ ^0.1 run function boomber:armor_stand/editor_mage/submit/raycast
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
tag @s add boomber.armor_stand.target_editor

scoreboard players set #bb.ae.raycast bb.success 0
execute as @s at @s anchored eyes positioned ^ ^ ^0.1 anchored feet run function boomber:armor_stand/editor_mage/submit/raycast
execute as @s at @s anchored eyes positioned ^ ^ ^0.1 anchored feet run function boomber:armor_stand/editor_mage/submit/raycast

tag @s remove boomber.armor_stand.target_editor
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
scoreboard players operation #bb.ae.sneaking bb.variable = @s bb.ae.alt

scoreboard players set #bb.ae.raycast bb.success 1
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/toggle
execute as @e[type=armor_stand, tag=boomber.armor_stand.target_stand] run function boomber:armor_stand/smart_stand/toggle/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
scoreboard players operation #bb.ae.target_uid bb.ae.uid = @s bb.ae.uid
execute as @a[tag=boomber.armor_stand.editor_mage] if score @s bb.ae.uid = #bb.ae.target_uid bb.ae.uid run tag @s add boomber.armor_stand.target_player

execute unless entity @a[tag=boomber.armor_stand.target_player] run function boomber:armor_stand/editor_node/remove

tag @a remove boomber.armor_stand.target_player
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
summon villager ~ ~ ~ {Tags: ['boomber.armor_stand.editor_node', 'boomber.armor_stand.editor_node.spawn', 'global.ignore'], Team: "bb.ae.no_collide", Silent: 1b, NoAI: 1b, ActiveEffects: [{Id: 14, Duration: 2147483647, ShowParticles: false}], NoGravity: 1b}
summon villager ~ 0 ~ {Tags: ['boomber.armor_stand.editor_node', 'boomber.armor_stand.editor_node.spawn', 'global.ignore'], Team: "bb.ae.no_collide", Silent: 1b, NoAI: 1b, ActiveEffects: [{Id: 14, Duration: 2147483647, ShowParticles: false}], NoGravity: 1b, CanPickUpLoot: 0b}
scoreboard players operation @e[type=villager, tag=boomber.armor_stand.editor_node.spawn] bb.ae.uid = @s bb.ae.uid
tag @e[type=villager, tag=boomber.armor_stand.editor_node.spawn] remove boomber.armor_stand.editor_node.spawn
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
execute as @e[type=villager, tag=boomber.armor_stand.editor_node] run data merge entity @s {Health: 20.0f}
execute as @s at @s run function boomber:armor_stand/editor_mage/submit/attempt_submit

advancement grant @s only boomber:armor_stand/story/editor_wand
advancement revoke @s only boomber:armor_stand/event/editor_wand.submit
7 changes: 2 additions & 5 deletions data/boomber/functions/armor_stand/joint/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
function boomber:armor_stand/unique_vector/offset

tp @s ~ ~ ~ facing entity @e[tag=boomber.armor_stand.target, limit=1] eyes

execute store result score #bb.ae.rotation.i bb.variable run data get entity @s Rotation[0] 100000
execute store result score #bb.ae.rotation.j bb.variable run data get entity @s Rotation[1] 100000
execute store result score #bb.ae.rotation.x bb.calculation run data get entity @s Rotation[0] 100000
execute store result score #bb.ae.rotation.y bb.calculation run data get entity @s Rotation[1] 100000

execute as @s at @s anchored feet positioned ^ ^ ^1 run function boomber:armor_stand/normal_joint/spawn
kill @s
4 changes: 3 additions & 1 deletion data/boomber/functions/armor_stand/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
execute as @a[tag=!global.ignore, tag=!boomber.armor_stand.init] run function boomber:armor_stand/player/init
execute as @a[tag=boomber.armor_stand.init] at @s run function boomber:armor_stand/player/main

execute as @e[type=armor_stand, tag=boomber.armor_stand.editing, tag=!global.ignore] at @s run function boomber:armor_stand/smart_stand/main
execute as @e[type=armor_stand, tag=boomber.armor_stand.editing, tag=!global.ignore] at @s run function boomber:armor_stand/smart_stand/main

execute as @e[type=villager, tag=boomber.armor_stand.editor_node] at @s run function boomber:armor_stand/editor_node/main
28 changes: 0 additions & 28 deletions data/boomber/functions/armor_stand/math/rotate/x.mcfunction

This file was deleted.

28 changes: 0 additions & 28 deletions data/boomber/functions/armor_stand/math/rotate/y.mcfunction

This file was deleted.

28 changes: 0 additions & 28 deletions data/boomber/functions/armor_stand/math/rotate/z.mcfunction

This file was deleted.

3 changes: 0 additions & 3 deletions data/boomber/functions/armor_stand/math/sign.mcfunction

This file was deleted.

19 changes: 0 additions & 19 deletions data/boomber/functions/armor_stand/normal_joint/main.mcfunction

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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: 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

0 comments on commit 0190295

Please sign in to comment.