1.17.x Large block-count change?

Discussion in 'Spigot Plugin Development' started by DMan16, Aug 2, 2021.

  1. I'm looking for a way to change a large amount of blocks (~2M BPS) quickly and with as little lag as possible.
    I found this thread but it's pretty outdated (2 years is an eternity in Mojang time, LooL).
    I should mention that the persistence of these changes (i.e. them being saved to memory when the server shuts down) is NOT essential (maybe this will help the process?).
    On the other hand, I DO want the blocks to have light calculated and they should actually exist (i.e. not just sending packets to show them to players).

    Is such a thing possible?
    And if not, then how about something slower but that's still faster than the regular Spigot API Block#setType?

    Thanks in advance!
    #1 DMan16, Aug 2, 2021
    Last edited: Aug 2, 2021
  2. Hey, what you're trying to do is quite complicated since minecraft has it's own limits, I really don't think you will ever manage 2 million blocks per second with light updates, that really might be impossible, maybe in some older beta version but not modern MC, especially your noted version of 1.17.x

    What I sugges you do is the same as AsyncWorldEdit, create a BukkitRunnable that will run chunk by chunk, maybe even two or three at once that work in tandrum, the sad thing is that you can not modify the world in an asyncronous request or in a separate thread...
    You will have to set an artificial speed of processing so that your server won't time out.
  3. For now I have it set to update 2k blocks on every tick - I create an asynchronous task to do all the calculations and run a synchronous task for the actual updating.
    Frankly this is somewhat limiting...
    Maybe someone knows how FAWE does it?