mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 08:17:44 +01:00
SPIGOT-7446: BlockState#update not updating a spawner's type to null
By: md_5 <git@md-5.net>
This commit is contained in:
parent
136f843d31
commit
5fa009e777
@ -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…
Reference in New Issue
Block a user