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

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:
    • 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.

       

            Assignee:
            Unassigned
            Reporter:
            Tal K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: