#(plenjy) I'm trying to return whether certain chunks are loaded
1 messages · Page 1 of 1 (latest)
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
!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
!tag loaded
!tag ChunkTag.is_loaded
Returns true if the chunk is currently loaded into memory.
ElementTag(Boolean)
# 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]>]>
I'm trying to make a script run aslong as a chunk is loaded
Content of Denizen Script Paste #109516: script... pasted 2023/05/06 06:16:27 UTC-07:00, Paste length: 3135 characters across 16 lines, Content: le_script: type: world
But doesn't seem to be working
when you create one bossbar, it is a single bossbar that is visible to any number of people you display it to
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
it isnt working because server start doesnt have a player linked to it
!e server start
Server
server start
when the server starts.
theres not even any tag
uhh i think this event here would be better
!e world loads
World
<world> loads
when a world is loaded.
<context.world> returns the WorldTag that was loaded.
then you could check it's environment to tell if its nether end or normal
!t world.environment
Returns the environment of the world: NORMAL, NETHER, or THE_END.
ElementTag
How would checking the environment help me?
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
I basically want that while to constantly run
Core
delta time hourly|minutely|secondly
every:<count> to only run the event every *count* times (like "on delta time secondly every:5" for every 5 seconds).
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.second> returns the exact delta time since system start.
That's actually exactly what I was looking for!
Thanks :D
Now I can also remove the while and all the things I tried
Content of Server Log Paste #109601: Denizen Debug Logs From A Minecraft Server... pasted 2023/05/08 07:57:52 UTC-07:00, Paste length: 1034385 characters across 8212 lines, Content: Java Version: 17Up-time: 1m 51s
Content of Denizen Script Paste #109607: script... pasted 2023/05/08 08:20:15 UTC-07:00, Paste length: 3053 characters across 14 lines, Content: my_world: type: world
What does it mean by tag not parsing correctly 
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
But wouldn't <world[world].spawn_location.y.add[20]> return the world spawn location and add 20 to the y value?
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
Returns the spawn location of the world.
LocationTag
WorldTag.spawn_location
Returns the Y coordinate of this object.
identity
ElementTag(Decimal)
Returns the element plus a number.
math
ElementTag(Decimal)
Returns still a number
Returns a copy of this object with the specified coordinates added to it.
math
VectorObject
Ah
So, <world[world].spawn_location.add[0,20,0]>
Yep