mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 02:25:51 +01:00
Updated Upstream and Sidestream(s) (Airplane) (#403)
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: e71967b Spelling error 5ffdcdb Merge branch 'perf/reduce-allocs' 5f350d7 Minimize shouldDoLightning for inlining 271a374 Reduce memory allocations
This commit is contained in:
parent
a1c007b0d6
commit
f295cbb0ed
@ -309,6 +309,7 @@ # Patches
|
||||
| server | Reduce allocs & improve perf of StructureManager | Paul Sauve | |
|
||||
| server | Reduce chunk loading & lookups | Paul Sauve | |
|
||||
| server | Reduce iterator allocation from chunk gen | Spottedleaf | |
|
||||
| server | Reduce memory allocations | Paul Sauve | |
|
||||
| server | Reduce pathfinder branches | Spottedleaf | |
|
||||
| server | Reduce projectile chunk loading | Paul Sauve | |
|
||||
| server | Remove some streams and object allocations | Phoenix616 | |
|
||||
|
@ -34,27 +34,36 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index ae07ea2a34f5cd82ce2eae523359cb7540065335..7b8036840dcca16904b3063c209d5ff10ab8a6af 100644
|
||||
index ae07ea2a34f5cd82ce2eae523359cb7540065335..4732320d973d89bda2cd2a94db48bc6c98df3e9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -53,6 +53,17 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -53,6 +53,18 @@ public class Chunk implements IChunkAccess {
|
||||
private final ChunkCoordIntPair loc; public final long coordinateKey; public final int locX; public final int locZ; // Paper - cache coordinate key
|
||||
private volatile boolean x;
|
||||
|
||||
+ // Airplane start - instead of using a random every time the chunk is ticked, define when lightning strikes preemptively
|
||||
+ private int lightningTick = -1;
|
||||
+ public boolean shouldDoLightning() {
|
||||
+ boolean doTick = this.lightningTick == 0;
|
||||
+ private int lightningTick;
|
||||
+ // shouldDoLightning compiles down to 29 bytes, which with the default of 35 byte inlining should guarantee an inline
|
||||
+ public final boolean shouldDoLightning(java.util.Random random) {
|
||||
+ if (this.lightningTick-- <= 0) {
|
||||
+ this.lightningTick = this.world.random.nextInt(100000) << 1;
|
||||
+ this.lightningTick = random.nextInt(100000) << 1;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return doTick;
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Airplane end
|
||||
+
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage) {
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
||||
@@ -325,6 +337,7 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
+ this.lightningTick = this.world.random.nextInt(100000) << 1; // Airplane - initialize lightning tick
|
||||
}
|
||||
|
||||
public org.bukkit.Chunk bukkitChunk;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 1da5c7def8b476cf638548b05d3e2015bc372f51..03bcd704e3c08f5b54b124df1583e3ccdb4cb485 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@ -68,7 +77,7 @@ index 1da5c7def8b476cf638548b05d3e2015bc372f51..03bcd704e3c08f5b54b124df1583e3cc
|
||||
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 994c1822a4b53552befc64d88e922285715fa31d..2a60d8fc88ab83a157f00ce5e5ccd99ce3660453 100644
|
||||
index 994c1822a4b53552befc64d88e922285715fa31d..f3e8e5dafa528075acc76fa2e75907f63438a93d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1019,6 +1019,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -85,7 +94,7 @@ index 994c1822a4b53552befc64d88e922285715fa31d..2a60d8fc88ab83a157f00ce5e5ccd99c
|
||||
final BlockPosition.MutableBlockPosition blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
- if (!this.paperConfig.disableThunder && flag && this.random.nextInt(100000) == 0 && this.W()) { // Paper - Disable thunder // Airplane - check this.W last
|
||||
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning() && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting
|
||||
+ if (!this.paperConfig.disableThunder && flag && chunk.shouldDoLightning(this.random) && this.W()) { // Paper - Disable thunder // Airplane - check this.W last // Airplane - replace random with shouldDoLighting
|
||||
blockposition.setValues(this.a(this.a(j, 0, k, 15))); // Paper
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
||||
|
@ -0,0 +1,190 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Sauve <paul@technove.co>
|
||||
Date: Tue, 9 Feb 2021 19:05:58 -0600
|
||||
Subject: [PATCH] Reduce memory allocations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
index 7b29d47dfdef7611db58068af285f76d92a9f12a..7009586430649a87722f6c73cd5a311d7c977196 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
@@ -43,8 +43,14 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
if (worldserver.getLightLevel(blockposition.up()) >= 9) {
|
||||
IBlockData iblockdata1 = this.getBlockData();
|
||||
|
||||
+ // Airplane start - use mutable position
|
||||
+ BlockPosition.MutableBlockPosition blockposition1 = new BlockPosition.MutableBlockPosition();
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
+ blockposition1.setValues(blockposition).add(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
+ /*
|
||||
BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
|
||||
+ */
|
||||
+ // Airplane end
|
||||
|
||||
if (worldserver.getType(blockposition1).a(Blocks.DIRT) && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) {
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).a(Blocks.SNOW))); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 919cf670327bed6faa50f29c9bf7a9b54174f7f2..c13c0f0ed54fd9af20cf0c81bc9f2e87641a2694 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -140,6 +140,8 @@ public class EntityTypes<T extends Entity> {
|
||||
public void setEntitySize(EntitySize entitySize) { this.br = entitySize; } // Purpur - OBFHELPER
|
||||
private EntitySize br; // Purpur - remove final
|
||||
|
||||
+ public java.util.function.Supplier<String> getEntityName = () -> IRegistry.ENTITY_TYPE.getKey(this).toString(); // Airplane - create lambda ones
|
||||
+
|
||||
private static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.Builder entitytypes_builder) { // CraftBukkit - decompile error
|
||||
return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index a42571cfd2c9c80df27e59db832cb64c2a64e141..c5546838187e3dc0d752e69c1eafa0dbc3804b0c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -638,7 +638,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
return d2 * d2 + d3 * d3;
|
||||
}
|
||||
|
||||
- private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) {
|
||||
+ // Airplane start - create copy that accepts x/z instead of allocating pair
|
||||
+ private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) { return someDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, entityplayer, flag); }
|
||||
+ private static int someDistanceCalculation(int x, int z, EntityPlayer entityplayer, boolean flag) {
|
||||
int i;
|
||||
int j;
|
||||
|
||||
@@ -652,12 +654,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
j = MathHelper.floor(entityplayer.locZ() / 16.0D);
|
||||
}
|
||||
|
||||
- return a(chunkcoordintpair, i, j);
|
||||
+ return someOtherDistanceCalculation(x, z, i, j);
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
- private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) {
|
||||
- int k = chunkcoordintpair.x - i;
|
||||
- int l = chunkcoordintpair.z - j;
|
||||
+ // Airplane start - create copy that accepts x/z instead of allocating pair
|
||||
+ private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) { return someOtherDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, i, j); }
|
||||
+ private static int someOtherDistanceCalculation(int x, int z, int i, int j) {
|
||||
+ int k = x - i;
|
||||
+ int l = z - j;
|
||||
+ // Airplane end
|
||||
|
||||
return Math.max(Math.abs(k), Math.abs(l));
|
||||
}
|
||||
@@ -2498,11 +2504,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
boolean flag1 = this.tracker.attachedToPlayer;
|
||||
|
||||
if (!flag1) {
|
||||
+ // Airplane start - use int/longs instead of ChunkCoordIntPair
|
||||
+ /*
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ);
|
||||
- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair());
|
||||
+ */
|
||||
+ int x = this.tracker.chunkX, z = this.tracker.chunkZ;
|
||||
+ long chunkcoordintpair = ChunkCoordIntPair.pair(x, z);
|
||||
+ PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair);
|
||||
|
||||
if (playerchunk != null && playerchunk.getSendingChunk() != null) { // Paper - no-tick view distance
|
||||
- flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
|
||||
+ flag1 = PlayerChunkMap.someDistanceCalculation(x, z, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
|
||||
+ // Airplane end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2532,8 +2544,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
}
|
||||
|
||||
private int b() {
|
||||
+ // Airplane start
|
||||
+ int i = this.trackingDistance; // move out of if statement
|
||||
+ if (!this.tracker.passengers.isEmpty()) {
|
||||
Collection<Entity> collection = this.tracker.getAllPassengers();
|
||||
- int i = this.trackingDistance;
|
||||
Iterator iterator = collection.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2545,6 +2559,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+ // Airplane end
|
||||
|
||||
return this.a(i);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6e6059daba05d7ce3aabeed85cc0e0d2daa04f92..6e4c7a9b32c9e8057db3cbcead0b75d858fd6e18 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1055,19 +1055,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
public void a(Consumer<Entity> consumer, Entity entity) {
|
||||
try {
|
||||
- consumer.accept(entity);
|
||||
+ consumer.accept(entity); // Airplane - error on change
|
||||
} catch (Throwable throwable) {
|
||||
if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ();
|
||||
System.err.println(msg);
|
||||
throwable.printStackTrace();
|
||||
- getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable)));
|
||||
+ getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Airplane - error on change
|
||||
entity.dead = true;
|
||||
return;
|
||||
// Paper end
|
||||
}
|
||||
- MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick
|
||||
+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick // Airplane - error on change
|
||||
}
|
||||
// Paper start - Prevent armor stands from doing entity lookups
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index f3e8e5dafa528075acc76fa2e75907f63438a93d..4d47cca6db7a771677c31ade9425ed3ad83393ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -907,7 +907,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
|
||||
gameprofilerfiller.enter("tick");
|
||||
if (!entity.dead && !(entity instanceof EntityComplexPart)) {
|
||||
+ // Airplane start - inline this.a to prevent creation of lambda
|
||||
+ /*
|
||||
this.a(this::entityJoinedWorld, entity);
|
||||
+ */
|
||||
+ boolean doMidTick = false; // usually there's a returns in the catch, so treat it like that
|
||||
+ try {
|
||||
+ this.entityJoinedWorld(entity);
|
||||
+ doMidTick = true;
|
||||
+ } catch (Throwable throwable) {
|
||||
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
|
||||
+ // Paper start - Prevent tile entity and entity crashes
|
||||
+ String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ();
|
||||
+ System.err.println(msg);
|
||||
+ throwable.printStackTrace();
|
||||
+ getServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable)));
|
||||
+ entity.dead = true;
|
||||
+ // Paper end
|
||||
+ }
|
||||
+ if (doMidTick) {
|
||||
+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick
|
||||
+ }
|
||||
+ // Airplane end
|
||||
}
|
||||
|
||||
gameprofilerfiller.exit();
|
||||
@@ -1278,9 +1299,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
++entity.ticksLived;
|
||||
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
|
||||
|
||||
+ // Airplane start - create debug lambda once, todo do we even WANT the method profiler?
|
||||
+ /*
|
||||
gameprofilerfiller.a(() -> {
|
||||
return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString();
|
||||
});
|
||||
+ */
|
||||
+ gameprofilerfiller.a(entity.getEntityType().getEntityName);
|
||||
+ // Airplane end
|
||||
gameprofilerfiller.c("tickNonPassenger");
|
||||
if (isActive) { // Paper - EAR 2
|
||||
TimingHistory.activatedEntityTicks++; // Paper
|
@ -19,7 +19,7 @@ index 657885cdaa086293f6b5aa6f3058acd16df0ba35..8724ad342bec7c733b3c825bd62dbfa5
|
||||
|
||||
Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, j);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 6e6059daba05d7ce3aabeed85cc0e0d2daa04f92..ba8a8e7dc0d09d8afa405ef608ad6df1e507a62c 100644
|
||||
index 6e4c7a9b32c9e8057db3cbcead0b75d858fd6e18..c0872f8a53b862558c7fa2fe17ebb0a796da03ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -774,7 +774,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ba8a8e7dc0d09d8afa405ef608ad6df1e507a62c..7d0ea2c0f04578eb2c896aa6ea99ce26d8935478 100644
|
||||
index c0872f8a53b862558c7fa2fe17ebb0a796da03ce..77c748ad07ee257742c4d36825bdd9e916b5d851 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7d0ea2c0f04578eb2c896aa6ea99ce26d8935478..106ed295ce502cdd693371b9fa98eba7588b1f44 100644
|
||||
index 77c748ad07ee257742c4d36825bdd9e916b5d851..8285cd4b659d11d90df633cb99ab8fd36d293cc1 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Optimize some stuff in WorldServer ticking
|
||||
Replaced some streams and some array lists with glue lists
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 2a60d8fc88ab83a157f00ce5e5ccd99ce3660453..7fa720de5c24820d2cd7eea5f74d6c1502afe461 100644
|
||||
index 4d47cca6db7a771677c31ade9425ed3ad83393ea..17d728bf4f8393defd0a6f274d32f2ce926232a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -780,12 +780,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@ -48,7 +48,7 @@ index 2a60d8fc88ab83a157f00ce5e5ccd99ce3660453..7fa720de5c24820d2cd7eea5f74d6c15
|
||||
long l = this.worldData.getDayTime() + 24000L;
|
||||
TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (l - l % 24000L) - this.getDayTime());
|
||||
if (this.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) {
|
||||
@@ -1009,9 +1016,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1030,9 +1037,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
|
||||
private void wakeupPlayers() {
|
||||
@ -60,7 +60,7 @@ index 2a60d8fc88ab83a157f00ce5e5ccd99ce3660453..7fa720de5c24820d2cd7eea5f74d6c15
|
||||
}
|
||||
|
||||
// Paper start - optimise random block ticking
|
||||
@@ -1806,8 +1813,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1832,8 +1839,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
// Spigot start
|
||||
if ( entity instanceof EntityHuman )
|
||||
{
|
||||
@ -71,7 +71,7 @@ index 2a60d8fc88ab83a157f00ce5e5ccd99ce3660453..7fa720de5c24820d2cd7eea5f74d6c15
|
||||
for (Object o : worldData.data.values() )
|
||||
{
|
||||
if ( o instanceof WorldMap )
|
||||
@@ -1824,7 +1832,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1850,7 +1858,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,10 +18,10 @@ index 001ac05cf26237eec8a77c476e678ff6d0840311..7b4935dd8c54f5fcb4f26b96c270d3e4
|
||||
return this.size == 0 && this.pendingTasks.isEmpty();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 7fa720de5c24820d2cd7eea5f74d6c1502afe461..2734b76f58401bdddf6407db7c7c445d489ad488 100644
|
||||
index 17d728bf4f8393defd0a6f274d32f2ce926232a3..789e885eded90f1827332e0b4000c35b78ec2661 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1792,6 +1792,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
@@ -1818,6 +1818,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -336,10 +336,10 @@ index 0000000000000000000000000000000000000000..a5314a0396f4a8f373d855e873820ddd
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 7b8036840dcca16904b3063c209d5ff10ab8a6af..6bc5fedc4d8effa530799eac814f626dfeed2105 100644
|
||||
index 4732320d973d89bda2cd2a94db48bc6c98df3e9d..d9ff68765dd1d14615ca6119cb1906249e95d426 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -336,6 +336,14 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -337,6 +337,14 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
this.bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
@ -351,9 +351,9 @@ index 7b8036840dcca16904b3063c209d5ff10ab8a6af..6bc5fedc4d8effa530799eac814f626d
|
||||
+ this.sections[i2] = null;
|
||||
+ }
|
||||
+ } // Yatopia end
|
||||
this.lightningTick = this.world.random.nextInt(100000) << 1; // Airplane - initialize lightning tick
|
||||
}
|
||||
|
||||
public org.bukkit.Chunk bukkitChunk;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index e77da341b765725771726283d3a8249b514b40da..c44333ec5b0c1914f7cb9f4b3b39626069136c22 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
|
@ -108,7 +108,7 @@ index 0668d383db1f3a81d1053954d72678c7ac5aecec..7b9f83e63d0f9cd83a246be33af4ab91
|
||||
ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 106ed295ce502cdd693371b9fa98eba7588b1f44..ab1f7992a3a61179cb9862915c14ea7f6dc76cc6 100644
|
||||
index 8285cd4b659d11d90df633cb99ab8fd36d293cc1..aaa9a222f755622f604e5980eb2f1c0039411fa4 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -988,6 +988,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a1d0b30d187239c51b51bb7cb5f0465c1a85aeaa
|
||||
Subproject commit e71967b87c76de81d85dd9750719f3110669d52f
|
@ -1 +1 @@
|
||||
a1d0b30d187239c51b51bb7cb5f0465c1a85aeaa
|
||||
e71967b87c76de81d85dd9750719f3110669d52f
|
@ -1,4 +1,4 @@
|
||||
name=Airplane
|
||||
useBlackList=False
|
||||
list=server/Airplane-MC-Dev-Fixes.patch,server/Airplane-Configuration.patch,server/Remove-streams.patch,server/Strip-raytracing-for-EntityLiving-hasLineOfSight.patch,server/Simpler-ShapelessRecipes-comparison-for-Vanilla.patch,server/Queue-lighting-update-only-once.patch,server/Use-unmodifiableMap-instead-of-making-copy.patch,server/Swap-priority-of-checks-in-chunk-ticking.patch,server/Reduce-projectile-chunk-loading.patch,server/Optimize-random-calls-in-chunk-ticking.patch,server/Don-t-get-entity-equipment-if-not-needed.patch,server/Dynamic-activation-range.patch,server/Reduce-allocs-improve-perf-of-StructureManager.patch,server/Cache-palette-array.patch,server/Reduce-chunk-loading-lookups.patch
|
||||
list=server/Airplane-MC-Dev-Fixes.patch,server/Airplane-Configuration.patch,server/Remove-streams.patch,server/Strip-raytracing-for-EntityLiving-hasLineOfSight.patch,server/Simpler-ShapelessRecipes-comparison-for-Vanilla.patch,server/Queue-lighting-update-only-once.patch,server/Use-unmodifiableMap-instead-of-making-copy.patch,server/Swap-priority-of-checks-in-chunk-ticking.patch,server/Reduce-projectile-chunk-loading.patch,server/Optimize-random-calls-in-chunk-ticking.patch,server/Don-t-get-entity-equipment-if-not-needed.patch,server/Dynamic-activation-range.patch,server/Reduce-allocs-improve-perf-of-StructureManager.patch,server/Cache-palette-array.patch,server/Reduce-chunk-loading-lookups.patch,server/Reduce-memory-allocations.patch
|
||||
branch=origin/master
|
||||
|
Loading…
Reference in New Issue
Block a user