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!


    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.

ThatPacketAddon faster analyse ?

Discussion in 'Skript' started by aeim, Sep 28, 2019.

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

    aeim Member

    Feb 21, 2017
    Likes Received:
    Hi, I need help to make my code the most faster as possible
    Code (Text):
    1. on packet event play_server_map_chunk:
    2.     {{@title}::season} is "winter"
    3.     boolean field = true
    4.     set {_data::*} to byte array field
    5.     set {_n} to size of {_data::*} - 255*4
    6.     loop 256 times:
    7.         set {_data::%{_n}%} to 30
    8.         add 4 to {_n}
    9.     set byte array field to {_data::*}
    my code work, but it take too much time when a player join cause of byte array field is very huge and make a big lag(modifié)
    so I think I need to change ONLY the index of the byte array with something like "set index {_n} of byte array field to 30" https://skripthub.net/docs/?id=3908 or "set byte array field[{_n}] to 30" https://skripthub.net/docs/?id=2915
    but it's not possible
    Maybe it possible by using skript-mirror and get methods of event-packet but I don't know the code
    on paper or spigot 1.14.4 , skript 2.4-Beta7 or 8 and skript-mirror-SNAPSHOT + ThatPacketAddon
    #1 aeim, Sep 28, 2019
    Last edited: Sep 30, 2019
Thread Status:
Not open for further replies.

Share This Page