diff options
author | Spottedleaf <[email protected]> | 2023-06-08 16:35:02 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2023-06-08 16:35:02 -0700 |
commit | efb4197a1bdd6afb2c8f1fcdb5ea87e19420411e (patch) | |
tree | 3a62b153583cd32af8a6a83634502eadf98e4605 | |
parent | 902691b636614df08ba407823109b44be47f2277 (diff) | |
download | Paper-efb4197a1bdd6afb2c8f1fcdb5ea87e19420411e.tar.gz Paper-efb4197a1bdd6afb2c8f1fcdb5ea87e19420411e.zip |
Fix final compilation issues
14 files changed, 26 insertions, 27 deletions
diff --git a/patches/server/0019-Rewrite-chunk-system.patch b/patches/server/0019-Rewrite-chunk-system.patch index b66bceb866..0b6532adcf 100644 --- a/patches/server/0019-Rewrite-chunk-system.patch +++ b/patches/server/0019-Rewrite-chunk-system.patch @@ -2310,10 +2310,10 @@ index 95eac2e12a16938d81ab512b00e90c5234b42834..8f7bf1f0400aeab8b7801d113d244d07 private ChunkSystem() { diff --git a/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java new file mode 100644 -index 0000000000000000000000000000000000000000..305a4f747c9c8d99d482ba36e8c89a8412593f39 +index 0000000000000000000000000000000000000000..436111365e26be6233ea36b64c1574c823f65406 --- /dev/null +++ b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java -@@ -0,0 +1,1416 @@ +@@ -0,0 +1,1417 @@ +package io.papermc.paper.chunk.system; + +import ca.spottedleaf.concurrentutil.collection.SRSWLinkedQueue; @@ -3222,9 +3222,10 @@ index 0000000000000000000000000000000000000000..305a4f747c9c8d99d482ba36e8c89a84 + + private boolean isLoadedChunkGeneratable(final ChunkAccess chunkAccess) { + final BelowZeroRetrogen belowZeroRetrogen; ++ // see PortalForcer#findPortalAround + return chunkAccess != null && ( + chunkAccess.getStatus() == ChunkStatus.FULL || -+ ((belowZeroRetrogen = chunkAccess.getBelowZeroRetrogen()) != null && belowZeroRetrogen.targetStatus().isOrAfter(ChunkStatus.FULL)) ++ ((belowZeroRetrogen = chunkAccess.getBelowZeroRetrogen()) != null && belowZeroRetrogen.targetStatus().isOrAfter(ChunkStatus.SPAWN)) + ); + } + @@ -21184,7 +21185,7 @@ index d87f02c748fe2e5b4ea251f6691e8907a152cb6d..5988c0847af4e8f0094328e91f736f25 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/LevelReader.java b/src/main/java/net/minecraft/world/level/LevelReader.java -index fe76ec5b10242beb6d6057bd680484fc63b7eac3..7f0952fa312e2870f26d94344408b9dcc95f4cc3 100644 +index fe76ec5b10242beb6d6057bd680484fc63b7eac3..e3e2b88b8ade4fa2b482626c7e00ac6a0bf8eb5e 100644 --- a/src/main/java/net/minecraft/world/level/LevelReader.java +++ b/src/main/java/net/minecraft/world/level/LevelReader.java @@ -26,6 +26,15 @@ public interface LevelReader extends BlockAndTintGetter, CollisionGetter, Signal @@ -21194,7 +21195,7 @@ index fe76ec5b10242beb6d6057bd680484fc63b7eac3..7f0952fa312e2870f26d94344408b9dc + // Paper start - rewrite chunk system + default ChunkAccess syncLoadNonFull(int chunkX, int chunkZ, ChunkStatus status) { + if (status == null || status.isOrAfter(ChunkStatus.FULL)) { -+ throw new IllegalArgumentException("Status: " + status.getName()); ++ throw new IllegalArgumentException("Status: " + status.toString()); + } + return this.getChunk(chunkX, chunkZ, status, true); + } diff --git a/patches/server/0688-Optimise-general-POI-access.patch b/patches/server/0688-Optimise-general-POI-access.patch index 1ec0a06476..480cf147dd 100644 --- a/patches/server/0688-Optimise-general-POI-access.patch +++ b/patches/server/0688-Optimise-general-POI-access.patch @@ -992,7 +992,7 @@ index 0887cba39bfc4279abec21c6c316abab28beb0a3..5561b8499a0503b850974b1dc309edfb return Optional.empty(); } else { diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index 33a6fda1e8f2df61b44f0e3ddda356ffa386f2df..1c71f0e21de3a12aa251b0f1739502212ec7b02d 100644 +index 33a6fda1e8f2df61b44f0e3ddda356ffa386f2df..9b38f4c81ca9ef0f91f9d59fc2be4eecc1afc165 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java @@ -51,18 +51,39 @@ public class PortalForcer { @@ -1020,7 +1020,7 @@ index 33a6fda1e8f2df61b44f0e3ddda356ffa386f2df..1c71f0e21de3a12aa251b0f173950221 + (BlockPos pos) -> { + net.minecraft.world.level.chunk.ChunkAccess lowest = this.level.getChunk(pos.getX() >> 4, pos.getZ() >> 4, net.minecraft.world.level.chunk.ChunkStatus.EMPTY); + if (!lowest.getStatus().isOrAfter(net.minecraft.world.level.chunk.ChunkStatus.FULL) -+ && (lowest.getBelowZeroRetrogen() == null || !lowest.getBelowZeroRetrogen().targetStatus().isOrAfter(net.minecraft.world.level.chunk.ChunkStatus.HEIGHTMAPS))) { ++ && (lowest.getBelowZeroRetrogen() == null || !lowest.getBelowZeroRetrogen().targetStatus().isOrAfter(net.minecraft.world.level.chunk.ChunkStatus.SPAWN))) { + // why would we generate the chunk? + return false; + } diff --git a/patches/server/0745-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0745-Allow-delegation-to-vanilla-chunk-gen.patch index 5fe3066574..b647b5da08 100644 --- a/patches/server/0745-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0745-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ecd6d91ca1ddee0d0d3b6d41fb96f432273deffc..9b2f05e6d1d8e52842abaa4c92b60f7558480c70 100644 +index ecd6d91ca1ddee0d0d3b6d41fb96f432273deffc..a03785664a9d1806f3e3e2b53c10a941935ae9d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2354,6 +2354,90 @@ public final class CraftServer implements Server { +@@ -2354,6 +2354,88 @@ public final class CraftServer implements Server { return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME)); } @@ -21,8 +21,8 @@ index ecd6d91ca1ddee0d0d3b6d41fb96f432273deffc..9b2f05e6d1d8e52842abaa4c92b60f75 + net.minecraft.world.level.chunk.ChunkStatus.NOISE, + net.minecraft.world.level.chunk.ChunkStatus.SURFACE, + net.minecraft.world.level.chunk.ChunkStatus.CARVERS, -+ net.minecraft.world.level.chunk.ChunkStatus.LIQUID_CARVERS, + net.minecraft.world.level.chunk.ChunkStatus.FEATURES, ++ net.minecraft.world.level.chunk.ChunkStatus.INITIALIZE_LIGHT, + net.minecraft.world.level.chunk.ChunkStatus.LIGHT + ); + @@ -77,8 +77,7 @@ index ecd6d91ca1ddee0d0d3b6d41fb96f432273deffc..9b2f05e6d1d8e52842abaa4c92b60f75 + chunk -> { + throw new UnsupportedOperationException("Not creating full chunks here"); + }, -+ chunks, -+ true ++ chunks + ).thenAccept(either -> { + if (chunkStatus == net.minecraft.world.level.chunk.ChunkStatus.NOISE) { + either.left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, net.minecraft.world.level.chunk.ChunkStatus.POST_FEATURES)); @@ -89,7 +88,6 @@ index ecd6d91ca1ddee0d0d3b6d41fb96f432273deffc..9b2f05e6d1d8e52842abaa4c92b60f75 + // get empty object + OldCraftChunkData data = (OldCraftChunkData) this.createChunkData(world); + // copy over generated sections -+ data.getLights().addAll(protoChunk.getLights().toList()); + data.setRawChunkData(protoChunk.getSections()); + // hooray! + return data; diff --git a/patches/server/0765-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0765-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 31665dc946..282c371902 100644 --- a/patches/server/0765-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0765-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,7 +18,7 @@ index d8fa1cb0b340f97debceb7e5b90051d29448fc58..d55c798657bf8922f3d43d84620cfeed biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9b2f05e6d1d8e52842abaa4c92b60f7558480c70..98a0069562be1abf2ddc38ee6bc01c3118d84a1a 100644 +index a03785664a9d1806f3e3e2b53c10a941935ae9d9..52bbb31803b4ebd0d7dec0de50c4de3b0b808be1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1236,7 +1236,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0780-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0780-API-for-creating-command-sender-which-forwards-feedb.patch index 3879e5603f..eb05717a37 100644 --- a/patches/server/0780-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0780-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 98a0069562be1abf2ddc38ee6bc01c3118d84a1a..93eff6f651a0f55098f0f7d46b33066d8f88d6a6 100644 +index 52bbb31803b4ebd0d7dec0de50c4de3b0b808be1..1d6c2724571803a9f1dc77d145dd5355d36444b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2016,6 +2016,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0784-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0784-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 908f20aec6..63d2f386cb 100644 --- a/patches/server/0784-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0784-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 93eff6f651a0f55098f0f7d46b33066d8f88d6a6..31219bb9958673d4f30daea338b0d2d798538758 100644 +index 1d6c2724571803a9f1dc77d145dd5355d36444b8..7a4b42cb1a24a281ddb7d5f92ed8c104d392e318 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2190,6 +2190,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0785-Add-GameEvent-tags.patch b/patches/server/0785-Add-GameEvent-tags.patch index a2586adb0b..2a62d03327 100644 --- a/patches/server/0785-Add-GameEvent-tags.patch +++ b/patches/server/0785-Add-GameEvent-tags.patch @@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 31219bb9958673d4f30daea338b0d2d798538758..d4fff6b8b40ba1644b9158e259e596f36d5206af 100644 +index 7a4b42cb1a24a281ddb7d5f92ed8c104d392e318..0b88024287076448db40adc58f9b47091eb9f7fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2600,6 +2600,15 @@ public final class CraftServer implements Server { +@@ -2598,6 +2598,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } @@ -65,7 +65,7 @@ index 31219bb9958673d4f30daea338b0d2d798538758..d4fff6b8b40ba1644b9158e259e596f3 default -> throw new IllegalArgumentException(); } -@@ -2632,6 +2641,13 @@ public final class CraftServer implements Server { +@@ -2630,6 +2639,13 @@ public final class CraftServer implements Server { net.minecraft.core.Registry<EntityType<?>> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } diff --git a/patches/server/0791-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0791-Put-world-into-worldlist-before-initing-the-world.patch index d0fcfafb1c..6a40f957ff 100644 --- a/patches/server/0791-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0791-Put-world-into-worldlist-before-initing-the-world.patch @@ -23,7 +23,7 @@ index f2f5778bc44ed5f7cd9f935bf5df08d2c1cc6d23..1f4a3e170188ebde3d56ec59252bb69c if (worlddata.getCustomBossEvents() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d4fff6b8b40ba1644b9158e259e596f36d5206af..96e82254b13bebd197cddc83355b6fb5ad055313 100644 +index 0b88024287076448db40adc58f9b47091eb9f7fe..a63f533f636c2ee3720dca0f89b219f8c2c5747b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1265,10 +1265,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0793-Custom-Potion-Mixes.patch b/patches/server/0793-Custom-Potion-Mixes.patch index ec73877ed2..f826ed9061 100644 --- a/patches/server/0793-Custom-Potion-Mixes.patch +++ b/patches/server/0793-Custom-Potion-Mixes.patch @@ -164,7 +164,7 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 96e82254b13bebd197cddc83355b6fb5ad055313..3ed58a87e08ab22a39d4c3b3fbe0b2ea9e3747f8 100644 +index a63f533f636c2ee3720dca0f89b219f8c2c5747b..a76b37d131daee4e0518ee4a7a56c14b54eff05b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -301,6 +301,7 @@ public final class CraftServer implements Server { @@ -184,7 +184,7 @@ index 96e82254b13bebd197cddc83355b6fb5ad055313..3ed58a87e08ab22a39d4c3b3fbe0b2ea MobEffects.BLINDNESS.getClass(); PotionEffectType.stopAcceptingRegistrations(); // Ugly hack :( -@@ -2959,5 +2960,10 @@ public final class CraftServer implements Server { +@@ -2957,5 +2958,10 @@ public final class CraftServer implements Server { return datapackManager; } diff --git a/patches/server/0804-Fix-saving-in-unloadWorld.patch b/patches/server/0804-Fix-saving-in-unloadWorld.patch index 20eba0723a..fcd51bc3ca 100644 --- a/patches/server/0804-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0804-Fix-saving-in-unloadWorld.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3ed58a87e08ab22a39d4c3b3fbe0b2ea9e3747f8..c020acc1bcfe3471728c143862625463d7c82dd8 100644 +index a76b37d131daee4e0518ee4a7a56c14b54eff05b..501f2b4f9065aa8bf54c4acf1db54164e5f6043e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1313,7 +1313,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0820-WorldCreator-keepSpawnLoaded.patch b/patches/server/0820-WorldCreator-keepSpawnLoaded.patch index 8c016a67b6..f1bf6ea6b9 100644 --- a/patches/server/0820-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0820-WorldCreator-keepSpawnLoaded.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c020acc1bcfe3471728c143862625463d7c82dd8..cabb66678afdad83341dd3b1a662cadeef4a4196 100644 +index 501f2b4f9065aa8bf54c4acf1db54164e5f6043e..5bb99ff6ecb8da705a9a7bcb342f7eaa1b0288a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1272,6 +1272,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0835-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0835-Throw-exception-on-world-create-while-being-ticked.patch index b4807cde5b..436abc049f 100644 --- a/patches/server/0835-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0835-Throw-exception-on-world-create-while-being-ticked.patch @@ -45,7 +45,7 @@ index d373a5f20b017efdb9c339541b124009e07616c8..37441421a50867eeecf5cf3aed3e7096 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cabb66678afdad83341dd3b1a662cadeef4a4196..dcf7fac3a5619afde34aa22cbc6077579b60eb09 100644 +index 5bb99ff6ecb8da705a9a7bcb342f7eaa1b0288a6..3e3b84c2a400b81937cd54c03f4d423a37d4cd10 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -868,6 +868,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0842-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0842-Don-t-broadcast-messages-to-command-blocks.patch index df470e096d..29f6cef53b 100644 --- a/patches/server/0842-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0842-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,7 +20,7 @@ index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index dcf7fac3a5619afde34aa22cbc6077579b60eb09..a28da8addf6c06d6c80d9a6a8bd9617808ba7de6 100644 +index 3e3b84c2a400b81937cd54c03f4d423a37d4cd10..bc30e70c8451a8ef1aa671d7a2593a67fc3bd687 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1789,7 +1789,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0863-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0863-Add-Velocity-IP-Forwarding-Support.patch index 44e2810137..186f977312 100644 --- a/patches/server/0863-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0863-Add-Velocity-IP-Forwarding-Support.patch @@ -213,7 +213,7 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a28da8addf6c06d6c80d9a6a8bd9617808ba7de6..f87433133fa6a68dac33895f91770f453e0678d2 100644 +index bc30e70c8451a8ef1aa671d7a2593a67fc3bd687..aefbb6a3f49a74a4c8fd004aa6a4ab1ab907e878 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -797,7 +797,7 @@ public final class CraftServer implements Server { |