-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
Block#setTypeIdAndData first replaces the block to air, and then to the block you are trying to set it to.
This is a performance issue, specially notable when you have light sources, completly encased in any material, and you replace all the outside material, it creates massive lag spikes as every single block creates light updates when replaced with air, and again when it gets placed back to another solid block.
This was a workarround added as a fix for SPIGOT-611, but it's done with any type of block, air should only be set if the block you are replacing is a tile entity.
Code causing the truble here