Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4612

Make Block#setBlockData and Block#setType more efficient by clearing tile entities via the method in World.

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Linux.

    • git-Spigot-b0f4c22-c7ba979
    • Yes

      This is a suggestion to change the implementation behind Block#setBlockData and Block#setType (present in CraftBlock). After you check that a Tile Entity is present, World#n removes it cleanly and allows you to change the block without risk of encountering chunk corruption. In my own testing, this works perfectly and is more efficient than starting the block change logic chain to first set to Air and then to the desired block.

      https://paste.md-5.net/hokucexide.java

            md_5 md_5
            Aerocet Brian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: