Updated Upstream (Paper, Tuinity, & Airplane)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
f3e541ca1 Actually list all missing hard depends (#5701)
11f83fe8e [CI-SKIP] [Auto] Rebuild Patches
a36e5d65f MC-148809: Fix incorrect structure block data length

Tuinity Changes:
f0e91a4ae Update Upstream (Paper)

Airplane Changes:
50babee71 Update Upstream (Tuinity)
85e0c63f5 Revert "Allow plugins to stupidly replace server internals"
db3fe2c70 Remove auto import
6b32e01eb Allow plugins to stupidly replace server internals
f849f00fc Flare update
ac10e43a9 Flare update
This commit is contained in:
BillyGalbreath
2021-05-21 17:25:06 -05:00
parent af2dd61af0
commit 1343a05085
10 changed files with 47 additions and 57 deletions

View File

@@ -17251,7 +17251,7 @@ index 03584572fa5bf0d96fc4cecece573547f9c94cea..8bc965a3b3d0d4140c6b94636f0b33b2
}
diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9def540caf 100644
index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..cb8064df7e9f1b8b4d4292486e2193680d83663c 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -154,6 +154,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -17263,10 +17263,10 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPosition lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -190,10 +192,70 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -189,11 +191,69 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
});
}
// Paper end - fix and optimise world upgrading
+ // Tuinity start - optimise checkDespawn
+ public final List<EntityPlayer> getNearbyPlayers(@Nullable Entity source, double sourceX, double sourceY, double sourceZ, double maxRange, @Nullable Predicate<Entity> predicate) {
+ Chunk chunk;
@@ -17323,9 +17323,8 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
+ public @Nullable EntityHuman a(double d0, double d1, double d2, double d3, @Nullable Predicate<Entity> predicate) {
+ return this.getNearestPlayer(null, d0, d1, d2, d3, predicate);
+ }
+
+ // Tuinity end - optimise checkDespawn
+
protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, final DimensionManager dimensionmanager, Supplier<GameProfilerFiller> supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Spigot
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper
@@ -17334,7 +17333,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
@@ -355,6 +417,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -355,6 +415,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@Override
public final Chunk getChunkAt(int i, int j) { // Paper - final to help inline
@@ -17350,7 +17349,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
return (Chunk) this.getChunkAt(i, j, ChunkStatus.FULL, true); // Paper - avoid a method jump
}
@@ -429,6 +500,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -429,6 +498,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@Override
public boolean a(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
@@ -17358,7 +17357,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
// Paper start
@@ -530,6 +602,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -530,6 +600,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
// CraftBukkit start - Split off from above in order to directly send client and physic updates
public void notifyAndUpdatePhysics(BlockPosition blockposition, Chunk chunk, IBlockData oldBlock, IBlockData newBlock, IBlockData actualBlock, int i, int j) {
@@ -17366,7 +17365,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
IBlockData iblockdata = newBlock;
IBlockData iblockdata1 = oldBlock;
IBlockData iblockdata2 = actualBlock;
@@ -542,7 +615,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -542,7 +613,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
this.notify(blockposition, iblockdata1, iblockdata, i);
// Paper start - per player view distance - allow block updates for non-ticking chunks in player view distance
// if copied from above
@@ -17375,7 +17374,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
((WorldServer)this).getChunkProvider().flagDirty(blockposition);
// Paper end - per player view distance
}
@@ -964,6 +1037,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -964,6 +1035,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return;
// Paper end
}
@@ -17383,7 +17382,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
}
// Paper start - Prevent armor stands from doing entity lookups
@Override
@@ -1147,10 +1221,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1147,10 +1219,44 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return this.getChunkAt(i, j, ChunkStatus.FULL, false);
}
@@ -17429,7 +17428,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D);
int j = MathHelper.floor((axisalignedbb.maxX + 2.0D) / 16.0D);
int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D);
@@ -1206,7 +1314,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1206,7 +1312,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
@@ -17438,7 +17437,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
}
}
}
@@ -1229,7 +1337,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1229,7 +1335,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper
if (chunk != null) {
@@ -17447,7 +17446,7 @@ index f7f593a9e58b537109fa6ca1c783f6614f4bfad5..276b1f0c9c9af7db31fba9be0593ae9d
}
}
}
@@ -1237,6 +1345,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1237,6 +1343,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return list;
}
@@ -19635,10 +19634,10 @@ index c96eac4b0b519b2807153fa5a8ebf5a020a2b140..b5c8d9b17c2d5e229db5b48448709194
int j = 0;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
index 74d826853389b8e01ffe2b076cf2b179d29da216..71db36d61a02a104449f8634b2737928874190f6 100644
index 74d826853389b8e01ffe2b076cf2b179d29da216..6ef54d8929814172427cb0dba5dc7711f6be69d1 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java
@@ -22,13 +22,19 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
@@ -22,8 +22,15 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
public final Long2ObjectLinkedOpenHashMap<RegionFile> cache = new Long2ObjectLinkedOpenHashMap();
private final File b;
private final boolean c;
@@ -19654,12 +19653,7 @@ index 74d826853389b8e01ffe2b076cf2b179d29da216..71db36d61a02a104449f8634b2737928
this.b = file;
this.c = flag;
}
-
// Paper start
public static ChunkCoordIntPair getRegionFileCoordinates(File file) {
String fileName = file.getName();
@@ -83,9 +89,9 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
@@ -83,9 +90,9 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
this.b.mkdirs();
}
@@ -19671,7 +19665,7 @@ index 74d826853389b8e01ffe2b076cf2b179d29da216..71db36d61a02a104449f8634b2737928
this.cache.putAndMoveToFirst(i, regionfile1);
// Paper start
@@ -174,6 +180,13 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
@@ -174,6 +181,13 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
return null;
}
// CraftBukkit end
@@ -19685,7 +19679,7 @@ index 74d826853389b8e01ffe2b076cf2b179d29da216..71db36d61a02a104449f8634b2737928
try { // Paper
DataInputStream datainputstream = regionfile.a(chunkcoordintpair);
// Paper start
@@ -189,6 +202,17 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
@@ -189,6 +203,17 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final
try {
if (datainputstream != null) {
nbttagcompound = NBTCompressedStreamTools.a((DataInput) datainputstream);