Skip to content

Commit

Permalink
Fix cloning not targeting the player
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Oct 28, 2023
1 parent 2d98833 commit 5aef25a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions data/lt/functions/diguises/clone/stages/stage_one.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
tag @s add diguises.cloned.target
tag @s add diguises.cloned.to_tp

particle minecraft:portal ~ ~ ~ 0 1 0 0.5 1000
execute as @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] at @s run particle minecraft:portal ~ ~ ~ 0 1 0 0.5 1000
Expand All @@ -9,5 +8,5 @@ playsound minecraft:entity.warden.sonic_charge ambient @a[distance=..5] ~ ~ ~ 1
#Save Data
execute as @e[tag=disguises.player.sign_marker,limit=1] at @s run data modify block ~ ~ ~ front_text.messages[0] set value '[{"translate":"lt.collectible.player_clone.name","with":[{"selector":"@p[tag=diguises.cloned.target]","color":"#5ABDA3"}],"color":"#5ABDA3","italic":false}]'
execute as @e[tag=disguises.player.sign_marker,limit=1] at @s run data modify block ~ ~ ~ front_text.messages[1] set value '[{"text":" + ","color":"blue","italic":false},{"translate":"lt.collectible.player_clone.tooltip.add","with":[{"selector":"@p[tag=diguises.cloned.target]"}],"color":"blue","italic":false}]'
schedule function lt:diguises/clone/stages/stage_two 1s
schedule function lt:diguises/clone/stages/stage_two 20t
schedule function lt:diguises/clone/stages/stage_three 30t
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
tp @a[tag=diguises.cloned.to_tp] @e[tag=disguises.player.out,limit=1]
tag @a remove diguises.cloned.to_tp
tag @s remove diguises.cloned.target
tp @a[tag=diguises.cloned.target] @e[tag=disguises.player.out,limit=1]
tag @a remove diguises.cloned.target
5 changes: 3 additions & 2 deletions data/lt/functions/diguises/clone/stages/stage_two.mcfunction
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
execute as @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] at @s run particle minecraft:portal ~ ~ ~ 0 1 0 0.5 1000

data modify entity @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] collectible.tag.disguise.entity.tag.ProfileID set from entity @s UUID
data modify entity @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] collectible.tag.disguise.entity.tag.ProfileID set from entity @p[tag=diguises.cloned.target] UUID
#Todo Modify Name of Disguise (And Other Deatils?)

execute as @e[tag=disguises.player.sign_marker,limit=1] at @s run data modify entity @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] collectible.tag.display.Name set from block ~ ~ ~ front_text.messages[0]
execute as @e[tag=disguises.player.sign_marker,limit=1] at @s run data modify entity @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] collectible.tag.display.Lore[6] set from block ~ ~ ~ front_text.messages[1]
execute as @e[tag=disguises.player.sign_marker,limit=1] at @s run data modify entity @e[type=ltextras:collectible,tag=disguises.player.cloned,limit=1] collectible.tag.display.Lore[6] set from block ~ ~ ~ front_text.messages[1]

0 comments on commit 5aef25a

Please sign in to comment.