[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. 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.
|