@@ -11,23 +11,23 @@
|
||||
public final class SpawnerCreature {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
@@ -85,9 +89,12 @@
|
||||
entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, world.random.nextFloat() * 360.0F, 0.0F);
|
||||
if ((entityhuman.e((double) f, (double) k, (double) f1) <= 16384.0D || !entityinsentient.isTypeNotPersistent(entityhuman.e((double) f, (double) k, (double) f1))) && entityinsentient.a((GeneratorAccess) world, EnumMobSpawn.NATURAL) && entityinsentient.a((IWorldReader) world)) {
|
||||
groupdataentity = entityinsentient.prepare(world, world.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
- ++i;
|
||||
- ++i2;
|
||||
- world.addEntity(entityinsentient);
|
||||
+ // CraftBukkit start
|
||||
+ if (world.addEntity(entityinsentient, SpawnReason.NATURAL)) {
|
||||
+ ++i;
|
||||
+ ++i2;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (i >= entityinsentient.dD()) {
|
||||
return;
|
||||
}
|
||||
@@ -212,7 +219,7 @@
|
||||
@@ -88,9 +92,12 @@
|
||||
entityinsentient.setPositionRotation((double) f, (double) k, (double) f1, world.random.nextFloat() * 360.0F, 0.0F);
|
||||
if ((d0 <= 16384.0D || !entityinsentient.isTypeNotPersistent(d0)) && entityinsentient.a((GeneratorAccess) world, EnumMobSpawn.NATURAL) && entityinsentient.a((IWorldReader) world)) {
|
||||
groupdataentity = entityinsentient.prepare(world, world.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
|
||||
- ++i;
|
||||
- ++i2;
|
||||
- world.addEntity(entityinsentient);
|
||||
+ // CraftBukkit start
|
||||
+ if (world.addEntity(entityinsentient, SpawnReason.NATURAL)) {
|
||||
+ ++i;
|
||||
+ ++i2;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (i >= entityinsentient.dC()) {
|
||||
return;
|
||||
}
|
||||
@@ -216,7 +223,7 @@
|
||||
|
||||
if (entityinsentient.a(generatoraccess, EnumMobSpawn.CHUNK_GENERATION) && entityinsentient.a((IWorldReader) generatoraccess)) {
|
||||
groupdataentity = entityinsentient.prepare(generatoraccess, generatoraccess.getDamageScaler(new BlockPosition(entityinsentient)), EnumMobSpawn.CHUNK_GENERATION, groupdataentity, (NBTTagCompound) null);
|
||||
|
||||
Reference in New Issue
Block a user