-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
This server is running CraftBukkit version 4012-Spigot-864e4ac-76931e8 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT)
-
Yes
When a snowman is created by building, the SpawnReason in CreatureSpawnEvent is wrong and reports as SpawnReason.BUILD_IRONGOLEM instead of SpawnReason.BUILD_SNOWMAN.
Minimal plugin:
public class TestPlugin extends JavaPlugin implements Listener { @Override public void onEnable() { getLogger().info("Test plugin loaded"); Bukkit.getPluginManager().registerEvents(this, this); } @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void onCreatureSpawn(final CreatureSpawnEvent e) { e.setCancelled(true); getLogger().info(e.getSpawnReason().toString()); } }
Install and build a snowman (two blocks of snow with a carved pumpkin on top).
Log output:
[17:12:43] [Server thread/INFO]: BoxManager joined the game [17:12:43] [Server thread/INFO]: BoxManager[/127.0.0.1:57052] logged in with entity id 509 at ([bskyblock_world]-2.6607028154662307, 85.0, 802.1550866775121) [17:12:56] [Server thread/INFO]: [TestPlugin] BUILD_IRONGOLEM