1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Amount of SPECIFIC blocks in radius of player??

Discussion in 'Skript' started by bebeli555, May 10, 2020.

Thread Status:
Not open for further replies.
  1. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    How can i check the amount of SPECIFIC blocks around a player?
    WITHOUT USING LOOP BLOCKS BCS IT LAGS THE FUCK OUT OF THE SERVER

    Like you can do "Amount of blocks in radius 100 of player:"
    But if you do like "Amount of glass blocks in radius 100 of player:" It says cant understand this effect or condition?

    Im trying to make a skript that will auto delete lagmachines but using loop all the blocks and then checking the blocks is causing the server to go not responding and crash... So is there like any way to only loop a SPECIFIC block without looping all the blocks first and then checking the block or like First checking the amount of blocks with the thing i sent above that doesnt work and then looping all the blocks so it wouldnt loop blocks around every player and crash the server

    This is not what i want:
    loop all blocks in radius 100 of player:
    if loop-block is glass:

    This is what i want:
    loop all glass blocks in radius 100 of player:
    or
    Amount of glass blocks in radius 100 of player:

    But both of those doesnt work
    (Glass block is just example)
     
  2. Killerz1243

    Killerz1243 Active Member

    Joined:
    Oct 31, 2019
    Messages:
    78
    Likes Received:
    7
    Code (Text):
    1. amount of (all blocks where [block input is glass]) in radius 100 of player
    should work
     
    • Like Like x 1
  3. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    Yeah it works but it still causes the same amount of lag rip. Guess theres no way to loop large amount of blocks without crashing the server with skript
     
  4. Killerz1243

    Killerz1243 Active Member

    Joined:
    Oct 31, 2019
    Messages:
    78
    Likes Received:
    7
    You are looping 400,000+ blocks per player, so that's to be expected
     
  5. bebeli555

    bebeli555 Member

    Joined:
    Feb 6, 2020
    Messages:
    28
    Likes Received:
    0
    Yeah but how do plugins check for blocks and stuff without causing alot of lag

    But i guess i could like loop blocks around a player each on their own time so it doesnt loop it all in one go or do like Wait 5 seconds do the next player and so on
     
    #5 bebeli555, May 11, 2020
    Last edited: May 11, 2020
Thread Status:
Not open for further replies.

Share This Page

Loading...