#(plenjy) I'm trying to return whether certain chunks are loaded

1 messages · Page 1 of 1 (latest)

ashen ore
#

How would I go on doing it?

agile dawnBOT
rigid auroraBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

#

(plenjy) I'm trying to return whether certain chunks are loaded

wintry elbow
#

!vague

dreamy daggerBOT
# wintry elbow !vague
Info: vague

Your question is too vague to be able to answer well.

If you're asking how to do something, please make sure to add some background detail. Make sure to specify your overall end goal and the general design/idea and any existing progress towards that goal, not just the single specific point.

For script-related problems, see also !info haste debug. For non-scripting server trouble, see !logs.

See also !xyproblem

wintry elbow
#

!tag loaded

dreamy daggerBOT
# wintry elbow !tag loaded
Cannot Specify Searched Tag

Multiple possible tags: <ChunkTag.is_loaded>, <BigDoorsDoorTag.is_loaded>, <ChunkTag.force_loaded>, <PlayerTag.chunk_loaded[<chunk>]>, <WorldTag.loaded_chunks>.

wintry elbow
#

!tag ChunkTag.is_loaded

dreamy daggerBOT
# wintry elbow !tag ChunkTag.is_loaded

Returns true if the chunk is currently loaded into memory.

Returns

ElementTag(Boolean)

Examples
# Loops though the chunks surrounding the player in a 20x20 radius and loads the chunk if it is not already loaded.
- repeat 20 from:-10 as:x:
    - repeat 20 from:-10 as:z:
        - if !<player.location.chunk.add[<[x]>,<[z]>].is_loaded>:
            - chunkload <player.location.chunk.add[<[x]>,<[z]>]>
ashen ore
#

I'm trying to make a script run aslong as a chunk is loaded

#

But doesn't seem to be working

swift crown
#

if you remove it, it is removed permanently

#

nobody can see it because it's gone

#

if you wanted everyone to have their own, you'd make one for each and every one of them

#

...did i just reply to the wrong thread

woven tiger
#

Behr, are you sure you're in the right thread?

#

Yeah lol

swift crown
#

...yyyeeaaaah

#

what the fuck just happened

#

sorry plenjy lmao

inner talon
#

!e server start

dreamy daggerBOT
inner talon
#

theres not even any tag

#

uhh i think this event here would be better

#

!e world loads

dreamy daggerBOT
inner talon
#

then you could check it's environment to tell if its nether end or normal

#

!t world.environment

dreamy daggerBOT
ashen ore
#

How would checking the environment help me?

ionic flame
#

What exactly are you trying to do here?

#

- while <player.world.spawn_location.chunk.is_loaded>: Spawn chunks are always loaded, if not configured otherwise

#

And you never return information from that chunk in the script you've posted

ashen ore
#

I basically want that while to constantly run

ionic flame
#

Consider using on delta time for that

#

!e delta time

dreamy daggerBOT
# ionic flame !e delta time
Group

Core

Event Lines

delta time hourly|minutely|secondly

Switches

every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).

Triggers

every <count> seconds, minutes, or hours of game calculation time. Default repetitions count of 1.
This is specifically based on the rate of time advancement in the game server,
which is not necessarily equivalent to the real passage of time (for example, this event may fire slower if the server is lagging).
For real time, see !event system time.

Context

<context.second> returns the exact delta time since system start.

ashen ore
#

That's actually exactly what I was looking for!

#

Thanks :D

#

Now I can also remove the while and all the things I tried

ashen ore
#

What does it mean by tag not parsing correctly thonk

ionic flame
#

In your case a base tag didn't return the expected object the sub tag needs.

#

<LocationTag.relative[]> requires a LocationTag

#

But <[location]> returned 92

#

92 is an element, but not a locationtag

ashen ore
#

But wouldn't <world[world].spawn_location.y.add[20]> return the world spawn location and add 20 to the y value?

ionic flame
#

Well, check your debug report

#

It says what it returns

#

line 16

#

You can also check by reading the tags you're using

#

!t world.spawn_location

dreamy daggerBOT
ionic flame
#

Returns a LocationTag

#

!t locationtag.y

dreamy daggerBOT
ionic flame
#

Returns a number.

#

!t element.add

dreamy daggerBOT
ionic flame
#

Returns still a number

ionic flame
#

What you want to use is

#

!t locationtag.add

dreamy daggerBOT
ashen ore
#

Ah

ionic flame
#

So, <world[world].spawn_location.add[0,20,0]>

ashen ore
#

Yep