SPIGOT-7446: BlockState#update not updating a spawner's type to null
This commit is contained in:
parent
70e0bc050a
commit
d548daac2f
@ -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…
x
Reference in New Issue
Block a user