Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 5e5f7f19dc
commit 6a9e00d4b6
208 changed files with 2144 additions and 2455 deletions

View File

@@ -21,7 +21,7 @@
continue;
}
}
@@ -70,10 +75,49 @@
@@ -69,10 +74,49 @@
EnumCreatureType[] aenumcreaturetype = SpawnerCreature.c;
int i = aenumcreaturetype.length;
@@ -72,16 +72,16 @@
a(enumcreaturetype, worldserver, chunk, (entitytypes, blockposition, ichunkaccess) -> {
return spawnercreature_d.a(entitytypes, blockposition, ichunkaccess);
}, (entityinsentient, ichunkaccess) -> {
@@ -148,10 +192,13 @@
@@ -147,10 +191,13 @@
entityinsentient.setPositionRotation(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F);
if (a(worldserver, entityinsentient, d2)) {
groupdataentity = entityinsentient.prepare(worldserver, worldserver.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.NATURAL, groupdataentity, (NBTTagCompound) null);
- ++j;
- ++k1;
- worldserver.addEntity(entityinsentient);
- worldserver.addAllEntities(entityinsentient);
- spawnercreature_a.run(entityinsentient, ichunkaccess);
+ // CraftBukkit start
+ if (worldserver.addEntity(entityinsentient, SpawnReason.NATURAL)) {
+ if (worldserver.addAllEntities(entityinsentient, SpawnReason.NATURAL)) {
+ ++j;
+ ++k1;
+ spawnercreature_a.run(entityinsentient, ichunkaccess);
@@ -92,14 +92,14 @@
}
@@ -333,7 +380,7 @@
if (entityinsentient.a(generatoraccess, EnumMobSpawn.CHUNK_GENERATION) && entityinsentient.a((IWorldReader) generatoraccess)) {
groupdataentity = entityinsentient.prepare(generatoraccess, generatoraccess.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.CHUNK_GENERATION, groupdataentity, (NBTTagCompound) null);
- generatoraccess.addEntity(entityinsentient);
+ generatoraccess.addEntity(entityinsentient, SpawnReason.CHUNK_GEN); // CraftBukkit
if (entityinsentient.a((GeneratorAccess) worldaccess, EnumMobSpawn.CHUNK_GENERATION) && entityinsentient.a((IWorldReader) worldaccess)) {
groupdataentity = entityinsentient.prepare(worldaccess, worldaccess.getDamageScaler(entityinsentient.getChunkCoordinates()), EnumMobSpawn.CHUNK_GENERATION, groupdataentity, (NBTTagCompound) null);
- worldaccess.addAllEntities(entityinsentient);
+ worldaccess.addAllEntities(entityinsentient, SpawnReason.CHUNK_GEN); // CraftBukkit
flag = true;
}
}
@@ -458,8 +505,10 @@
@@ -456,8 +503,10 @@
return this.d;
}