function TeleportStand(p: player, t: entity type):
execute {_p} command "/execute as %{_t}% at %{_p}% run tp ^ ^ ^%{standtpblocks}%"
add 0.1 to {standtpblocks}
if block at {_t} is grass block:
else:
set {standtpblocks} to 0
every ticks:
loop all players:
if {placestand.global} is not set:
set {placestand.global} to 0
if {placestand.%loop-player%} is not set:
set {placestand.%loop-player%} to {placestand.global}+1
add 1 to {placestand.global}
loop all entities:
if {placestand.%loop-entity-2%} > 0:
if block at loop-entity-2 is grass block:
set {ministandlocation_x} to x-coordinate of loop-entity-2
set {ministandlocation_y} to y-coordinate of loop-entity-2
add 1 to {ministandlocation_y}
set {ministandlocation_z} to z-coordinate of loop-entity-2
execute console command "/summon minecraft:armor_stand %{ministandlocarion_x}% %{ministandlocarion_y}% %{ministandlocarion_z}% {Small:1b}"
if {placestand.%loop-player%} > 0:
if {placestand.%loop-player%} = {placestand.%loop-entity-2%}:
broadcast "a"
TeleportStand(loop-player, loop-entity-2)
stop
summon an armor stand at loop-player:
set {placestand.%event-entity%} to {placestand.%player%}