From d8ba56e45b609aa96739239f94565953da614cf6 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Sat, 25 Nov 2023 21:38:22 -0300 Subject: [PATCH] Update Upstream and Fix Build --- README.md | 11 +++++-- build.gradle.kts | 10 ++++++ gradle.properties | 2 +- ...-Rebrand-to-SparklyPaper-and-Build-C.patch | 19 +++++++++++ ...atch => 0002-Parallel-world-ticking.patch} | 0 ...-Rebrand-to-SparklyPaper-and-Build-C.patch | 19 +++++++++++ .../0002-SparklyPaper-config-files.patch | 6 ++-- ...ly-create-LootContext-for-criterions.patch | 33 ------------------- ... => 0012-Spooky-month-optimizations.patch} | 0 ...key-used-for-nearby-players-when-ti.patch} | 0 ...atch => 0014-Optimize-canSee-checks.patch} | 4 +-- ... => 0015-Optimize-tickBlockEntities.patch} | 2 +- ...Track-how-much-MSPT-each-world-used.patch} | 0 ...atch => 0017-Parallel-world-ticking.patch} | 28 ++++++++-------- settings.gradle.kts | 2 +- 15 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 patches/api/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch rename patches/api/{0001-Parallel-world-ticking.patch => 0002-Parallel-world-ticking.patch} (100%) create mode 100644 patches/paper-api-generator/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch delete mode 100644 patches/server/0012-Lazily-create-LootContext-for-criterions.patch rename patches/server/{0013-Spooky-month-optimizations.patch => 0012-Spooky-month-optimizations.patch} (100%) rename patches/server/{0014-Cache-coordinate-key-used-for-nearby-players-when-ti.patch => 0013-Cache-coordinate-key-used-for-nearby-players-when-ti.patch} (100%) rename patches/server/{0015-Optimize-canSee-checks.patch => 0014-Optimize-canSee-checks.patch} (96%) rename patches/server/{0016-Optimize-tickBlockEntities.patch => 0015-Optimize-tickBlockEntities.patch} (99%) rename patches/server/{0017-Track-how-much-MSPT-each-world-used.patch => 0016-Track-how-much-MSPT-each-world-used.patch} (100%) rename patches/server/{0018-Parallel-world-ticking.patch => 0017-Parallel-world-ticking.patch} (99%) diff --git a/README.md b/README.md index ff4459c..4e8d487 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,6 @@ SparklyPaper's config file is `sparklypaper.yml`, the file is, by default, place * The growth speed of crops and stems are now fixed based on if the block below them is moist or not, instead of doing vanilla's behavior of "check all blocks nearby to see if at least one of them is moist" and "if the blocks nearby are of the same time, make them grow slower". * In my opinion: Who cares about the vanilla behavior lol, most players only care about farm land + crop = crop go brrrr * Another optimization is that crop behavior can be changed to skip from age zero to the last age directly, while still keeping the original growth duration of the crop. This way, useless block updates due to crop growth can be avoided! -* Lazily create `LootContext` for criterions - * For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate. - * To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance. * Spooky month optimizations * The quintessential patch that other performance forks also have for... some reason??? I thought that this optimization was too funny to not do it in SparklyPaper. * Caches when Bat's spooky season starts and ends, and when Skeleton and Zombies halloween starts and ends. The epoch is updated every 90 days. If your server is running for 90+ days straight without restarts, congratulations! @@ -76,6 +73,14 @@ SparklyPaper's config file is `sparklypaper.yml`, the file is, by default, place While we could cherry-pick *everything* from other forks, only patches that I can see and think "yeah, I can see how this would improve performance" or patches that target specific performance/feature pain points in our server are cherry-picked! In fact, some patches that are used in other forks [may be actually borked](docs/BORKED_PATCHES.md)... +## Upstreamed Features + +These features were originally in SparklyPaper, but now they are in Paper, yay! Thanks Paper team :3 + +* Lazily create `LootContext` for criterions (Merged in [Paper #9969](https://github.com/PaperMC/Paper/pull/9969)) + * For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate. + * To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance. + ## Support Because this is a fork made for SparklyPower, we won't give support for any issues that may happen in your server when using SparklyPaper. We know that SparklyPaper may break some plugins, but unless we use these plugins on SparklyPower, we won't go out of our way to fix it! diff --git a/build.gradle.kts b/build.gradle.kts index 91107fd..3f12bd1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -67,6 +67,16 @@ paperweight { serverPatchDir.set(layout.projectDirectory.dir("patches/server")) serverOutputDir.set(layout.projectDirectory.dir("sparklypaper-server")) } + + // Paper API requires this + patchTasks { + register("PaperApiGenerator") { + isBareDirectory.set(true) + upstreamDirPath.set("paper-api-generator") + patchDir.set(layout.projectDirectory.dir("patches/paper-api-generator")) + outputDir.set(layout.projectDirectory.dir("sparklypaper-api-generator")) + } + } } } diff --git a/gradle.properties b/gradle.properties index 452b642..fab8e00 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group=net.sparklypower.sparklypaper version=1.20.2-R0.1-SNAPSHOT mcVersion=1.20.2 -paperRef=e1cd9e59e53aabd50e501cb01feee277a8f69902 +paperRef=b37bbcfd984a325c47d6dee200634b5fa189c64b org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/api/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch b/patches/api/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch new file mode 100644 index 0000000..6f02e1a --- /dev/null +++ b/patches/api/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrPowerGamerBR +Date: Sat, 25 Nov 2023 21:36:16 -0300 +Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes + + +diff --git a/build.gradle.kts b/build.gradle.kts +index e827ee211e3c65dc68ac5867fd8476639df63645..4b29c213a2a66370a84006d9c2cdcb199bb7d4f5 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -75,7 +75,7 @@ dependencies { + } + + // Paper start +-val generatedApiPath: java.nio.file.Path = rootProject.projectDir.toPath().resolve("paper-api-generator/generated") ++val generatedApiPath: java.nio.file.Path = rootProject.projectDir.toPath().resolve("sparklypaper-api-generator/generated") // SparklyPaper + idea { + module { + generatedSourceDirs.add(generatedApiPath.toFile()) diff --git a/patches/api/0001-Parallel-world-ticking.patch b/patches/api/0002-Parallel-world-ticking.patch similarity index 100% rename from patches/api/0001-Parallel-world-ticking.patch rename to patches/api/0002-Parallel-world-ticking.patch diff --git a/patches/paper-api-generator/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch b/patches/paper-api-generator/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch new file mode 100644 index 0000000..3af0ce7 --- /dev/null +++ b/patches/paper-api-generator/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MrPowerGamerBR +Date: Sat, 25 Nov 2023 21:42:37 -0300 +Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes + + +diff --git a/build.gradle.kts b/build.gradle.kts +index 50cc3c1e5968d95a21133e4d554a93e181aba0f6..3f0c449c373c015c1cf10165ff402e29e82ac5de 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -20,7 +20,7 @@ minecraft { + + dependencies { + implementation("com.squareup:javapoet:1.13.0") +- implementation(project(":paper-api")) ++ implementation(project(":sparklypaper-api")) // SparklyPaper + } + + group = "io.papermc.paper" diff --git a/patches/server/0002-SparklyPaper-config-files.patch b/patches/server/0002-SparklyPaper-config-files.patch index e773edd..b3de1cd 100644 --- a/patches/server/0002-SparklyPaper-config-files.patch +++ b/patches/server/0002-SparklyPaper-config-files.patch @@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..bc0ec96f91f7c9ab9f9a865a50f69707 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index aaf04e2be3ed707e51a81d2b1c58dda6f7a8092a..bcc98faf17782c3d7ba576b7d605446a9a4d864b 100644 +index 73e373c04986582d8841ec896a4ee9565eee2e95..d03563baf1e9e25fce8bab1f9fe3f2e57358590b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.WorldData; @@ -152,10 +152,10 @@ index aaf04e2be3ed707e51a81d2b1c58dda6f7a8092a..bcc98faf17782c3d7ba576b7d605446a this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 2af0068ef338634d1f44532af5db66c2d0b3dd10..5a2dd65d9a7ebbd64bf490b8eeb0e91f82bc2b5a 100644 +index c737c5d62407337d3db2899cfc01713a058a6467..5e3033fe176d161ed5a18a73bae752d6689a3e01 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -173,6 +173,14 @@ public class Main { +@@ -174,6 +174,14 @@ public class Main { .describedAs("Jar file"); // Paper end diff --git a/patches/server/0012-Lazily-create-LootContext-for-criterions.patch b/patches/server/0012-Lazily-create-LootContext-for-criterions.patch deleted file mode 100644 index bdb522f..0000000 --- a/patches/server/0012-Lazily-create-LootContext-for-criterions.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MrPowerGamerBR -Date: Tue, 21 Nov 2023 12:16:39 -0300 -Subject: [PATCH] Lazily create LootContext for criterions - -For each player on each tick, enter block triggers are invoked, and these create loot contexts that are promptly thrown away since the trigger doesn't pass the predicate - -To avoid this, we now lazily create the LootContext if the criterion passes the predicate AND if any of the listener triggers require a loot context instance - -diff --git a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java -index f0367a9cce13ef576fbb7023c0aba6eb48963606..bace327cd6409025463ef2caa2c478ebdb196665 100644 ---- a/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java -+++ b/src/main/java/net/minecraft/advancements/critereon/SimpleCriterionTrigger.java -@@ -54,13 +54,18 @@ public abstract class SimpleCriterionTrigger> set = (Set) playerAdvancements.criterionData.get(this); // Paper - fix AdvancementDataPlayer leak - if (set != null && !set.isEmpty()) { -- LootContext lootContext = EntityPredicate.createContext(player, player); -+ LootContext lootContext = null; // EntityPredicate.createContext(player, player); // SparklyPaper - lazily create LootContext for criterions - List> list = null; - - for(CriterionTrigger.Listener listener : set) { - T simpleInstance = listener.trigger(); - if (predicate.test(simpleInstance)) { - Optional optional = simpleInstance.playerPredicate(); -+ // SparklyPaper start - lazily create LootContext for criterions -+ if (lootContext == null && optional.isPresent()) { -+ lootContext = EntityPredicate.createContext(player, player); -+ } -+ // SparklyPaper end - if (optional.isEmpty() || optional.get().matches(lootContext)) { - if (list == null) { - list = Lists.newArrayList(); diff --git a/patches/server/0013-Spooky-month-optimizations.patch b/patches/server/0012-Spooky-month-optimizations.patch similarity index 100% rename from patches/server/0013-Spooky-month-optimizations.patch rename to patches/server/0012-Spooky-month-optimizations.patch diff --git a/patches/server/0014-Cache-coordinate-key-used-for-nearby-players-when-ti.patch b/patches/server/0013-Cache-coordinate-key-used-for-nearby-players-when-ti.patch similarity index 100% rename from patches/server/0014-Cache-coordinate-key-used-for-nearby-players-when-ti.patch rename to patches/server/0013-Cache-coordinate-key-used-for-nearby-players-when-ti.patch diff --git a/patches/server/0015-Optimize-canSee-checks.patch b/patches/server/0014-Optimize-canSee-checks.patch similarity index 96% rename from patches/server/0015-Optimize-canSee-checks.patch rename to patches/server/0014-Optimize-canSee-checks.patch index 4361c6c..284e212 100644 --- a/patches/server/0015-Optimize-canSee-checks.patch +++ b/patches/server/0014-Optimize-canSee-checks.patch @@ -27,7 +27,7 @@ index caa73632aee15583c6b6ed12a668c8f49b794708..fa4c8a52a57775ef8f23e48e57b76ff7 } // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..1424783f9ebf44d260721fb36c6ae90adee82e1d 100644 +index 3a792ddc31e76038b84e8f87088c4cd94c349138..e1fb00bd5f4a2849026c6c9c50423810a494f925 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -183,7 +183,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -39,7 +39,7 @@ index 83aaf3e6e377d731ce02f779f80b7bf5db46f89f..1424783f9ebf44d260721fb36c6ae90a private final Set unlistedEntities = new HashSet<>(); // Paper private static final WeakHashMap> pluginWeakReferences = new WeakHashMap<>(); private int hash = 0; -@@ -2070,9 +2070,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2086,9 +2086,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(org.bukkit.entity.Entity entity) { diff --git a/patches/server/0016-Optimize-tickBlockEntities.patch b/patches/server/0015-Optimize-tickBlockEntities.patch similarity index 99% rename from patches/server/0016-Optimize-tickBlockEntities.patch rename to patches/server/0015-Optimize-tickBlockEntities.patch index 6c6e6b2..30a94a4 100644 --- a/patches/server/0016-Optimize-tickBlockEntities.patch +++ b/patches/server/0015-Optimize-tickBlockEntities.patch @@ -181,7 +181,7 @@ index fa170cc1ce7011d201295b89718292d696c7fc24..c6f62c56da6e74fbaa57300f8cc27186 } diff --git a/src/main/java/net/sparklypower/sparklypaper/BlockEntityTickersList.java b/src/main/java/net/sparklypower/sparklypaper/BlockEntityTickersList.java new file mode 100644 -index 0000000000000000000000000000000000000000..713b98c7306a8495461fa228f9f3569515bf8166 +index 0000000000000000000000000000000000000000..f2c00eb6092be5f2f9b7ea23cc45061135f0d1fa --- /dev/null +++ b/src/main/java/net/sparklypower/sparklypaper/BlockEntityTickersList.java @@ -0,0 +1,70 @@ diff --git a/patches/server/0017-Track-how-much-MSPT-each-world-used.patch b/patches/server/0016-Track-how-much-MSPT-each-world-used.patch similarity index 100% rename from patches/server/0017-Track-how-much-MSPT-each-world-used.patch rename to patches/server/0016-Track-how-much-MSPT-each-world-used.patch diff --git a/patches/server/0018-Parallel-world-ticking.patch b/patches/server/0017-Parallel-world-ticking.patch similarity index 99% rename from patches/server/0018-Parallel-world-ticking.patch rename to patches/server/0017-Parallel-world-ticking.patch index a613581..0023f36 100644 --- a/patches/server/0018-Parallel-world-ticking.patch +++ b/patches/server/0017-Parallel-world-ticking.patch @@ -922,7 +922,7 @@ index 3721a45fbc38d6fc92cc8ba5080c7bd18b8d006c..add727490a4513342914e94a57e46743 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index f71a4a8307fb092d33545e12d253e0b80c884168..e44f7734e677226ff8715134c81edad9520b5694 100644 +index 08980763020a13ab49dc7d637625a4fba56da8c9..69dd7ef091f0f73fcd0c98fa5e4b610d8f4155dc 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -18,6 +18,7 @@ import java.util.Optional; @@ -1247,7 +1247,7 @@ index f5db60cbecbe69941873e064315931089fe0e48a..6c4a1de4f2606439348dbdb620a1aff6 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index f664da5a8413bb13cc95d2cf1604f11a5d285dae..42da66ca4fbb37cac1d8db20f8f4f1c83f8f5fd7 100644 +index 82f18790b9dc55b039ae03600a80a46d56a87521..ed96fa9659c50da57e460846eda26090ec13085e 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -102,6 +102,7 @@ public abstract class AbstractContainerMenu { @@ -1322,7 +1322,7 @@ index 45243249a561440512ef2a620c60b02e159c80e2..849b9b4336d2ac99324dacf6ad8a2e34 continue; } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index df9de7f1907efd4e30eb9ab3a683761ccb4b2204..259361113561194d61d4873dd4994f5be9283425 100644 +index 868e4b69e7ffa502a1ea188053d6f6ae125a554a..94eac6837c06e6fd192c108632f1e365a008d6ad 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -15,6 +15,8 @@ import java.util.function.Consumer; @@ -1750,10 +1750,10 @@ index 4cdfc433df67afcd455422e9baf56f167dd712ae..f52b3740bd48f8527a36d48a0454e7d6 // To ensure nothing weird happens with dimension travelling, do not iterate over new entries... // (by dfl iterator() is configured to not iterate over new entries) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec8180b92229 100644 +index f19f2199cac5a7eb275f40cc23472416a40ec0da..08f481b413b426987444b8ed9ed89b7ccbb45751 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -426,7 +426,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -428,7 +428,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { } private boolean unloadChunk0(int x, int z, boolean save) { @@ -1762,7 +1762,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 if (!this.isChunkLoaded(x, z)) { return true; } -@@ -441,7 +441,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -443,7 +443,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { @@ -1771,7 +1771,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 warnUnsafeChunk("regenerating a faraway chunk", x, z); // Paper // Paper start - implement regenerateChunk method final ServerLevel serverLevel = this.world; -@@ -502,6 +502,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -504,6 +504,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -1779,7 +1779,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; -@@ -537,7 +538,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -539,7 +540,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { @@ -1788,7 +1788,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 warnUnsafeChunk("loading a faraway chunk", x, z); // Paper // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); -@@ -800,6 +801,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -802,6 +803,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) { @@ -1796,7 +1796,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 this.world.captureTreeGeneration = true; this.world.captureBlockStates = true; boolean grownTree = this.generateTree(loc, type); -@@ -910,11 +912,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -912,11 +914,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { @@ -1810,7 +1810,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 return !world.explode(source != null ? ((org.bukkit.craftbukkit.entity.CraftEntity) source).getHandle() : null, loc.getX(), loc.getY(), loc.getZ(), power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled; } // Paper end -@@ -984,6 +988,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -986,6 +990,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -1818,7 +1818,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 warnUnsafeChunk("getting a faraway chunk", x >> 4, z >> 4); // Paper // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); -@@ -1014,6 +1019,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1016,6 +1021,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setBiome(int x, int y, int z, Holder bb) { BlockPos pos = new BlockPos(x, 0, z); @@ -1826,7 +1826,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 if (this.world.hasChunkAt(pos)) { net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos); -@@ -2272,6 +2278,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2299,6 +2305,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) { @@ -1834,7 +1834,7 @@ index c3060d1d4d0caf369c6ab516cb424f45eb851019..80cc42ea129a796a3e1189d9f840ec81 getHandle().gameEvent(sourceEntity != null ? ((CraftEntity) sourceEntity).getHandle(): null, net.minecraft.core.registries.BuiltInRegistries.GAME_EVENT.get(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(gameEvent.getKey())), org.bukkit.craftbukkit.util.CraftVector.toBlockPos(position)); } // Paper end -@@ -2426,7 +2433,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2453,7 +2460,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper start public java.util.concurrent.CompletableFuture getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { warnUnsafeChunk("getting a faraway chunk async", x, z); // Paper diff --git a/settings.gradle.kts b/settings.gradle.kts index 37d6034..7a78ef4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,4 +11,4 @@ plugins { rootProject.name = "SparklyPaper" -include("sparklypaper-api", "sparklypaper-server") +include("sparklypaper-api-generator", "sparklypaper-api", "sparklypaper-server")