mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-08-19 13:02:12 +00:00
SPIGOT-7446: BlockState#update not updating a spawner's type to null
This commit is contained in:
parent
70e0bc050a
commit
d548daac2f
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
|
|||
public void setSpawnedType(EntityType entityType) {
|
||||
if (entityType == null) {
|
||||
this.getSnapshot().getSpawner().spawnPotentials = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
|
||||
this.getSnapshot().getSpawner().nextSpawnData = null;
|
||||
this.getSnapshot().getSpawner().nextSpawnData = new MobSpawnerData();
|
||||
return;
|
||||
}
|
||||
Preconditions.checkArgument(entityType != EntityType.UNKNOWN, "Can't spawn EntityType %s from mob spawners!", entityType);
|
||||
|
|
Loading…
Add table
Reference in a new issue