summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nms-patches/SpawnerCreature.patch13
1 files changed, 9 insertions, 4 deletions
diff --git a/nms-patches/SpawnerCreature.patch b/nms-patches/SpawnerCreature.patch
index 377f8d79..d8e40847 100644
--- a/nms-patches/SpawnerCreature.patch
+++ b/nms-patches/SpawnerCreature.patch
@@ -83,16 +83,21 @@
int i2 = blockposition1.getX();
int j2 = blockposition1.getY();
int k2 = blockposition1.getZ();
-@@ -126,7 +159,7 @@
+@@ -125,8 +158,11 @@
+ if (entityinsentient.cM() && entityinsentient.canSpawn()) {
groupdataentity = entityinsentient.prepare(worldserver.D(new BlockPosition(entityinsentient)), groupdataentity);
if (entityinsentient.canSpawn()) {
- ++l2;
+- ++l2;
- worldserver.addEntity(entityinsentient);
-+ worldserver.addEntity(entityinsentient, SpawnReason.NATURAL); // CraftBukkit - Added a reason for spawning this creature
++ // CraftBukkit start
++ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
++ ++l2;
++ }
++ // CraftBukkit end
} else {
entityinsentient.die();
}
-@@ -226,8 +259,10 @@
+@@ -226,8 +262,10 @@
}
entityinsentient.setPositionRotation((double) ((float) j1 + 0.5F), (double) blockposition.getY(), (double) ((float) k1 + 0.5F), random.nextFloat() * 360.0F, 0.0F);