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

BlockState#update not updating a spawner's type to null.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • CraftBukkit version 3844-Spigot-b41c46d-c335a55 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)
    • Yes

      When setting a spawner's type to null using CreatureSpawner#setSpawnedType it's set properly and can be read from the state later, but calling BlockState#update doesn't seem to update the actual spawner in the world.
      Tested with:

      CreatureSpawner spawner = (CreatureSpawner) block.getState();
      spawner.setSpawnedType(null);
      player.sendMessage("Set to: " + spawner.getSpawnedType()); // Outputs null
      spawner.update();

      Setting it to any entity type seems to work as expected.
       
      Not sure if this counts as Minor or Major, so marked it as Minor for now.

       

            Unassigned Unassigned
            Aya Tal K
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: