[SPIGOT-7446] BlockState#update not updating a spawner's type to null. Created: 02/Aug/23  Updated: 25/Dec/24  Resolved: 05/Aug/23

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tal K Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: bug
Environment:

Clean test server, nothing but the test plugin.

>plugins
[15:51:56] [Server thread/INFO]: Plugins (1): TestPlugin

 


Version: CraftBukkit version 3844-Spigot-b41c46d-c335a55 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

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.

 


Generated at Sat Dec 13 15:21:08 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.