Skip to content

Commit

Permalink
Add teleport marker system
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Oct 15, 2024
1 parent 413ab4d commit 202c570
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions data/lt/function/main/tick_runner.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ execute in tropicraft:tropics positioned 2329.53 131.5 2396.50 run particle mine
execute as @e[type=tropicraft:fiddler_crab,tag=golfCrab,nbt={HurtTime:1s}] run scoreboard players add @s golf.hits 1
execute as @e[predicate=lt:in_trap] run data modify entity @s Motion set value [0.0,1.0,0.0]
execute as @e[predicate=lt:in_trap] run tp @s @e[tag=golfStart,sort=nearest,limit=1]

#Systems
function lt:systems/on_tick
2 changes: 2 additions & 0 deletions data/lt/function/systems/on_tick.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Tick at every teleporter
execute as @e[tag=lt.system.teleporter] at @s run function lt:systems/teleporter/on_tick
1 change: 1 addition & 0 deletions data/lt/function/systems/teleporter/create.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$summon minecraft:marker ~ ~ ~ {Tags:[lt.system.teleporter],data:{x:-$(x),y:$(y),z:$(z),rY:$(rY),rX:$(rX)}}
2 changes: 2 additions & 0 deletions data/lt/function/systems/teleporter/on_tick.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
particle minecraft:portal ~ ~3 ~ 0 -1 0 0.1 5
execute as @a[distance=0..1] at @s run function lt:utility/tp with entity @n[tag=lt.system.teleporter] data

0 comments on commit 202c570

Please sign in to comment.