Skip to content

Commit

Permalink
Start work on player cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Oct 27, 2023
1 parent 99e9230 commit 352bc95
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions assets/lt/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@
"lt.collectibles.unicode.purchased": "",
"lt.collectibles.unicode.reward": "",
"lt.collectibles.unicode.secret": ""
"lt.disguise.to_many_players": "Can't clone more then one player at a time!"
}
2 changes: 2 additions & 0 deletions data/lt/functions/diguises/clone/after_clone.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tp @a[tag=diguises.cloned.to_tp] @e[tag=disguises.player.out,limit=1]
tag @a remove diguises.cloned.to_tp
6 changes: 6 additions & 0 deletions data/lt/functions/diguises/clone/clone.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
particle minecraft:portal ~ ~ ~ 0 1 0 0.5 1000
data modify entity @e[type=dummyplayers:dummy_player,tag=disguises.player.cloned,limit=1] collectible.tag.disguise.entity.tag.ProfileID set from entity @s UUID
#Todo Modify Name of Disguise (And Other Deatils?)
#Clone Sound?
tag @s add diguises.cloned.to_tp
schedule function lt:diguises/clone/after_clone 2s
5 changes: 5 additions & 0 deletions data/lt/functions/diguises/clone/try_clone.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
scoreboard players set Players disguise.cloneing 0
execute as @a[distance=..2] run scoreboard players add Players disguise.cloneing 1
#Todo Update Message
execute if score Players disguise.cloneing matches 2.. run tellraw @a[distance=..2] {"translate":"lt.disguise.clone.to_many_players"}
execute if score Players disguise.cloneing matches 1 run execute as @p at @p run function lt:diguises/clone/clone
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Todo Update this with brick style
summon ltextras:collectible ~ ~ ~ {Tags:["disguises.player.cloned"],collectible:{item:"ltminigames:disguise",tag:{disguise:{entity:{type:"dummyplayers:dummy_player"}}}}}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summon marker ~ ~ ~ {Tags:["disguises.player.cloner"]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summon marker ~ ~ ~ {Tags:["disguises.player.out"]}
5 changes: 4 additions & 1 deletion data/lt/functions/main/on_load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,7 @@ team modify club.hideNames friendlyFire false
team modify club.hideNames nametagVisibility never

#Stuff for donation effects
scoreboard objectives add donation.effects dummy
scoreboard objectives add donation.effects dummy

#Player disguise cloning
scoreboard objectives add disguise.cloneing dummy

0 comments on commit 352bc95

Please sign in to comment.