#why doesnt the place command run

1 messages · Page 1 of 1 (latest)

quaint plank
#
forceload add ~ ~

execute if loaded ~ ~ ~ unless entity @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1] run place structure dpj11:redacted/redacted
execute if loaded ~ ~ ~ unless entity @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1] run summon marker ~ ~ ~ {Tags:["redacted_position"]}

tp @s @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1]

execute if loaded ~ ~ ~ positioned ~ ~-2 ~ run fill ~-8 ~ ~-8 ~8 ~ ~8 stone

tp @s ~ ~ ~
tribal roseBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

                        🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you


                        
                        ✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
steep iris
#

I'm not 100% certain but I believe the forceload command doesn't actually load the chunk in the same tick. You'd need to do the place command(s) in the next tick or possibly longer rather than in the same function

quaint plank
#

would a scheduled function work

#

cause schedule is somewhat unreliable for me sometimes

steep iris
#

That would work too

quaint plank
#

@torn willow

tribal roseBOT
# tribal rose <@&1201956957406109788>

<@&935561184806060073> <@&1202694677766348840>

**🙇 Helpers Arise!**

Please note that you still might not immediately get a response since all helpers are human beings and volunteers (and also might be sleeping right now)

quaint plank
#

the place command isnt working

regal spruce
#

If you do a if loaded say loaded

#

Does that fire?

quaint plank
#

no

regal spruce
#

Then make a slow ticking function ticking every tick until it’s loaded

quaint plank
#

/execute at @e[type=armor_stand,tag=redacted,distance=..50] in dpj11:redacted if loaded ~ ~ ~ run place structure dpj11:redacted ~ ~ ~

#

this command works when manually run, but not in a function

regal spruce
#

Because from forceload to fully loaded takes a few ticks

quaint plank
#

this is in tick

execute as @a at @s if entity @e[type=armor_stand,tag=redacted,distance=..50] unless entity @e[type=armor_stand,tag=redacted_p,distance=..50] run function dpj11:redacted/create

regal spruce
#

And afaik it’s not always the same length

quaint plank
#

its run when the player is in the chunk

#

but it doesnt run

#

and there is nothing in the logs

regal spruce
#

Not sure how everything works

#

You forceload the chunk

#

Place an entity there

#

And then constantly try to do something With it

#

Or what exactly

quaint plank
#

theres an armor stand summoned

#

and if the player is near that armor stand

#

another one gets summoned

#

to prevent the function from running twice

#

and then it trys to place the structure

#

everything here runs

#

except the last line

#

you can see the function ran in the chat

quaint plank
#

fixed it by just forcing the command until the structure is there

tribal roseBOT
# tribal rose <@&1201956957406109788>
Question Closed

Your question, #1206452350211072000 (why doesnt the place command run), was resolved!

Original Message
forceload add ~ ~

execute if loaded ~ ~ ~ unless entity @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1] run place structure dpj11:redacted/redacted
execute if loaded ~ ~ ~ unless entity @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1] run summon marker ~ ~ ~ {Tags:["redacted_position"]}

tp @s @e[type=marker,tag=redacted_position,sort=nearest,distance=..50,limit=1]

execute if loaded ~ ~ ~ positioned ~ ~-2 ~ run fill ~-8 ~ ~-8 ~8 ~ ~8 stone

tp @s ~ ~ ~
Duration open

8h16m