mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Fixed allow-animals not applying to chunk generation.
Moved the legitimacy checking into World.addEntity for better organisation and to better account for future methods being added that control whether or not an entity should spawn.
This commit is contained in:
1 parent
d01a3acd82
commit
167febd8e6
3 files changed
+9
-13
No files matched your search
@@ -249,12 +249,8 @@ public class EntityEgg extends Entity {
|
||||
break;
|
||||
}
|
||||
|
||||
// The world we're spawning in accepts this creature
|
||||
boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal;
|
||||
if ((isAnimal && this.world.allowAnimals) || (!isAnimal && this.world.allowMonsters)) {
|
||||
entity.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
this.world.addEntity(entity, SpawnReason.EGG);
|
||||
}
|
||||
entity.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
this.world.addEntity(entity, SpawnReason.EGG);
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user