Looking for help?

  • 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!

interestbull

New Member
Apr 29, 2024
7
0
1
20
Suggested name: Bedrock Creator
(i know that name is terrible but I've got no other ideas)

Spigot/Skript Version: 1.20.4

What I want:

I want a program that automatically makes a one block layer of bedrock at y 0 and deletes everything below it in the overworld and the nether for any chunks that are loaded. For the end, make it delete everything below y 0 but NOT add a layer of bedrock. (If you are up to the challenge, make the bedrock jumbled like it is normally in the overworld)





Please do not hesitate to ask me any questions you have.
 
Deleting everything below y=0 in the overworld is going to crash your server.

Maybe doing it in chunks could work but it still wouldn't be too good
 
Deleting everything below y=0 in the overworld is going to crash your server.

Maybe doing it in chunks could work but it still wouldn't be too good
The server has no loaded chunks. I want it to be done with every newly loaded chunk. If you want, you can have it add the layer of bedrock but not delete anything below it.
 
try this:
AppleScript:
options:
    # Which worlds are not affected by the skript
    # (ex: world filter: world "randomworld", world "world2, and world "myworld")
    world-blacklist: world "world_the_end"

on chunk generate:
    if {@world-blacklist} contains event-world:
        stop
    set {_x} to (chunk x of event-chunk) * 16
    set {_z} to (chunk z of event-chunk) * 16
    set {_x2} to {_x} + 15
    set {_z2} to {_z} + 15
    set {_loc1} to location({_x}, 70, {_z}, event-world)
    set {_loc2} to location({_x2}, 70, {_z2}, event-world)
    set blocks within {_loc1} and {_loc2} to bedrock

I coded it in parser so tell me if it doesn't work
also my first time using chunks so it might not function correctly
 
Last edited:
{@world filter} isn't a defined option.

change the name to {@world-blacklist} and then change the option to that in the generate event.

Also maybe using on chunk load is better
 
{@world filter} isn't a defined option.

change the name to {@world-blacklist} and then change the option to that in the generate event.

Also maybe using on chunk load is better
I fixed the first two issues, but use chunk load would be inefficient for filling blocks that might have already been set to bedrock
 
try this:
AppleScript:
options:
    # Which worlds are not affected by the skript
    # (ex: world filter: world "randomworld", world "world2, and world "myworld")
    world-blacklist: world "world_the_end"

on chunk generate:
    if {@world-blacklist} contains event-world:
        stop
    set {_x} to (chunk x of event-chunk) * 16
    set {_z} to (chunk z of event-chunk) * 16
    set {_x2} to {_x} + 15
    set {_z2} to {_z} + 15
    set {_loc1} to location({_x}, 70, {_z}, event-world)
    set {_loc2} to location({_x2}, 70, {_z2}, event-world)
    set blocks within {_loc1} and {_loc2} to bedrock

I coded it in parser so tell me if it doesn't work
also my first time using chunks so it might not function correctly
thank you SO MUCH!!!!! I will try it soon.
 
Imo the best way is probably to split it up into 8 2x16 sections and fill one every 2.5 ticks.

That way, it fills only 12.8 b/t (blocks per tick) rather than 256 b/t. Plus it gives you a bit of time before the layer generates. You can also do 4 sections that are 4x16, or 2 that are 8x16, depending on what your server can handle. If you need 16 1/16 or 32 1/8 sections, that works too.

I would recommend canceling any block breaking events at or below y=0 so that no one can break the bedrock, and if they get under it, they can't break anything. You can also just teleport them up until their block is air and they're above y=0.
 
My server will be limited to 10000 blocks in all directions. Will this help?
No, you're still replacing 256 blocks in a tick every single time a new chunk is generated.
The number of times it happens doesn't effect it too much besides from the amount of times it lags (, it's only gonna lag when it actually triggers.

If my math isn't awful, 10,000 blocks in all directions, aka (20k on the x * 20k on the z), is 1,562,500 chunks. Still a LOT of times for the lag to trigger.
 
Chunky does a mass preload of every chunk in a defined world/radius, I thought he said he wanted there to be no loaded chunks.