Update to Minecraft 1.13.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-10-23 06:00:00 +11:00
parent 6fe7587c8f
commit a194267323
47 changed files with 184 additions and 262 deletions

View File

@@ -72,7 +72,7 @@
if (l1 <= k) {
@@ -76,8 +107,10 @@
label128:
label137:
while (iterator1.hasNext()) {
- ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next();
- BlockPosition blockposition1 = getRandomPosition(worldserver, chunkcoordintpair1.x, chunkcoordintpair1.z);
@@ -83,23 +83,23 @@
int i2 = blockposition1.getX();
int j2 = blockposition1.getY();
int k2 = blockposition1.getZ();
@@ -136,9 +169,12 @@
if (entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) {
groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);
if (entityinsentient.a((IWorldReader) worldserver)) {
- ++l2;
- ++j4;
- worldserver.addEntity(entityinsentient);
+ // CraftBukkit start
+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
+ ++l2;
+ ++j4;
+ }
+ // CraftBukkit end
} else {
entityinsentient.die();
}
@@ -255,7 +291,7 @@
@@ -140,9 +173,12 @@
if ((d0 <= 16384.0D || !entityinsentient.isTypeNotPersistent()) && entityinsentient.a((GeneratorAccess) worldserver, false) && entityinsentient.a((IWorldReader) worldserver)) {
groupdataentity = entityinsentient.prepare(worldserver.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);
if (entityinsentient.a((IWorldReader) worldserver)) {
- ++l2;
- ++j4;
- worldserver.addEntity(entityinsentient);
+ // CraftBukkit start
+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
+ ++l2;
+ ++j4;
+ }
+ // CraftBukkit end
} else {
entityinsentient.die();
}
@@ -260,7 +296,7 @@
entityinsentient.setPositionRotation(d0, (double) blockposition.getY(), d1, random.nextFloat() * 360.0F, 0.0F);
if (entityinsentient.a(generatoraccess, false) && entityinsentient.a((IWorldReader) generatoraccess)) {
groupdataentity = entityinsentient.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityinsentient)), groupdataentity, (NBTTagCompound) null);