3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

fix for spawners not properly checking whether an entity can spawn

Dieser Commit ist enthalten in:
Tahg 2011-10-05 11:09:41 -04:00
Ursprung d74145ef23
Commit 8ab90b344c

Datei anzeigen

@ -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);