mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +01:00
fix for spawners not properly checking whether an entity can spawn
This commit is contained in:
parent
d74145ef23
commit
8ab90b344c
@ -84,7 +84,8 @@ public class TileEntityMobSpawner extends TileEntity {
|
|||||||
double d5 = (double) this.z + (this.world.random.nextDouble() - this.world.random.nextDouble()) * 4.0D;
|
double d5 = (double) this.z + (this.world.random.nextDouble() - this.world.random.nextDouble()) * 4.0D;
|
||||||
|
|
||||||
entityliving.setPositionRotation(d3, d4, d5, this.world.random.nextFloat() * 360.0F, 0.0F);
|
entityliving.setPositionRotation(d3, d4, d5, this.world.random.nextFloat() * 360.0F, 0.0F);
|
||||||
if (entityliving.world.containsEntity(entityliving.boundingBox) && entityliving.world.getEntities(entityliving, entityliving.boundingBox).size() == 0 && !entityliving.world.c(entityliving.boundingBox)) {
|
if ((entityliving instanceof EntityLiving && ((EntityLiving)entityliving).d()) ||
|
||||||
|
(entityliving.world.containsEntity(entityliving.boundingBox) && entityliving.world.getEntities(entityliving, entityliving.boundingBox).size() == 0 && !entityliving.world.c(entityliving.boundingBox))) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
// CraftBukkit - added a reason for spawning this creature
|
// CraftBukkit - added a reason for spawning this creature
|
||||||
this.world.addEntity(entityliving, SpawnReason.SPAWNER);
|
this.world.addEntity(entityliving, SpawnReason.SPAWNER);
|
||||||
|
Loading…
Reference in New Issue
Block a user