#Trying to make a dome using block displays

1 messages · Page 1 of 1 (latest)

potent sonnet
#

I am trying to make it to where a command spawns a dome of light blue stained glass in a radius of 5 around the player for a specific amount of time using block displays.... Its been years since ive used skript so Ive forgotten a lot of stuff, Can anyone help or make the code for me PLEASE🙏 Thanks!

peak swallow
#

thats not what this server is for

#

but if you send the code you have, we can give suggestions

potent sonnet
#
    org.bukkit.Material
    org.bukkit.entity.BlockDisplay

command /lightdometest:
    trigger:
        set {_radius} to 5
        set {_duration} to 10 seconds
        set {_center} to location of player
        set {_world} to world of player

        loop integers from -{_radius} to {_radius}:
            set {_x} to loop-number
            loop integers from 0 to {_radius}:
                set {_y} to loop-number
                loop integers from -{_radius} to {_radius}:
                    set {_z} to loop-number

                    # sphere equation (top half only)
                    if {_x}^2 + {_y}^2 + {_z}^2 <= {_radius}^2:
                        set {_loc} to {_center} offset by {_x}, {_y}, {_z}

                        set {_bd} to {_world}.spawn({_loc}, BlockDisplay)
                        {_bd}.setBlock(Material.LIGHT_BLUE_STAINED_GLASS.createBlockData())
                        {_bd}.setBrightness(15, 15)

                        add {_bd} to {lightdome::%uuid of player%::*}

        wait {_duration}

        loop {lightdome::%uuid of player%::*}:
            loop-value.remove()

        delete {lightdome::%uuid of player%::*}
potent sonnet
peak swallow
#
#

always check the docs

fair bridge
#

Okay but...

#

You can loop all blocks withing a radius of a location