Skip to content

Commit

Permalink
Fix UUID problem
Browse files Browse the repository at this point in the history
  • Loading branch information
oOBoomberOo committed May 7, 2020
1 parent 7458a64 commit 64a09dc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
5 changes: 2 additions & 3 deletions data/boomber/advancements/armor_stand/event/left_control.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
"damage": {
"type": {
"is_projectile": false,
"is_lighting": false,
"is_lightning": false,
"is_magic": false,
"is_fire": false,
"is_explosion": false
},
"source_entity": {
"type": "minecraft:player",
"nbt": "{Tags: ['boomber.armor_stand.player.init']}"
"type": "minecraft:player"
}
},
"entity": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ scoreboard players operation #target_uid bb.ae.uid3 = @s bb.ae.uid3
scoreboard players operation #target_uid bb.ae.uid4 = @s bb.ae.uid4

#define tag boomber.armor_stand.target
execute as @a[tag=boomber.armor_stand.player.init] if score @s bb.ae.uid1 = #target_uid bb.ae.uid1 if score @s bb.ae.uid2 = #target_uid bb.ae.uid2 if score @s bb.ae.uid3 = #target_uid bb.ae.uid3 if score @s bb.ae.uid4 = #target_uid bb.ae.uid4 run tag @s add boomber.armor_stand.target
execute as @a[tag=!global.ignore] if score @s bb.ae.uid1 = #target_uid bb.ae.uid1 if score @s bb.ae.uid2 = #target_uid bb.ae.uid2 if score @s bb.ae.uid3 = #target_uid bb.ae.uid3 if score @s bb.ae.uid4 = #target_uid bb.ae.uid4 run tag @s add boomber.armor_stand.target

# Workaround for MC-172960: https://bugs.mojang.com/browse/MC-172960
execute as @a[tag=boomber.armor_stand.target] at @s anchored eyes positioned ^ ^-0.1 ^0.5 as @e[tag=boomber.armor_stand.detector.targeted] run function boomber:armor_stand/teleporter/run
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
execute store result score @s bb.ae.uid1 run data get entity @s UUID[0]
execute store result score @s bb.ae.uid2 run data get entity @s UUID[1]
execute store result score @s bb.ae.uid3 run data get entity @s UUID[2]
execute store result score @s bb.ae.uid4 run data get entity @s UUID[3]

scoreboard players operation @s bb.ae.state = #player.idle bb.ae.enum
2 changes: 1 addition & 1 deletion data/boomber/functions/armor_stand/player/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute unless score @s bb.ae.state = @s bb.ae.state run scoreboard players operation @s bb.ae.state = #player.idle bb.ae.enum
execute unless score @s bb.ae.state = @s bb.ae.state run function boomber:armor_stand/player/change_state/setup

execute if score @s bb.ae.state = #player.idle bb.ae.enum run function boomber:armor_stand/player/state/idle
execute if score @s bb.ae.state = #player.waiting bb.ae.enum run function boomber:armor_stand/player/state/waiting
Expand Down

0 comments on commit 64a09dc

Please sign in to comment.