Solved set blocks in chunk

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Pillage

New Member
Dec 7, 2017
7
0
0
24
I'm having trouble trying to get blocks to be placed on the edge of chunks and later getting removed after a few minutes passed.

Does anyone have a way for this to be done?
 
Skellett has a syntax to get all the blocks around the edge of a chunk
code_language.skript:
[(the|all)] [of] [the] blocks [in [a[n]]] (around|outlin(e|ing)) [of] chunk %chunk% [[at] [y(-| )coordinate] %-number%]
An example could be:

code_language.skript:
set {_chunk} to the chunk at player
set blocks around chunk {_chunk} at y-coordinate of location below player to diamond blocks

If the y-coordinate is not defined, it will grab all the blocks from 0 to 255 outlining the chunk.

I don't know off the top of my head the mathematically order in which the blocks get added to the list. I think it goes 0,0,0 of the chunk to 16,16,16 up-scaling north by 1 each time, until it reaches coordinate 16, then it moves to the next row west, similar to how Skript calculates spheres.

So if you wanted a set of blocks from say the corner of an edge, you can use the chunk coordinate location of a block from SkQuery to test if it's of greater values in the direction you want. Or you can just set it to a list and grab the blocks by their index number if that's easier aswell.
 
Last edited:
Status
Not open for further replies.