mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 16:56:31 +01:00
SPIGOT-2792: Return PIG for broken spawners
By: md_5 <git@md-5.net>
This commit is contained in:
parent
f95e0cbeef
commit
9cf6536881
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,8 @@ public class CraftCreatureSpawner extends CraftBlockState implements CreatureSpa
|
|||
}
|
||||
|
||||
public EntityType getSpawnedType() {
|
||||
return EntityType.fromName(spawner.getSpawner().getMobName().a());
|
||||
MinecraftKey key = spawner.getSpawner().getMobName();
|
||||
return (key == null) ? EntityType.PIG : EntityType.fromName(key.a());
|
||||
}
|
||||
|
||||
public void setSpawnedType(EntityType entityType) {
|
||||
|
|
Loading…
Add table
Reference in a new issue