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

Tile data not cleaned up when replacing a Comparator block

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • None
    • Spigot 1.8, bug has been present since at least 1.5

      I'm the dev for Movecraft, a plugin that allows you to move vehicles. When a vehicle that has a comparator on it moves, the plugin will replace the comparator with another block (air for example). This will often result in minor chunk corruption, with Spigot claiming a block has the wrong tile type every time the chunk is loaded. I learned if I replace it with a sign first and then replace it with air, the chunk corruption does not occur, but it does report this on the console:

      [Server thread/ERROR]: Block at 21,242,163,3,870 is SIGN_POST but has net.minecraft.server.v1_8_R1.TileEntityComparator@97eae6. Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.

      My server console will be filled with hundreds of thousands of these messages, every time a craft with a comparator moves. A fairly reliable way to reproduce this error is by running:

      w.getBlockAt(x, y, z).setType(org.bukkit.Material.SIGN_POST);
      BlockState state=w.getBlockAt( x, y, z ).getState();
      Sign s=(Sign)state;
      s.setLine(0, "PLACEHOLDER");
      s.update();
      w.getBlockAt(x, y, z).setType(org.bukkit.Material.AIR);

      Where x,y,z refer to a block which is a comparator. It seems to happen more often if the comparator is powered, but it also happens when it is not.

            Unassigned Unassigned
            baccayarro Mark Summers
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: