Solved Fast change block - NMS

Discussion in 'Spigot Plugin Development' started by MrFishCakes, Jan 24, 2021.

Thread Status:
Not open for further replies.
  1. Hello,

    I'm currently making a custom enchantment where players can walk on lava, similar to frost walker (That part is completed). The issue I now face is manipulation of the blocks, this post provided the code that I believe I needed however then went on to mention lighting changes which are handeled server side, unless this has been changed. The post then redirects to a Bukkit thread where this post stands out for the "setBlockFast" method making use of NMS code.

    The method used however no long exists, so I was wondering if anyone knew of a suitable way to change blocks in a similar way to the NMS code where it won't lag the server? I had considered just biting the bullet and changing the blocks but I fear that it will come back to haunt me in the past. I am also trying to do this preferably without the use of external plugins.

    Any suggestions are welcome!
    #1 MrFishCakes, Jan 24, 2021
    Last edited: Jan 24, 2021
  2. What’s wrong with Block#setType
  3. Lighting updates, as far as I'm aware the server handles that and then relays it to the client.
  4. the method already updates lighting. And I highly doubt it’s gonna lag your server lol
  5. I've just taken the easy route and looked at the code for the frost walker enchantment, not really sure why I didn't do that before. Thanks anyway though :)
Thread Status:
Not open for further replies.