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

CreatureSpawner.setSpawnedType() info gets wiped after first spawn

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Latest spigot server with only a test plugin

    • None

      Run this code on any given block:

       block.setType(Material.MOB_SPAWNER);
       CreatureSpawner spawner = (CreatureSpawner)block.getState();
       spawner.setSpawnedType(EntityType.ZOMBIE);
       spawner.update();
      • Watch it turn into the requested spawner type (zombie).
      • (Optional) Watch it remain unchanged for any timespan as long as it doesn't spawn anything, even across server restarts.
      • Watch it spawn the requested mob once (zombie).
      • Watch it turn into a pig spawner immediately.

      This used to work just fine, so it is reasonable to assume that one of the recent patches to BlockState broke the CreatureSpawner, or I'm missing something.

            Unassigned Unassigned
            StarTux StarTux
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: