Hi, I need help to make my code the most faster as possible
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
Code:
on packet event play_server_map_chunk:
{{@title}::season} is "winter"
boolean field = true
set {_data::*} to byte array field
set {_n} to size of {_data::*} - 255*4
loop 256 times:
set {_data::%{_n}%} to 30
add 4 to {_n}
set byte array field to {_data::*}
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
Last edited: