geforkt von Mirrors/Paper
SPIGOT-3165: Only increment spawncount when mob spawn succeeds
Dieser Commit ist enthalten in:
Ursprung
41a7d14f8c
Commit
1f6c04c0f4
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren