diff --git a/.gitmodules b/.gitmodules index 76ec94597..74b1cd8c2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ -[submodule "Paper"] - path = Paper - url = https://github.com/PaperMC/Paper.git - branch = master +[submodule "Tuinity"] + path = Tuinity + url = https://github.com/Spottedleaf/Tuinity.git diff --git a/Paper b/Paper deleted file mode 160000 index cfed00cf5..000000000 --- a/Paper +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cfed00cf54f973a2de0f2a2646ec5dbe9ef647a1 diff --git a/Tuinity b/Tuinity new file mode 160000 index 000000000..d8b8905f9 --- /dev/null +++ b/Tuinity @@ -0,0 +1 @@ +Subproject commit d8b8905f9829b9386bd291f9e5ad48bdece9dded diff --git a/akarin b/akarin index e2af15105..afa1a84ba 100755 --- a/akarin +++ b/akarin @@ -50,7 +50,7 @@ case "$1" in basedir $mvncmd -N install || exit 1 cd ${FORK_NAME}-API - $mvncmd -e clean install && (cd ../Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install || exit 1 + $mvncmd -e clean install && (cd ../Tuinity/Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install || exit 1 ) || failed=1 ;; "j" | "launcher" | "jar" | "paperclip") @@ -59,7 +59,7 @@ case "$1" in basedir $mvncmd -N install surefire-report:report cd ${FORK_NAME}-API - $mvncmd -e clean install && (cd ../Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install surefire-report:report + $mvncmd -e clean install && (cd ../Tuinity/Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd -e clean install surefire-report:report basedir $scriptdir/installLauncher.sh "$basedir" ) || failed=1 @@ -69,7 +69,7 @@ case "$1" in basedir $mvncmd -N install cd ${FORK_NAME}-API - $mvncmd clean deploy && (cd ../Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd clean install + $mvncmd clean deploy && (cd ../Tuinity/Paper/Paper-MojangAPI && $mvncmd -e clean install) && cd ../${FORK_NAME}-Server && $mvncmd clean install ) ;; "u" | "up" | "upstream" | "update") diff --git a/patches/api/0001-POM-Changes.patch b/patches/api/0001-POM-Changes.patch index 76abe7b48..49cf39500 100644 --- a/patches/api/0001-POM-Changes.patch +++ b/patches/api/0001-POM-Changes.patch @@ -6,29 +6,28 @@ Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 20c473f521e50df57065d3644398f9db777c1a24..13d0bb7355a8f6c1a33feb3be60f61aa60dd5f9c 100644 +index a2387a667efba33135197d40efe879fc9f635d2f..13d0bb7355a8f6c1a33feb3be60f61aa60dd5f9c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 -- com.destroystokyo.paper -- paper-parent +- com.tuinity +- tuinity-parent + io.akarin.server + akarin-parent dev-SNAPSHOT -+ ../pom.xml + ../pom.xml -- com.destroystokyo.paper -- paper-api +- tuinity-api + akarin-api 1.15.2-R0.1-SNAPSHOT jar -- Paper-API -- https://github.com/PaperMC/Paper +- Tuinity-API +- https://github.com/Spottedleaf/Tuinity + Akarin-API + https://github.com/Akarin-project/Akarin An enhanced plugin API for Minecraft servers. diff --git a/patches/api/0002-Add-server-configuration.patch b/patches/api/0002-Add-server-configuration.patch index 5bd9aceff..ae040f94d 100644 --- a/patches/api/0002-Add-server-configuration.patch +++ b/patches/api/0002-Add-server-configuration.patch @@ -6,24 +6,24 @@ Subject: [PATCH] Add server configuration diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java -index 93d5a3f97a1b2b3a1cd2731d48e8ebd01d29aa91..dfb57b9db56b31205a581f26ff46496b95c7344b 100644 +index cb92d7b2167fbc775d7a044ecc6c319d0b96765e..1aa20c95c7fc6ff4fee9bc7ec83f8a5d5e887524 100644 --- a/src/main/java/co/aikar/timings/TimingsExport.java +++ b/src/main/java/co/aikar/timings/TimingsExport.java -@@ -207,6 +207,7 @@ class TimingsExport extends Thread { - pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)), +@@ -208,6 +208,7 @@ class TimingsExport extends Thread { pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)), - pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)) + pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Tuinity - add config to timings report + pair("tuinity", mapAsJSON(Bukkit.spigot().getTuinityConfig(), null)) // Tuinity - add config to timings report + , pair("akarin", mapAsJSON(Bukkit.spigot().getAkarinConfig(), null)) // Akarin - Server config )); new TimingsExport(listeners, parent, history).start(); diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index cc06492f46ba5776221cd2614c1dcd8f33cc8faf..18778456394681d1aec2850818913fbbb7bf493a 100644 +index cf20e75419b011e819c63fc8453f250b849cb2c7..c90456e198afdacc21b6980c415c3048fdc7f7a2 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1396,6 +1396,14 @@ public interface Server extends PluginMessageRecipient { +@@ -1404,6 +1404,14 @@ public interface Server extends PluginMessageRecipient { } - // Paper end + // Tuinity end - add config to timings report + // Akarin start - Server config + @NotNull diff --git a/patches/server/0001-Fix-errors-on-editors-and-add-ignores.patch b/patches/server/0001-Fix-errors-on-editors-and-add-ignores.patch index adbd9fce1..0df8e0ba1 100644 --- a/patches/server/0001-Fix-errors-on-editors-and-add-ignores.patch +++ b/patches/server/0001-Fix-errors-on-editors-and-add-ignores.patch @@ -30,10 +30,10 @@ index 9ebd7ecb7a0ac73ccacf34c097056598bb5d26e8..677ccffd00e44eff74fa588a1af0c3e5 final PooledHashSets.PooledObjectLinkedOpenHashSet map = entry.getValue(); diff --git a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java -index c71ed11834557f71504de5038d3bb593824f6f95..1b943cff539df8486e639118f6bc97c9e31f57c2 100644 +index 1330df2c1d3c4f52dad0adeb169409eb412814ab..534d24df5c9084da210183eac1e34f2c6faca4cd 100644 --- a/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java +++ b/src/main/java/com/destroystokyo/paper/util/misc/AreaMap.java -@@ -164,10 +164,10 @@ public abstract class AreaMap { +@@ -173,10 +173,10 @@ public abstract class AreaMap { final int centerX = MCUtil.getCoordinateX(currPosition); final int centerZ = MCUtil.getCoordinateZ(currPosition); diff --git a/patches/server/0002-Akarin-POM-changes.patch b/patches/server/0002-Akarin-POM-changes.patch index 26f00357e..4ecb743bb 100644 --- a/patches/server/0002-Akarin-POM-changes.patch +++ b/patches/server/0002-Akarin-POM-changes.patch @@ -6,32 +6,30 @@ Subject: [PATCH] Akarin POM changes diff --git a/pom.xml b/pom.xml -index 0c0051f7f2a58d63b851e80b442acbb47ca75dfa..725edb29f55276596ff5ee9240ce3432a47cc40b 100644 +index 66517f30fc00b86d1e3539e700f8c643aaada85e..5c2fc340f281297f6dc9e01d084d21f565008e6f 100644 --- a/pom.xml +++ b/pom.xml -@@ -1,12 +1,11 @@ -- 4.0.0 -- paper +- tuinity + akarin jar 1.15.2-R0.1-SNAPSHOT -- Paper -- https://papermc.io -- +- Tuinity-Server +- https://github.com/Spottedleaf/Tuinity + Akarin-Server + https://github.com/Akarin-project/Akarin UTF-8 -@@ -18,16 +17,16 @@ +@@ -17,16 +17,16 @@ -- com.destroystokyo.paper -- paper-parent +- com.tuinity +- tuinity-parent + io.akarin.server + akarin-parent dev-SNAPSHOT @@ -40,41 +38,40 @@ index 0c0051f7f2a58d63b851e80b442acbb47ca75dfa..725edb29f55276596ff5ee9240ce3432 -- com.destroystokyo.paper -- paper-api +- com.tuinity +- tuinity-api + io.akarin.server + akarin-api ${project.version} compile -@@ -153,15 +152,15 @@ +@@ -163,7 +163,7 @@ -- paper-${minecraft.version} -- clean install +- tuinity-${minecraft.version} + akarin-${minecraft.version} -+ install + install - com.lukegb.mojo +@@ -171,7 +171,7 @@ gitdescribe-maven-plugin 1.3 -- git-Paper- +- git-Tuinity- + git-Akarin- .. diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java -index 674096cab190d62622f9947853b056f57d43a2a5..9a7235b8e525fbc52ff7ce53156816f9bbdb5d6f 100644 +index 001b1e5197eaa51bfff9031aa6c69876c9a47960..9a7235b8e525fbc52ff7ce53156816f9bbdb5d6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java @@ -11,7 +11,7 @@ public final class Versioning { public static String getBukkitVersion() { String result = "Unknown-Version"; -- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.destroystokyo.paper/paper-api/pom.properties"); +- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.tuinity/tuinity-api/pom.properties"); // Tuinity + InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.akarin.server/akarin-api/pom.properties"); // Akarin Properties properties = new Properties(); diff --git a/patches/server/0003-Akarin-configuration.patch b/patches/server/0003-Akarin-configuration.patch index 370569fc6..cbd0eb256 100644 --- a/patches/server/0003-Akarin-configuration.patch +++ b/patches/server/0003-Akarin-configuration.patch @@ -195,61 +195,60 @@ index 0000000000000000000000000000000000000000..2ac8f02a97429f04f3e5c9206ec228ed + +} diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index b07c49f1b48cc6dedd7c2057da0ec4f6f6d446e6..15f6f2e4f9928f87f1ee96bddfe516ae1c817624 100644 +index c33e13bcf15757abff8b6b74437def37e3860ddf..b415028b00b316531128bacc9689fae153f4afeb 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java -@@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer - com.destroystokyo.paper.PaperConfig.registerCommands(); +@@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now // Paper end + com.tuinity.tuinity.config.TuinityConfig.init((File) options.valueOf("tuinity-settings")); // Tuinity - Server Config + io.akarin.server.Config.init((File) options.valueOf("akarin-settings")); // Akarin - Server Config this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals); this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 0e6368d0fb3beccb492ae3867fb4e22825f928a2..58e9709743b759a610e238f8b9861fc38b06ce60 100644 +index 7fd88b7932da9f8694ebbe32146ef1507cbc68c2..aa69af321e708d321a00fa6cc4ccdc17eb52b3be 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -88,6 +88,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper +@@ -89,6 +89,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray + public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config + public final io.akarin.server.Config.WorldConfig akarinConfig; // Akarin - Server Config -+ + public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot - private org.spigotmc.TickLimiter entityLimiter; -@@ -137,6 +139,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot +@@ -140,6 +141,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this.paperConfig) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray + this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(worlddata.getName()); // Tuinity - Server Config + this.akarinConfig = new io.akarin.server.Config.WorldConfig(worlddata.getName()); // Akarin - Server Config this.generator = gen; + dimensionmanager.world = (WorldServer) this; // Paper this.world = new CraftWorld((WorldServer) this, gen, env); - this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..7fc5eac2819fa59e4c18255af8ccf7f9be9e601d 100644 +index 0f97cf2b418646fe136e4a23b8ec00cb7f77a823..9ea75a4ff35fd0abec7cd7f3321ba219de970fc2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -814,6 +814,7 @@ public final class CraftServer implements Server { - +@@ -816,6 +816,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper + com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config + io.akarin.server.Config.init((File) console.options.valueOf("akarin-settings")); // Akarin - Server Config for (WorldServer world : console.getWorlds()) { world.worldData.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -842,6 +843,7 @@ public final class CraftServer implements Server { - } +@@ -845,6 +846,7 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot world.paperConfig.init(); // Paper + world.tuinityConfig.init(); // Tuinity - Server Config + world.akarinConfig.init(); // Akarin - Server Config } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -2100,6 +2102,14 @@ public final class CraftServer implements Server { - return com.destroystokyo.paper.PaperConfig.config; +@@ -2147,6 +2149,14 @@ public final class CraftServer implements Server { } + // Tuinity end - add config to timings report + // Akarin Start - Server Config + @Override @@ -263,12 +262,12 @@ index b89f99a66fe2ab9ad4c956c38c9e4b1d79716c9c..7fc5eac2819fa59e4c18255af8ccf7f9 public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 93340e9470b23f2d8c91338e63e95c6465e69c3c..d807195bd957b3811313ecca5588339389e064b4 100644 +index 90a2f8fea7a291cd77b6625079b8081fb3aebe2e..61520ca75eda95f9e35c89bc8945de6ae60b702a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -139,6 +139,14 @@ public class Main { +@@ -146,6 +146,14 @@ public class Main { .describedAs("Yml file"); - // Paper end + /* Conctete End - Server Config */ + // Akarin Start - Server Config + acceptsAll(asList("akarin", "akarin-settings"), "File for Akarin settings") diff --git a/patches/server/0004-Akarin-brand-changes.patch b/patches/server/0004-Akarin-brand-changes.patch index 3c1af3337..9de478653 100644 --- a/patches/server/0004-Akarin-brand-changes.patch +++ b/patches/server/0004-Akarin-brand-changes.patch @@ -5,42 +5,29 @@ Date: Tue, 18 Dec 2018 06:27:02 -0800 Subject: [PATCH] Akarin brand changes -diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java -index cf00f35a5b7c2d2f6b6989e0855de8b882dcef50..a45e63a02759305e119a41eac55a7f40488dd12c 100644 ---- a/src/main/java/net/minecraft/server/EULA.java -+++ b/src/main/java/net/minecraft/server/EULA.java -@@ -70,7 +70,7 @@ public class EULA { - Properties properties = new Properties(); - - properties.setProperty("eula", "false"); -- properties.store(outputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag; -+ properties.store(outputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula)."); // Paper - fix lag; // Akarin - Tacos are disgusting - } catch (Throwable throwable1) { - throwable = throwable1; - throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1a4bc90435d0a56ab7b607c72f28772fb92049bc..888401ee7894957fba6db536cfada80294b929a4 100644 +index a2ab9d5d4a7458be6155acde5131ad0618c53213..4dcc9a5950042b540bac25a73fa27af4fac54741 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1555,7 +1555,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant // Spigot - Spigot > // CraftBukkit - cb > vanilla! -+ return "Akarin"; // Akarin //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! +- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! ++ return "Akarin"; // Akarin // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla! } public CrashReport b(CrashReport crashreport) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7fc5eac2819fa59e4c18255af8ccf7f9be9e601d..ea24aad72466eb95d2255eaced821c3f7088f225 100644 +index 9ea75a4ff35fd0abec7cd7f3321ba219de970fc2..074cf1260c3755e537894f6dd86836fe3fda7f74 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -204,7 +204,7 @@ import javax.annotation.Nullable; // Paper +@@ -205,7 +205,7 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { -- private final String serverName = "Paper"; // Paper -+ private final String serverName = "Akarin"; // Paper // Akarin +- private final String serverName = "Tuinity"; // Paper // Tuinity ++ private final String serverName = "Akarin"; // Paper // Tuinity // Akarin private final String serverVersion; private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/patches/server/0005-Akarin-Metrics.patch b/patches/server/0005-Akarin-Metrics.patch index 24d8a6fe8..b029ac319 100644 --- a/patches/server/0005-Akarin-Metrics.patch +++ b/patches/server/0005-Akarin-Metrics.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Akarin Metrics diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index e257d6b36e0e78dac5b8320017d92776171e1bb0..81f0aef68c97263560839ef4bcb3df9647f5df06 100644 +index 24641501aeae0f2c2c5ce877775c7b971fb051bf..8e2db5d4cd066e2e85d1df54729faacabf73da66 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java -@@ -578,7 +578,7 @@ public class Metrics { +@@ -581,7 +581,7 @@ public class Metrics { boolean logFailedRequests = config.getBoolean("logFailedRequests", false); // Only start Metrics, if it's enabled in the config if (config.getBoolean("enabled", true)) { diff --git a/patches/server/0006-Disable-the-Snooper.patch b/patches/server/0006-Disable-the-Snooper.patch index aace585ba..ccb85ea54 100644 --- a/patches/server/0006-Disable-the-Snooper.patch +++ b/patches/server/0006-Disable-the-Snooper.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable the Snooper diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 888401ee7894957fba6db536cfada80294b929a4..c85be21c29bacb30c879a70660dd6deae430166f 100644 +index 4dcc9a5950042b540bac25a73fa27af4fac54741..8dc535e0606f7261899bd1f43950711508fbb261 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1205,6 +1205,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot this.snooper.a(); } -@@ -1212,6 +1214,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> completablefuture = this.getChunkFutureMainThread(i, j, chunkstatus, flag, true); // Paper - gameprofilerfiller.enter("chunkLoad"); -+ */ -+ // Akarin end + if (!completablefuture.isDone()) { // Paper +@@ -705,12 +705,12 @@ public class ChunkProviderServer extends IChunkProvider { + this.chunkMapDistance.a(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair); + if (isUrgent) this.chunkMapDistance.markUrgent(chunkcoordintpair); // Paper + if (this.a(playerchunk, l)) { +- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); // Akarin - remove caller + +- gameprofilerfiller.enter("chunkLoad"); ++ //gameprofilerfiller.enter("chunkLoad"); // Akarin - remove caller this.tickDistanceManager(); playerchunk = this.getChunk(k); - gameprofilerfiller.exit(); -+ // gameprofilerfiller.exit(); // Akarin - remove caller ++ //gameprofilerfiller.exit(); // Akarin - remove caller if (this.a(playerchunk, l)) { throw (IllegalStateException) SystemUtils.c(new IllegalStateException("No chunk holder after ticket has been added")); } -@@ -693,33 +697,33 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -865,33 +865,33 @@ public class ChunkProviderServer extends IChunkProvider { // CraftBukkit start - modelled on below public void purgeUnload() { - this.world.getMethodProfiler().enter("purge"); -+ // // this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller this.chunkMapDistance.purgeTickets(); this.tickDistanceManager(); - this.world.getMethodProfiler().exitEnter("unload"); -+ // // this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller this.playerChunkMap.unloadChunks(() -> true); - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.clearCache(); } // CraftBukkit end public void tick(BooleanSupplier booleansupplier) { - this.world.getMethodProfiler().enter("purge"); -+ // // this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("purge"); // Akarin - remove caller this.world.timings.doChunkMap.startTiming(); // Spigot this.chunkMapDistance.purgeTickets(); - this.world.getMinecraftServer().midTickLoadChunks(); // Paper + // Tuinity - replace logic this.tickDistanceManager(); this.world.timings.doChunkMap.stopTiming(); // Spigot - this.world.getMethodProfiler().exitEnter("chunks"); -+ // this.world.getMethodProfiler().exitEnter("chunks"); // Akarin - remove caller ++ //this.world.getMethodProfiler().exitEnter("chunks"); // Akarin - remove caller this.world.timings.chunks.startTiming(); // Paper - timings this.tickChunks(); this.world.timings.chunks.stopTiming(); // Paper - timings this.world.timings.doChunkUnload.startTiming(); // Spigot - this.world.getMethodProfiler().exitEnter("unload"); -+ // // this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exitEnter("unload"); // Akarin - remove caller this.playerChunkMap.unloadChunks(booleansupplier); - this.world.getMinecraftServer().midTickLoadChunks(); // Paper + // Tuinity - replace logic this.world.timings.doChunkUnload.stopTiming(); // Spigot - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller this.clearCache(); } -@@ -763,7 +767,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -945,7 +945,7 @@ public class ChunkProviderServer extends IChunkProvider { player.lastEntitySpawnRadiusSquared = (double)((range << 4) * (range << 4)); // used in isOutsideRange } // Paper end - optimize isOutisdeRange - this.world.getMethodProfiler().enter("pollingChunks"); -+ // this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("pollingChunks"); // Akarin - remove caller int k = this.world.getGameRules().getInt(GameRules.RANDOM_TICK_SPEED); BlockPosition blockposition = this.world.getSpawn(); // CraftBukkit start - Other mob type spawn tick rate -@@ -774,7 +778,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -956,7 +956,7 @@ public class ChunkProviderServer extends IChunkProvider { boolean flag2 = spawnAnimalThisTick; // CraftBukkit end - this.world.getMethodProfiler().enter("naturalSpawnCount"); -+ // this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("naturalSpawnCount"); // Akarin - remove caller this.world.timings.countNaturalMobs.startTiming(); // Paper - timings int l = this.chunkMapDistance.b(); EnumCreatureType[] aenumcreaturetype = EnumCreatureType.values(); -@@ -796,7 +800,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -978,7 +978,7 @@ public class ChunkProviderServer extends IChunkProvider { // Paper end this.world.timings.countNaturalMobs.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller // Paper - replaced by above - final int[] chunksTicked = {0}; this.playerChunkMap.forEachVisibleChunk((playerchunk) -> { // Paper - safe iterator incase chunk loads, also no wrapping - Optional optional = ((Either) playerchunk.b().getNow(PlayerChunk.UNLOADED_CHUNK)).left(); -@@ -804,18 +808,18 @@ public class ChunkProviderServer extends IChunkProvider { - if (optional.isPresent()) { - Chunk chunk = (Chunk) optional.get(); + final long time = world.getTime(); // Paper + // Tuinity start - optimise chunk tick iteration +@@ -988,18 +988,18 @@ public class ChunkProviderServer extends IChunkProvider { + if (playerchunk != null) { // make sure load event has been called along with the load logic we put there + // Tuinity end - optimise chunk tick iteration - this.world.getMethodProfiler().enter("broadcast"); -+ // this.world.getMethodProfiler().enter("broadcast"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("broadcast"); // Akarin - remove caller this.world.timings.broadcastChunkUpdates.startTiming(); // Paper - timings playerchunk.a(chunk); this.world.timings.broadcastChunkUpdates.stopTiming(); // Paper - timings - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); if (!this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, false)) { // Paper - optimise isOutsideOfRange @@ -133,25 +131,25 @@ index e2abda1bc37b9be0bae2506f0f26360693f3d30a..d6f4daeec90149ef402c2746a4a054c4 chunk.setInhabitedTime(chunk.getInhabitedTime() + j); if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(playerchunk, chunkcoordintpair, true)) { // Spigot // Paper - optimise isOutsideOfRange - this.world.getMethodProfiler().enter("spawner"); -+ // this.world.getMethodProfiler().enter("spawner"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("spawner"); // Akarin - remove caller this.world.timings.mobSpawn.startTiming(); // Spigot EnumCreatureType[] aenumcreaturetype1 = aenumcreaturetype; int i1 = aenumcreaturetype.length; -@@ -875,7 +879,7 @@ public class ChunkProviderServer extends IChunkProvider { +@@ -1059,7 +1059,7 @@ public class ChunkProviderServer extends IChunkProvider { } this.world.timings.mobSpawn.stopTiming(); // Spigot - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller } this.world.timings.chunkTicks.startTiming(); // Spigot // Paper -@@ -885,15 +889,15 @@ public class ChunkProviderServer extends IChunkProvider { - } +@@ -1085,15 +1085,15 @@ public class ChunkProviderServer extends IChunkProvider { } - }); + } + // Tuinity end - optimise chunk tick iteration - this.world.getMethodProfiler().enter("customSpawners"); -+ // this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("customSpawners"); // Akarin - remove caller if (flag1) { try (co.aikar.timings.Timing ignored = this.world.timings.miscMobSpawning.startTiming()) { // Paper - timings this.chunkGenerator.doMobSpawning(this.world, this.allowMonsters, this.allowAnimals); @@ -160,17 +158,1135 @@ index e2abda1bc37b9be0bae2506f0f26360693f3d30a..d6f4daeec90149ef402c2746a4a054c4 - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().exit(); -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller -+ // // // // // // // this.world.getMethodProfiler().exit(); // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller } - this.playerChunkMap.g(); -@@ -1019,7 +1023,7 @@ public class ChunkProviderServer extends IChunkProvider { + // Tuinity start - controlled flush for entity tracker packets +@@ -1268,7 +1268,7 @@ public class ChunkProviderServer extends IChunkProvider { @Override protected void executeTask(Runnable runnable) { - ChunkProviderServer.this.world.getMethodProfiler().c("runTask"); -+ // ChunkProviderServer.this.world.getMethodProfiler().c("runTask"); // Akarin - remove caller ++ //ChunkProviderServer.this.world.getMethodProfiler().c("runTask"); // Akarin - remove caller super.executeTask(runnable); } + // Tuinity - replace logic +diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java +index 2d512aa4f9ab74dfadff748ba6dd72631eda9fe5..98c8f90a00d27cdb24e2fd972c3e75e4ca134513 100644 +--- a/src/main/java/net/minecraft/server/CommandDispatcher.java ++++ b/src/main/java/net/minecraft/server/CommandDispatcher.java +@@ -168,7 +168,7 @@ public class CommandDispatcher { + stringreader.skip(); + } +- commandlistenerwrapper.getServer().getMethodProfiler().enter(s); ++ //commandlistenerwrapper.getServer().getMethodProfiler().enter(s); // Akarin - remove caller + + byte b0; + +@@ -231,7 +231,7 @@ public class CommandDispatcher { + b0 = 0; + } + } finally { +- commandlistenerwrapper.getServer().getMethodProfiler().exit(); ++ //commandlistenerwrapper.getServer().getMethodProfiler().exit(); // Akarin - remove caller + } + + return b0; +diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java +index ee42e1dfa493c3d7f5af8cc7b8e17e80fcb32b71..ccc9440947fd9e0d01daa92cf03f24c2ed865005 100644 +--- a/src/main/java/net/minecraft/server/CustomFunctionData.java ++++ b/src/main/java/net/minecraft/server/CustomFunctionData.java +@@ -58,10 +58,10 @@ public class CustomFunctionData implements IResourcePackListener { + } + + public void tick() { +- GameProfiler gameprofiler = this.server.getMethodProfiler(); ++ //GameProfiler gameprofiler = this.server.getMethodProfiler(); // Akarin - remove caller + MinecraftKey minecraftkey = CustomFunctionData.d; + +- gameprofiler.a(minecraftkey::toString); ++ //gameprofiler.a(minecraftkey::toString); // Akarin - remove caller + Iterator iterator = this.l.iterator(); + + while (iterator.hasNext()) { +@@ -70,14 +70,14 @@ public class CustomFunctionData implements IResourcePackListener { + this.a(customfunction, this.f()); + } + +- this.server.getMethodProfiler().exit(); ++ //this.server.getMethodProfiler().exit(); // Akarin - remove caller + if (this.m) { + this.m = false; + Collection collection = this.h().b(CustomFunctionData.e).a(); + +- gameprofiler = this.server.getMethodProfiler(); ++ //gameprofiler = this.server.getMethodProfiler(); // Akarin - remove caller + minecraftkey = CustomFunctionData.e; +- gameprofiler.a(minecraftkey::toString); ++ //gameprofiler.a(minecraftkey::toString); // Akarin - remove caller + Iterator iterator1 = collection.iterator(); + + while (iterator1.hasNext()) { +@@ -86,7 +86,7 @@ public class CustomFunctionData implements IResourcePackListener { + this.a(customfunction1, this.f()); + } + +- this.server.getMethodProfiler().exit(); ++ //this.server.getMethodProfiler().exit(); // Akarin - remove caller + } + + } +@@ -121,7 +121,7 @@ public class CustomFunctionData implements IResourcePackListener { + try { + CustomFunctionData.a customfunctiondata_a = (CustomFunctionData.a) this.i.removeFirst(); + +- this.server.getMethodProfiler().a(customfunctiondata_a::toString); ++ //this.server.getMethodProfiler().a(customfunctiondata_a::toString); // Akarin - remove caller + customfunctiondata_a.a(this.i, i); + if (!this.j.isEmpty()) { + List list = Lists.reverse(this.j); +@@ -132,7 +132,7 @@ public class CustomFunctionData implements IResourcePackListener { + this.j.clear(); + } + } finally { +- this.server.getMethodProfiler().exit(); ++ //this.server.getMethodProfiler().exit(); // Akarin - remove caller + } + + ++k; +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 37f8547640d7754eafac8e52f91ba7b04c4babcc..5c9d5682100a627f1e494449bc0cdb884d136494 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -454,7 +454,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // CraftBukkit end + + public void entityBaseTick() { +- this.world.getMethodProfiler().enter("entityBaseTick"); ++ //this.world.getMethodProfiler().enter("entityBaseTick"); // Akarin - remove caller + if (this.isPassenger() && this.getVehicle().dead) { + this.stopRiding(); + } +@@ -507,7 +507,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + + this.justCreated = false; +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + // Paper start +@@ -659,7 +659,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + } + +- this.world.getMethodProfiler().enter("move"); ++ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller + if (this.y.g() > 1.0E-7D) { + vec3d = vec3d.h(this.y); + this.y = Vec3D.a; +@@ -668,7 +668,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // Paper start - ignore movement changes while inactive. + if (isTemporarilyActive && !(this instanceof EntityItem || this instanceof EntityMinecartAbstract) && vec3d == getMot() && enummovetype == EnumMoveType.SELF) { + setMot(Vec3D.a); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + return; + } + // Paper end +@@ -682,8 +682,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.recalcPosition(); + } + +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("rest"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("rest"); // Akarin - remove caller + this.positionChanged = !MathHelper.b(vec3d.x, vec3d1.x) || !MathHelper.b(vec3d.z, vec3d1.z); + this.v = vec3d.y != vec3d1.y; + this.onGround = this.v && vec3d.y < 0.0D; +@@ -805,7 +805,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.fireTicks = -this.getMaxFireTicks(); + } + +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + // Tuinity start - detailed watchdog information + } finally { +@@ -2451,7 +2451,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + + if (this.af) { + if ((true || this.world.getMinecraftServer().getAllowNether()) && !this.isPassenger() && this.ag++ >= i) { // CraftBukkit +- this.world.getMethodProfiler().enter("portal"); ++ //this.world.getMethodProfiler().enter("portal"); // Akarin - remove caller + this.ag = i; + this.portalCooldown = this.ba(); + // CraftBukkit start +@@ -2461,7 +2461,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.a(this.world.worldProvider.getDimensionManager().getType() == DimensionManager.NETHER ? DimensionManager.OVERWORLD : DimensionManager.NETHER); + } + // CraftBukkit end +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + this.af = false; +@@ -2845,7 +2845,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + // Paper end + if (!this.world.isClientSide && !this.dead) { +- this.world.getMethodProfiler().enter("changeDimension"); ++ //this.world.getMethodProfiler().enter("changeDimension"); // Akarin - remove caller + MinecraftServer minecraftserver = this.getMinecraftServer(); + DimensionManager dimensionmanager1 = this.dimension; + WorldServer worldserver = minecraftserver.getWorldServer(dimensionmanager1); +@@ -2858,7 +2858,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + // this.dimension = dimensionmanager; + // this.decouple(); + // CraftBukkit end +- this.world.getMethodProfiler().enter("reposition"); ++ //this.world.getMethodProfiler().enter("reposition"); // Akarin - remove caller + Vec3D vec3d = this.getMot(); + float f = 0.0F; + BlockPosition blockposition = location; // CraftBukkit +@@ -2939,7 +2939,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + this.decouple(); + // CraftBukkit end + +- this.world.getMethodProfiler().exitEnter("reloading"); ++ //this.world.getMethodProfiler().exitEnter("reloading"); // Akarin - remove caller + Entity entity = this.getEntityType().a((World) worldserver1); + + if (entity != null) { +@@ -2958,10 +2958,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + } + + this.dead = true; +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + worldserver.resetEmptyTime(); + worldserver1.resetEmptyTime(); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + return entity; + } else { + return null; +diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java +index 5aca7a9131787415fb2edba1ebec9601e8a56d3a..f01a305083bd755369d1efe6d41832639eb6040d 100644 +--- a/src/main/java/net/minecraft/server/EntityInsentient.java ++++ b/src/main/java/net/minecraft/server/EntityInsentient.java +@@ -223,13 +223,13 @@ public abstract class EntityInsentient extends EntityLiving { + @Override + public void entityBaseTick() { + super.entityBaseTick(); +- this.world.getMethodProfiler().enter("mobBaseTick"); ++ //this.world.getMethodProfiler().enter("mobBaseTick"); // Akarin - remove caller + if (this.isAlive() && this.random.nextInt(1000) < this.e++) { + this.l(); + this.B(); + } + +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + @Override +@@ -523,7 +523,7 @@ public abstract class EntityInsentient extends EntityLiving { + @Override + public void movementTick() { + super.movementTick(); +- this.world.getMethodProfiler().enter("looting"); ++ //this.world.getMethodProfiler().enter("looting"); // Akarin - remove caller + if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { + List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D)); + Iterator iterator = list.iterator(); +@@ -542,7 +542,7 @@ public abstract class EntityInsentient extends EntityLiving { + } + } + +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + protected void a(EntityItem entityitem) { +@@ -676,30 +676,30 @@ public abstract class EntityInsentient extends EntityLiving { + return; + } + // Paper end +- this.world.getMethodProfiler().enter("sensing"); ++ //this.world.getMethodProfiler().enter("sensing"); // Akarin - remove caller + this.bw.a(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("targetSelector"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("targetSelector"); // Akarin - remove caller + this.targetSelector.doTick(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("goalSelector"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("goalSelector"); // Akarin - remove caller + this.goalSelector.doTick(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("navigation"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller + this.navigation.c(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("mob tick"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller + this.mobTick(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("controls"); +- this.world.getMethodProfiler().enter("move"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("controls"); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("move"); // Akarin - remove caller + this.moveController.a(); +- this.world.getMethodProfiler().exitEnter("look"); ++ //this.world.getMethodProfiler().exitEnter("look"); // Akarin - remove caller + this.lookController.a(); +- this.world.getMethodProfiler().exitEnter("jump"); ++ //this.world.getMethodProfiler().exitEnter("jump"); // Akarin - remove caller + this.bq.b(); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + this.K(); + } + +diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java +index a245cfab67835d7978b310d510d029d713460a3b..85c3dc662653c7aa7aba5913864f5f74181d5962 100644 +--- a/src/main/java/net/minecraft/server/EntityLiving.java ++++ b/src/main/java/net/minecraft/server/EntityLiving.java +@@ -242,7 +242,7 @@ public abstract class EntityLiving extends Entity { + } + + super.entityBaseTick(); +- this.world.getMethodProfiler().enter("livingEntityBaseTick"); ++ //this.world.getMethodProfiler().enter("livingEntityBaseTick"); // Akarin - remove caller + boolean flag = this instanceof EntityHuman; + + if (this.isAlive()) { +@@ -344,7 +344,7 @@ public abstract class EntityLiving extends Entity { + this.aL = this.aK; + this.lastYaw = this.yaw; + this.lastPitch = this.pitch; +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + protected void b(BlockPosition blockposition) { +@@ -2425,10 +2425,10 @@ public abstract class EntityLiving extends Entity { + } + + this.aS += (f3 - this.aS) * 0.3F; +- this.world.getMethodProfiler().enter("headTurn"); ++ //this.world.getMethodProfiler().enter("headTurn"); // Akarin - remove caller + f2 = this.f(f1, f2); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("rangeChecks"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("rangeChecks"); // Akarin - remove caller + + while (this.yaw - this.lastYaw < -180.0F) { + this.lastYaw -= 360.0F; +@@ -2462,7 +2462,7 @@ public abstract class EntityLiving extends Entity { + this.aL += 360.0F; + } + +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + this.aT += f2; + if (this.isGliding()) { + ++this.bm; +@@ -2599,19 +2599,19 @@ public abstract class EntityLiving extends Entity { + } + + this.setMot(d4, d5, d6); +- this.world.getMethodProfiler().enter("ai"); ++ //this.world.getMethodProfiler().enter("ai"); // Akarin - remove caller + if (this.isFrozen()) { + this.jumping = false; + this.aZ = 0.0F; + this.bb = 0.0F; + } else if (this.doAITick()) { +- this.world.getMethodProfiler().enter("newAi"); ++ //this.world.getMethodProfiler().enter("newAi"); // Akarin - remove caller + this.doTick(); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("jump"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("jump"); // Akarin - remove caller + if (this.jumping) { + if (this.N > 0.0D && (!this.onGround || this.N > 0.4D)) { + this.c(TagsFluid.WATER); +@@ -2627,23 +2627,23 @@ public abstract class EntityLiving extends Entity { + this.jumpTicks = 0; + } + +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("travel"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("travel"); // Akarin - remove caller + this.aZ *= 0.98F; + this.bb *= 0.98F; + this.n(); + AxisAlignedBB axisalignedbb = this.getBoundingBox(); + + this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb)); +- this.world.getMethodProfiler().exit(); +- this.world.getMethodProfiler().enter("push"); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller ++ //this.world.getMethodProfiler().enter("push"); // Akarin - remove caller + if (this.bn > 0) { + --this.bn; + this.a(axisalignedbb, this.getBoundingBox()); + } + + this.collideNearby(); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + + private void n() { +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index d60f659b368500e3a8c3305f99e60ffc643e2fbd..4be5fa6f1aaff308d71027815c9eb63ea994013f 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -830,7 +830,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + double d3 = 8.0D; + float f2 = f1; + +- worldserver.getMethodProfiler().enter("moving"); ++ //worldserver.getMethodProfiler().enter("moving"); // Akarin - remove caller + if (worldserver1 == null) { } else // CraftBukkit - empty to fall through to null to event + if (dimensionmanager1 == DimensionManager.OVERWORLD && dimensionmanager == DimensionManager.NETHER) { + this.cr = this.getPositionVector(); +@@ -871,8 +871,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + // CraftBukkit end + + // this.setPositionRotation(d0, d1, d2, f1, f); // CraftBukkit - PlayerTeleportEvent handles position changes +- worldserver.getMethodProfiler().exit(); +- worldserver.getMethodProfiler().enter("placing"); ++ //worldserver.getMethodProfiler().exit(); // Akarin - remove caller ++ //worldserver.getMethodProfiler().enter("placing"); // Akarin - remove caller + // Spigot start - SPIGOT-5677, MC-114796: Fix portals generating outside world border + double d4 = Math.max(-2.9999872E7D, worldserver1.getWorldBorder().c() + 16.0D); + double d5 = Math.max(-2.9999872E7D, worldserver1.getWorldBorder().d() + 16.0D); +@@ -945,7 +945,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + // CraftBukkit end + } + +- worldserver.getMethodProfiler().exit(); ++ //worldserver.getMethodProfiler().exit(); // Akarin - remove caller + // CraftBukkit start - PlayerTeleportEvent + PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, cause); + Bukkit.getServer().getPluginManager().callEvent(tpEvent); +diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java +index 1094324d004a1841a3b67cf9de07ec1795524607..82662753b2659a71462dcb26250b11ada0527ad1 100644 +--- a/src/main/java/net/minecraft/server/EntityVillager.java ++++ b/src/main/java/net/minecraft/server/EntityVillager.java +@@ -144,9 +144,9 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation + + @Override + protected void mobTick() { +- this.world.getMethodProfiler().enter("brain"); ++ //this.world.getMethodProfiler().enter("brain"); // Akarin - remove caller + this.getBehaviorController().a((WorldServer) this.world, this); // CraftBukkit - decompile error +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + if (!this.et() && this.bB > 0) { + --this.bB; + if (this.bB <= 0) { +diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java +index 2552f860ff7a25f74e9a0600e58cefe064fac484..00b70d7447e0db11c09f3b751e089ea0b73710fc 100644 +--- a/src/main/java/net/minecraft/server/Explosion.java ++++ b/src/main/java/net/minecraft/server/Explosion.java +@@ -286,7 +286,7 @@ public class Explosion { + if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper + BlockPosition blockposition1 = blockposition.immutableCopy(); + +- this.world.getMethodProfiler().enter("explosion_blocks"); ++ //this.world.getMethodProfiler().enter("explosion_blocks"); // Akarin - remove caller + if (block.a(this) && this.world instanceof WorldServer) { + TileEntity tileentity = block.isTileEntity() ? this.world.getTileEntity(blockposition) : null; + LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.a).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity).setOptional(LootContextParameters.THIS_ENTITY, this.source); +@@ -302,7 +302,7 @@ public class Explosion { + + this.world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 3); + block.wasExploded(this.world, blockposition, this); +- this.world.getMethodProfiler().exit(); ++ //this.world.getMethodProfiler().exit(); // Akarin - remove caller + } + } + +diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java +index 8dc535e0606f7261899bd1f43950711508fbb261..4579823da56addad70205eaaabc2d83b98c43ec4 100644 +--- a/src/main/java/net/minecraft/server/MinecraftServer.java ++++ b/src/main/java/net/minecraft/server/MinecraftServer.java +@@ -962,15 +962,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit // Paper - move down + //MinecraftServer.LOGGER.debug("Autosave started"); // Paper + serverAutoSave = (autosavePeriod > 0 && this.ticks % autosavePeriod == 0); // Paper +- this.methodProfiler.enter("save"); ++ //this.methodProfiler.enter("save"); // Akarin - remove caller + if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // Paper + this.playerList.savePlayers(); + }// Paper +@@ -1267,11 +1267,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot +@@ -1283,7 +1283,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper + TileEntityHopper.skipHopperEvents = worldserver.paperConfig.disableHopperMoveEvents || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper + if (true || worldserver.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD || this.getAllowNether()) { // CraftBukkit +- this.methodProfiler.a(() -> { +- return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager()); +- }); ++ // Akarin - remove caller + /* Drop global time updates + if (this.ticks % 20 == 0) { +- this.methodProfiler.enter("timeSync"); ++ //this.methodProfiler.enter("timeSync"); // Akarin - remove caller + this.playerList.a((Packet) (new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))), worldserver.worldProvider.getDimensionManager()); +- this.methodProfiler.exit(); ++ //this.methodProfiler.exit(); // Akarin - remove caller + } + // CraftBukkit end */ + +- this.methodProfiler.enter("tick"); ++ //this.methodProfiler.enter("tick"); // Akarin - remove caller + + try { + // Tuinity - replace logic +@@ -1401,17 +1399,17 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant iterator = this.d.iterator(); iterator.hasNext();) { + PathfinderGoalWrapped wrappedGoal = iterator.next(); +@@ -97,8 +97,8 @@ public class PathfinderGoalSelector { + } + + }); +- this.e.exit(); +- this.e.enter("goalUpdate"); ++ //this.e.exit(); // Akarin - remove caller ++ //this.e.enter("goalUpdate"); // Akarin - remove caller + // Paper start - remove streams from pathfindergoalselector + goal_update_loop: for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { + PathfinderGoalWrapped wrappedGoal = iterator.next(); +@@ -141,8 +141,8 @@ public class PathfinderGoalSelector { + wrappedGoal.c(); + } + // Paper end - remove streams from pathfindergoalselector +- this.e.exit(); +- this.e.enter("goalTick"); ++ //this.e.exit(); // Akarin - remove caller ++ //this.e.enter("goalTick"); // Akarin - remove caller + // Paper start - remove streams from pathfindergoalselector + for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { + PathfinderGoalWrapped wrappedGoal = iterator.next(); +@@ -151,7 +151,7 @@ public class PathfinderGoalSelector { + } + } + // Paper end - remove streams from pathfindergoalselector +- this.e.exit(); ++ //this.e.exit(); // Akarin - remove caller + } + + public Stream getExecutingGoals() {return c();} // Paper - OBFHELPER +diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java +index 39a8397673f6a56ee3079ef4fa53bf5365bdf140..61b47f1e328ba5974d8106ebad7c950c456670bd 100644 +--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +@@ -848,20 +848,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more + + protected void unloadChunks(BooleanSupplier booleansupplier) { +- GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); // Akarin - remove caller + + try (Timing ignored = this.world.timings.poiUnload.startTiming()) { // Paper +- gameprofilerfiller.enter("poi"); ++ //gameprofilerfiller.enter("poi"); // Akarin - remove caller + this.m.a(booleansupplier); + } // Paper +- gameprofilerfiller.exitEnter("chunk_unload"); ++ //gameprofilerfiller.exitEnter("chunk_unload"); // Akarin - remove caller + if (!this.world.isSavingDisabled()) { + try (Timing ignored = this.world.timings.chunkUnload.startTiming()) { // Paper + this.b(booleansupplier); + }// Paper + } + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } + + private void b(BooleanSupplier booleansupplier) { +@@ -1076,7 +1076,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + // Paper start - Async chunk io + final java.util.function.BiFunction> syncLoadComplete = (chunkHolder, ioThrowable) -> { + try (Timing ignored = this.world.timings.chunkLoad.startTimingIfSync()) { // Paper +- this.world.getMethodProfiler().c("chunkLoad"); ++ //this.world.getMethodProfiler().c("chunkLoad"); // Akarin - remove caller + if (ioThrowable != null) { + com.destroystokyo.paper.io.IOUtil.rethrow(ioThrowable); + } +@@ -1414,7 +1414,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + } + } + +- this.world.getMethodProfiler().c("chunkSave"); ++ //this.world.getMethodProfiler().c("chunkSave"); // Akarin - remove caller + } // Paper + try (co.aikar.timings.Timing ignored1 = this.world.timings.chunkSaveDataSerialization.startTiming()) { // Paper + nbttagcompound = ChunkRegionLoader.saveChunk(this.world, ichunkaccess); +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index ecf7a8c6d9c2dba0c2463e6d4f3183756921263d..7fda15e427b15c8eb750c7bcb1506708152acfaa 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -195,7 +195,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + this.E = 0; + }} // Paper - end if (valid) + +- this.minecraftServer.getMethodProfiler().enter("keepAlive"); ++ //this.minecraftServer.getMethodProfiler().enter("keepAlive"); // Akarin - remove caller + // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings + // This should effectively place the keepalive handling back to "as it was" before 1.12.2 + long currentTime = SystemUtils.getMonotonicMillis(); +@@ -217,7 +217,7 @@ public class PlayerConnection implements PacketListenerPlayIn { + } + // Paper end + +- this.minecraftServer.getMethodProfiler().exit(); ++ //this.minecraftServer.getMethodProfiler().exit(); // Akarin - remove caller + // CraftBukkit start + for (int spam; (spam = this.chatThrottle) > 0 && !chatSpamField.compareAndSet(this, spam, spam - 1); ) ; + if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable +diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java +index 3f1aa5ced697490b5481ba992cf5af5dc98b8166..af705e6c650b529c18bdd8f0c063a71c750783f6 100644 +--- a/src/main/java/net/minecraft/server/TickListServer.java ++++ b/src/main/java/net/minecraft/server/TickListServer.java +@@ -65,7 +65,7 @@ public class TickListServer implements TickList { + ChunkProviderServer chunkproviderserver = this.f.getChunkProvider(); + Iterator> iterator = this.nextTickList.iterator(); + +- this.f.getMethodProfiler().enter("cleaning"); ++ //this.f.getMethodProfiler().enter("cleaning"); // Akarin - remove caller + + this.timingCleanup.startTiming(); // Paper + NextTickListEntry nextticklistentry; +@@ -86,7 +86,7 @@ public class TickListServer implements TickList { + this.timingCleanup.stopTiming(); // Paper + + this.timingTicking.startTiming(); // Paper +- this.f.getMethodProfiler().exitEnter("ticking"); ++ //this.f.getMethodProfiler().exitEnter("ticking"); // Akarin - remove caller + + while ((nextticklistentry = (NextTickListEntry) this.g.poll()) != null) { + if (chunkproviderserver.a(nextticklistentry.a)) { +@@ -105,7 +105,7 @@ public class TickListServer implements TickList { + } + } + +- this.f.getMethodProfiler().exit(); ++ //this.f.getMethodProfiler().exit(); // Akarin - remove caller + this.timingTicking.stopTiming(); // Paper + this.h.clear(); + this.g.clear(); +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index aa69af321e708d321a00fa6cc4ccdc17eb52b3be..88d6a4f7f42aeacdad9621d883bda66627a87066 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -392,9 +392,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + IBlockData iblockdata2 = this.getType(blockposition); + + if (iblockdata2 != iblockdata1 && (iblockdata2.b((IBlockAccess) this, blockposition) != iblockdata1.b((IBlockAccess) this, blockposition) || iblockdata2.h() != iblockdata1.h() || iblockdata2.g() || iblockdata1.g())) { +- this.methodProfiler.enter("queueCheckLight"); ++ //this.methodProfiler.enter("queueCheckLight"); // Akarin - remove caller + this.getChunkProvider().getLightEngine().a(blockposition); +- this.methodProfiler.exit(); ++ //this.methodProfiler.exit(); // Akarin - remove caller + } + + /* +@@ -762,9 +762,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + + public void tickBlockEntities() { +- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller + +- gameprofilerfiller.enter("blockEntities"); ++ //gameprofilerfiller.enter("blockEntities"); // Akarin - remove caller + timings.tileEntityTick.startTiming(); // Spigot + if (!this.tileEntityListUnload.isEmpty()) { + // Paper start - Use alternate implementation with faster contains +@@ -797,9 +797,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + if (this.chunkProvider.a(blockposition) && this.getWorldBorder().a(blockposition)) { + try { +- gameprofilerfiller.a(() -> { +- return String.valueOf(TileEntityTypes.a(tileentity.getTileType())); +- }); ++ // Akarin - remove caller + tileentity.tickTimer.startTiming(); // Spigot + if (tileentity.getTileType().isValidBlock(this.getType(blockposition).getBlock())) { + ((ITickable) tileentity).tick(); +@@ -807,7 +805,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + tileentity.v(); + } + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } catch (Throwable throwable) { + if (throwable instanceof ThreadDeath) throw throwable; // Paper + // Paper start - Prevent tile entity and entity crashes +@@ -844,7 +842,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + timings.tileEntityTick.stopTiming(); // Spigot + timings.tileEntityPending.startTiming(); // Spigot + this.tickingTileEntities = false; +- gameprofilerfiller.exitEnter("pendingBlockEntities"); ++ //gameprofilerfiller.exitEnter("pendingBlockEntities"); // Akarin - remove caller + if (!this.tileEntityListPending.isEmpty()) { + for (int i = 0; i < this.tileEntityListPending.size(); ++i) { + TileEntity tileentity1 = (TileEntity) this.tileEntityListPending.get(i); +@@ -877,7 +875,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + timings.tileEntityPending.stopTiming(); // Spigot + co.aikar.timings.TimingHistory.tileEntityTicks += this.tileEntityListTick.size(); // Paper +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + spigotConfig.currentPrimedTnt = 0; // Spigot + } + +@@ -1234,7 +1232,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + public List getEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, @Nullable Predicate predicate, List list) { + // Tuinity end - add list parameter +- this.getMethodProfiler().c("getEntities"); ++ //this.getMethodProfiler().c("getEntities"); // Akarin - remove caller + 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); +@@ -1254,7 +1252,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + } + + public List a(@Nullable EntityTypes entitytypes, AxisAlignedBB axisalignedbb, Predicate predicate) { +- this.getMethodProfiler().c("getEntities"); ++ //this.getMethodProfiler().c("getEntities"); // Akarin - remove caller + int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D); + int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D); + int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D); +@@ -1276,7 +1274,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + public List getEntities(Class oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate predicate) { return a(oclass, axisalignedbb, predicate); } // Paper - OBFHELPER + @Override public List a(Class oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate predicate) { +- this.getMethodProfiler().c("getEntities"); ++ //this.getMethodProfiler().c("getEntities"); // Akarin - remove caller + int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D); + int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D); + int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D); +@@ -1299,7 +1297,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { + + @Override + public List b(Class oclass, AxisAlignedBB axisalignedbb, @Nullable Predicate predicate) { +- this.getMethodProfiler().c("getLoadedEntities"); ++ //this.getMethodProfiler().c("getLoadedEntities"); // Akarin - remove caller + int i = MathHelper.floor((axisalignedbb.minX - 2.0D) / 16.0D); + int j = MathHelper.f((axisalignedbb.maxX + 2.0D) / 16.0D); + int k = MathHelper.floor((axisalignedbb.minZ - 2.0D) / 16.0D); +diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java +index 30adf52951575e24bbd868e1c896b942639196b7..32365c4fbda6fb2cabeee7bca4f00ea7b5a5f2d9 100644 +--- a/src/main/java/net/minecraft/server/WorldServer.java ++++ b/src/main/java/net/minecraft/server/WorldServer.java +@@ -729,12 +729,12 @@ public class WorldServer extends World { + } + + public void doTick(BooleanSupplier booleansupplier) { +- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller + + this.ticking = true; +- gameprofilerfiller.enter("world border"); ++ //gameprofilerfiller.enter("world border"); // Akarin - remove caller + this.getWorldBorder().s(); +- gameprofilerfiller.exitEnter("weather"); ++ //gameprofilerfiller.exitEnter("weather"); // Akarin - remove caller + boolean flag = this.isRaining(); + int i; + +@@ -873,11 +873,11 @@ public class WorldServer extends World { + + this.N(); + this.a(); +- gameprofilerfiller.exitEnter("chunkSource"); ++ //gameprofilerfiller.exitEnter("chunkSource"); // Akarin - remove caller + this.timings.chunkProviderTick.startTiming(); // Paper - timings + this.getChunkProvider().tick(booleansupplier); + this.timings.chunkProviderTick.stopTiming(); // Paper - timings +- gameprofilerfiller.exitEnter("tickPending"); ++ //gameprofilerfiller.exitEnter("tickPending"); // Akarin - remove caller + timings.scheduledBlocks.startTiming(); // Spigot + if (this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES) { + this.nextTickListBlock.b(); +@@ -886,7 +886,7 @@ public class WorldServer extends World { + timings.scheduledBlocks.stopTiming(); // Spigot + + // Tuinity - replace logic +- gameprofilerfiller.exitEnter("raid"); ++ //gameprofilerfiller.exitEnter("raid"); // Akarin - remove caller + this.timings.raids.startTiming(); // Paper - timings + this.persistentRaid.a(); + if (this.mobSpawnerTrader != null) { +@@ -894,13 +894,13 @@ public class WorldServer extends World { + } + this.timings.raids.stopTiming(); // Paper - timings + +- gameprofilerfiller.exitEnter("blockEvents"); ++ //gameprofilerfiller.exitEnter("blockEvents"); // Akarin - remove caller + timings.doSounds.startTiming(); // Spigot + this.ad(); + timings.doSounds.stopTiming(); // Spigot + // Tuinity - replace logic + this.ticking = false; +- gameprofilerfiller.exitEnter("entities"); ++ //gameprofilerfiller.exitEnter("entities"); // Akarin - remove caller + boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players + + if (flag3) { +@@ -910,7 +910,7 @@ public class WorldServer extends World { + if (flag3 || this.emptyTime++ < 300) { + timings.tickEntities.startTiming(); // Spigot + this.worldProvider.j(); +- gameprofilerfiller.enter("global"); ++ //gameprofilerfiller.enter("global"); // Akarin - remove caller + + Entity entity; + +@@ -930,7 +930,7 @@ public class WorldServer extends World { + } + } + +- gameprofilerfiller.exitEnter("regular"); ++ //gameprofilerfiller.exitEnter("regular"); // Akarin - remove caller + this.tickingEntities = true; + ObjectIterator objectiterator = this.entitiesById.int2ObjectEntrySet().iterator(); + +@@ -952,12 +952,12 @@ public class WorldServer extends World { + } + // CraftBukkit end */ + +- gameprofilerfiller.enter("checkDespawn"); ++ //gameprofilerfiller.enter("checkDespawn"); // Akarin - remove caller + if (!entity1.dead) { + entity1.checkDespawn(); + } + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + if (entity2 != null) { + if (!entity2.dead && entity2.w(entity1)) { + continue; +@@ -966,20 +966,20 @@ public class WorldServer extends World { + entity1.stopRiding(); + } + +- gameprofilerfiller.enter("tick"); ++ //gameprofilerfiller.enter("tick"); // Akarin - remove caller + if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) { + this.a(this::entityJoinedWorld, entity1); + } + +- gameprofilerfiller.exit(); +- gameprofilerfiller.enter("remove"); ++ //gameprofilerfiller.exit(); // Akarin - remove caller ++ //gameprofilerfiller.enter("remove"); // Akarin - remove caller + if (entity1.dead) { + this.removeEntityFromChunk(entity1); + objectiterator.remove(); + this.unregisterEntity(entity1); + } + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } + timings.entityTick.stopTiming(); // Spigot + +@@ -1003,13 +1003,13 @@ public class WorldServer extends World { + } + } // Paper - timings + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + timings.tickEntities.stopTiming(); // Spigot + // Tuinity - replace logic + this.tickBlockEntities(); + } + +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } + + private void wakeupPlayers() { +@@ -1028,9 +1028,9 @@ public class WorldServer extends World { + boolean flag = this.isRaining(); + int j = chunkcoordintpair.d(); + int k = chunkcoordintpair.e(); +- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller + +- gameprofilerfiller.enter("thunder"); ++ //gameprofilerfiller.enter("thunder"); // Akarin - remove caller + 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.U() && this.randomTickRandom.nextInt(100000) == 0) { // Paper - Disable thunder // Paper - optimise random ticking +@@ -1052,7 +1052,7 @@ public class WorldServer extends World { + } + } + +- gameprofilerfiller.exitEnter("iceandsnow"); ++ //gameprofilerfiller.exitEnter("iceandsnow"); // Akarin - remove caller + if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking + // Paper start - optimise chunk ticking + this.getRandomBlockPosition(j, 0, k, 15, blockposition); +@@ -1083,9 +1083,9 @@ public class WorldServer extends World { + } + + // Paper start - optimise random block ticking +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + if (i > 0) { +- gameprofilerfiller.enter("randomTick"); ++ //gameprofilerfiller.enter("randomTick"); // Akarin - remove caller + timings.chunkTicksBlocks.startTiming(); // Paper + + ChunkSection[] sections = chunk.getSections(); +@@ -1122,7 +1122,7 @@ public class WorldServer extends World { + // TODO CHECK ON UPDATE + } + } +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + timings.chunkTicksBlocks.stopTiming(); // Paper + // Paper end + } +@@ -1256,15 +1256,13 @@ public class WorldServer extends World { + entity.lastPitch = entity.pitch; + if (entity.inChunk) { + ++entity.ticksLived; +- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller + +- gameprofilerfiller.a(() -> { +- return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString(); +- }); +- gameprofilerfiller.c("tickNonPassenger"); ++ // Akarin - remove caller ++ //gameprofilerfiller.c("tickNonPassenger"); // Akarin - remove caller + entity.tick(); + entity.postTick(); // CraftBukkit +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } + + this.chunkCheck(entity); +@@ -1297,14 +1295,12 @@ public class WorldServer extends World { + entity1.lastPitch = entity1.pitch; + if (entity1.inChunk) { + ++entity1.ticksLived; +- GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); ++ //GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); // Akarin - remove caller + +- gameprofilerfiller.a(() -> { +- return IRegistry.ENTITY_TYPE.getKey(entity1.getEntityType()).toString(); +- }); +- gameprofilerfiller.c("tickPassenger"); ++ // Akarin - remove caller ++ //gameprofilerfiller.c("tickPassenger"); // Akarin - remove caller + entity1.passengerTick(); +- gameprofilerfiller.exit(); ++ //gameprofilerfiller.exit(); // Akarin - remove caller + } + + this.chunkCheck(entity1); +@@ -1325,7 +1321,7 @@ public class WorldServer extends World { + } + + public void chunkCheck(Entity entity) { +- this.getMethodProfiler().enter("chunkCheck"); ++ //this.getMethodProfiler().enter("chunkCheck"); // Akarin - remove caller + int i = MathHelper.floor(entity.locX() / 16.0D); + int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY() / 16.0D))); // Paper - stay consistent with chunk add/remove behavior; + int k = MathHelper.floor(entity.locZ() / 16.0D); +@@ -1345,7 +1341,7 @@ public class WorldServer extends World { + } + } + +- this.getMethodProfiler().exit(); ++ //this.getMethodProfiler().exit(); // Akarin - remove caller + } + + @Override diff --git a/patches/server/0012-Asynchronous-pathfinding.patch b/patches/server/0012-Asynchronous-pathfinding.patch index 5d12f21dc..66f094522 100644 --- a/patches/server/0012-Asynchronous-pathfinding.patch +++ b/patches/server/0012-Asynchronous-pathfinding.patch @@ -6,17 +6,17 @@ Subject: [PATCH] Asynchronous pathfinding diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 5aca7a9131787415fb2edba1ebec9601e8a56d3a..7a0f18a8f7d7cdeca9a45485f5b22353e726aae8 100644 +index f01a305083bd755369d1efe6d41832639eb6040d..2afa9d7385c2b74dada9636dcc79beb8f7f54a64 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -686,7 +686,7 @@ public abstract class EntityInsentient extends EntityLiving { this.goalSelector.doTick(); - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("navigation"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("navigation"); // Akarin - remove caller - this.navigation.c(); + this.navigation.tickAsync(); // Akarin - Async pathfinder - this.world.getMethodProfiler().exit(); - this.world.getMethodProfiler().enter("mob tick"); + //this.world.getMethodProfiler().exit(); // Akarin - remove caller + //this.world.getMethodProfiler().enter("mob tick"); // Akarin - remove caller this.mobTick(); diff --git a/src/main/java/net/minecraft/server/Navigation.java b/src/main/java/net/minecraft/server/Navigation.java index abf450917e605972d84cb603b966feb013ae0002..4f7f40d5e7050d9b2da29c6e6efe7c5bef560d55 100644 @@ -32,7 +32,7 @@ index abf450917e605972d84cb603b966feb013ae0002..4f7f40d5e7050d9b2da29c6e6efe7c5b if (pathtype == PathType.WATER) { return false; diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java -index dc32107ec320fa54487f24c9d68ff8e5a6dea1bb..f7ea00d6ffa2000c4d0d74b5856ba66bba165d5a 100644 +index b763d7f37eb7c9ff1326ef27c478454f3dd574d4..7f061ec1d809337c697794f2f08a06f1ebcaa39f 100644 --- a/src/main/java/net/minecraft/server/NavigationAbstract.java +++ b/src/main/java/net/minecraft/server/NavigationAbstract.java @@ -29,6 +29,15 @@ public abstract class NavigationAbstract { @@ -221,7 +221,7 @@ index dc32107ec320fa54487f24c9d68ff8e5a6dea1bb..f7ea00d6ffa2000c4d0d74b5856ba66b public boolean n() { return !this.m(); diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index 67c63cfe333e328cbd00ada970bd81efebfe30b6..848e2fe8b84bfec5be332fd051512eda3838c108 100644 +index 71b96943d865105f279dda613b7ac6b3ffed793b..5313f00d33349d5aa712f2da02033a247415d7bd 100644 --- a/src/main/java/net/minecraft/server/Pathfinder.java +++ b/src/main/java/net/minecraft/server/Pathfinder.java @@ -27,7 +27,7 @@ public class Pathfinder { diff --git a/patches/server/0013-Swaps-the-predicate-order-of-collision.patch b/patches/server/0013-Swaps-the-predicate-order-of-collision.patch index 5de02774a..c7cf3c524 100644 --- a/patches/server/0013-Swaps-the-predicate-order-of-collision.patch +++ b/patches/server/0013-Swaps-the-predicate-order-of-collision.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Swaps the predicate order of collision diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8820e4b6506f645b98d23fe6eab044cc6cd54427..d4601ff5e7bdf871738f6f63cc4d4f239924cdc6 100644 +index 5c9d5682100a627f1e494449bc0cdb884d136494..f5b8ada739afc9f8c0246e98947fe188b1231438 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1452,8 +1452,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1641,8 +1641,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public void pickup(EntityHuman entityhuman) {} public void collide(Entity entity) { diff --git a/patches/server/0015-Optimize-door-interact-with-pathfinding.patch b/patches/server/0014-Optimize-door-interact-with-pathfinding.patch similarity index 100% rename from patches/server/0015-Optimize-door-interact-with-pathfinding.patch rename to patches/server/0014-Optimize-door-interact-with-pathfinding.patch diff --git a/patches/server/0014-Tuinity-Use-ArrayDeque-for-pendingChunkUpdates-in-Ch.patch b/patches/server/0014-Tuinity-Use-ArrayDeque-for-pendingChunkUpdates-in-Ch.patch deleted file mode 100644 index ff913878c..000000000 --- a/patches/server/0014-Tuinity-Use-ArrayDeque-for-pendingChunkUpdates-in-Ch.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sotr -Date: Wed, 15 Apr 2020 02:39:12 +0700 -Subject: [PATCH] Tuinity Use ArrayDeque for pendingChunkUpdates in - ChunkMapDistance - - -diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 942efe62fe5cefd6373ea568c7a62c524d536771..014a4142427cc6adfec2ed13d95aebcede1f1e96 100644 ---- a/src/main/java/net/minecraft/server/ChunkMapDistance.java -+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -33,7 +33,7 @@ public abstract class ChunkMapDistance { - private final ChunkMapDistance.a e = new ChunkMapDistance.a(); - public static final int MOB_SPAWN_RANGE = 8; //private final ChunkMapDistance.b f = new ChunkMapDistance.b(8); // Paper - no longer used - private final ChunkMapDistance.c g = new ChunkMapDistance.c(33); -- private final java.util.Queue pendingChunkUpdates = new java.util.LinkedList<>(); // PAIL pendingChunkUpdates // Paper - use a queue -+ private final java.util.Queue pendingChunkUpdates = new java.util.ArrayDeque<>(); // PAIL pendingChunkUpdates // Paper - use a queue // Akarin - backport Tuinity - use a better queue - private final ChunkTaskQueueSorter i; - private final Mailbox> j; - private final Mailbox k; diff --git a/patches/server/0016-Remove-stream-for-ender-teleport.patch b/patches/server/0015-Remove-stream-for-ender-teleport.patch similarity index 86% rename from patches/server/0016-Remove-stream-for-ender-teleport.patch rename to patches/server/0015-Remove-stream-for-ender-teleport.patch index 2ea029771..d85d6eb7e 100644 --- a/patches/server/0016-Remove-stream-for-ender-teleport.patch +++ b/patches/server/0015-Remove-stream-for-ender-teleport.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stream for ender teleport diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d4601ff5e7bdf871738f6f63cc4d4f239924cdc6..65cf51852b98eb4f2ed7bc4d753b9ae4a0d46c75 100644 +index f5b8ada739afc9f8c0246e98947fe188b1231438..33b456d4348c503cc94557d623c537a8aed8f9ec 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2902,7 +2902,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3092,7 +3092,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke WorldServer worldserver = (WorldServer) this.world; this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch); @@ -17,7 +17,7 @@ index d4601ff5e7bdf871738f6f63cc4d4f239924cdc6..65cf51852b98eb4f2ed7bc4d753b9ae4 worldserver.chunkCheck(entity); entity.aF = true; entity.a(Entity::teleportAndSync); -@@ -3151,6 +3151,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -3342,6 +3342,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke public Stream cg() { return Stream.concat(Stream.of(this), this.passengers.stream().flatMap(Entity::cg)); } diff --git a/patches/server/0017-Cache-hashcode-for-BlockPosition.patch b/patches/server/0016-Cache-hashcode-for-BlockPosition.patch similarity index 79% rename from patches/server/0017-Cache-hashcode-for-BlockPosition.patch rename to patches/server/0016-Cache-hashcode-for-BlockPosition.patch index 20ed0e5fb..8360b1184 100644 --- a/patches/server/0017-Cache-hashcode-for-BlockPosition.patch +++ b/patches/server/0016-Cache-hashcode-for-BlockPosition.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache hashcode for BlockPosition diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java -index c439a8d0191c8667c881b2111b8c640ca13e5e7c..cc18560431d65f13f28b45025a702afe13c86cdd 100644 +index 8f47b6c9e70d10c444ab328dc3bf3a46499b14d5..a03f3b43d99da10c2228c58daea27925821b4168 100644 --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java -@@ -18,6 +18,7 @@ public class BaseBlockPosition implements Comparable { +@@ -19,6 +19,7 @@ public class BaseBlockPosition implements Comparable { return y < 0 || y >= 256; } // Paper end @@ -16,22 +16,22 @@ index c439a8d0191c8667c881b2111b8c640ca13e5e7c..cc18560431d65f13f28b45025a702afe public BaseBlockPosition(int i, int j, int k) { this.x = i; -@@ -42,8 +43,20 @@ public class BaseBlockPosition implements Comparable { +@@ -43,8 +44,20 @@ public class BaseBlockPosition implements Comparable { } - public int hashCode() { -- return (this.getY() + this.getZ() * 31) * 31 + this.getX(); + public final int hashCode() { // Paper +- return (this.y + this.z * 31) * 31 + this.x; // Paper + // Akarin start - cache hashcode + int result = hash; // Make the situation not too bad when it is modified by multiple threads + if (result == 0) { -+ result = (this.getY() + this.getZ() * 31) * 31 + this.getX(); ++ result = (this.y + this.z * 31) * 31 + this.x; // Paper + hash = result; + } + return result; + // return (this.getY() + this.getZ() * 31) * 31 + this.getX(); + } + -+ public void recalcHashCode() { ++ public final void recalcHashCode() { + hash = 0; } + // Akarin end @@ -39,10 +39,10 @@ index c439a8d0191c8667c881b2111b8c640ca13e5e7c..cc18560431d65f13f28b45025a702afe public int compareTo(BaseBlockPosition baseblockposition) { return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY(); diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java -index 07813c55cdc85e08697d4126973f829ae564cf41..52b810da6af78a8df0f960d8d871fb0c22eccc4c 100644 +index 3bf17ccdaef21322b787db538d569e0bc614ef22..349cd6b2b11f1ff28cfa5504cd14fe23583d4b56 100644 --- a/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java -@@ -440,6 +440,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -441,6 +441,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali this.y = j; this.z = k; // Paper end @@ -50,7 +50,7 @@ index 07813c55cdc85e08697d4126973f829ae564cf41..52b810da6af78a8df0f960d8d871fb0c return this; } -@@ -480,16 +481,19 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali +@@ -481,16 +482,19 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali public final void setX(final int x) { this.o(x); } // Paper - OBFHELPER public void o(int i) { this.x = i; // Paper change to x diff --git a/patches/server/0019-Remove-a-few-more-streams.patch b/patches/server/0017-Remove-a-few-more-streams.patch similarity index 93% rename from patches/server/0019-Remove-a-few-more-streams.patch rename to patches/server/0017-Remove-a-few-more-streams.patch index 22bfdcc9d..731756bd4 100644 --- a/patches/server/0019-Remove-a-few-more-streams.patch +++ b/patches/server/0017-Remove-a-few-more-streams.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove a few more streams diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java -index 014a4142427cc6adfec2ed13d95aebcede1f1e96..c278906d795ab2c2c233dc23eb331328c089fef4 100644 +index d1c2f2bbfc05137727db49b41ace1cb9e25b9b62..5b63792d0e27c8801de3ca1658baf736f61473f7 100644 --- a/src/main/java/net/minecraft/server/ChunkMapDistance.java +++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java -@@ -110,9 +110,15 @@ public abstract class ChunkMapDistance { +@@ -188,9 +188,15 @@ public abstract class ChunkMapDistance { while (longiterator.hasNext()) { long j = longiterator.nextLong(); @@ -24,7 +24,7 @@ index 014a4142427cc6adfec2ed13d95aebcede1f1e96..c278906d795ab2c2c233dc23eb331328 PlayerChunk playerchunk = playerchunkmap.getUpdatingChunk(j); if (playerchunk == null) { -@@ -128,6 +134,22 @@ public abstract class ChunkMapDistance { +@@ -206,6 +212,22 @@ public abstract class ChunkMapDistance { }); }); } @@ -76,7 +76,7 @@ index 9c31edade247baac6811ef3ec98e88a332bcffba..eb3f45d8b707002ebeca20a6857ed414 } // Paper end diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java -index 1094324d004a1841a3b67cf9de07ec1795524607..1e7be8cbac5b35cd05bf45fc3b19c7f6736c649f 100644 +index 82662753b2659a71462dcb26250b11ada0527ad1..97448cb46df42ec4bcfea28c36a3050e8ff96a83 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java +++ b/src/main/java/net/minecraft/server/EntityVillager.java @@ -548,11 +548,20 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation diff --git a/patches/server/0018-Remove-stream-and-simplify-operation-in-pathfinder.patch b/patches/server/0018-Remove-stream-and-simplify-operation-in-pathfinder.patch deleted file mode 100644 index 9c4639182..000000000 --- a/patches/server/0018-Remove-stream-and-simplify-operation-in-pathfinder.patch +++ /dev/null @@ -1,151 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Sotr -Date: Wed, 15 Apr 2020 17:49:07 +0700 -Subject: [PATCH] Remove stream and simplify operation in pathfinder - - -diff --git a/src/main/java/net/minecraft/server/PathDestination.java b/src/main/java/net/minecraft/server/PathDestination.java -index 9071d43d8b85a64a11566b2b535c3f6db65028f8..2f33aafe34d9cfd664abf006f8dbdf5cb981b692 100644 ---- a/src/main/java/net/minecraft/server/PathDestination.java -+++ b/src/main/java/net/minecraft/server/PathDestination.java -@@ -5,6 +5,7 @@ public class PathDestination extends PathPoint { - private float m = Float.MAX_VALUE; - private PathPoint n; - private boolean o; -+ protected BlockPosition position; // Akarin - add BlockPosition - - public PathDestination(PathPoint pathpoint) { - super(pathpoint.a, pathpoint.b, pathpoint.c); -diff --git a/src/main/java/net/minecraft/server/Pathfinder.java b/src/main/java/net/minecraft/server/Pathfinder.java -index 848e2fe8b84bfec5be332fd051512eda3838c108..379ee96b0801faaffc83c9f1b7473bc4b493bb6f 100644 ---- a/src/main/java/net/minecraft/server/Pathfinder.java -+++ b/src/main/java/net/minecraft/server/Pathfinder.java -@@ -2,7 +2,9 @@ package net.minecraft.server; - - import com.google.common.collect.Lists; - import com.google.common.collect.Sets; -+import java.util.Collections; - import java.util.Comparator; -+import java.util.HashSet; - import java.util.Iterator; - import java.util.List; - import java.util.Map; -@@ -31,9 +33,20 @@ public class Pathfinder { - this.a.a(); - this.e.a(chunkcache, entityinsentient); - PathPoint pathpoint = this.e.b(); -+ // Akarin start - remove stream, add BlockPosition -+ /* - Map map = (Map) set.stream().collect(Collectors.toMap((blockposition) -> { -- return this.e.a((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()); -+ return this.e.a((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()); - }, Function.identity())); -+ */ -+ List map = new java.util.ArrayList(set.size()); -+ for (BlockPosition position : set) { -+ PathDestination dest = this.e.a((double) position.getX(), position.getY(), position.getZ()); -+ dest.position = position; -+ -+ map.add(dest); -+ } -+ // Akarin end - PathEntity pathentity = this.a(pathpoint, map, f, i, f1); - - this.e.a(); -@@ -41,8 +54,8 @@ public class Pathfinder { - } - - @Nullable -- private PathEntity a(PathPoint pathpoint, Map map, float f, int i, float f1) { -- Set set = map.keySet(); -+ private PathEntity a(PathPoint pathpoint, List map, float f, int i, float f1) { // Akarin - Map -> List -+ List set = map; // Akarin - Map -> List - - pathpoint.e = 0.0F; - pathpoint.f = this.a(pathpoint, set); -@@ -53,6 +66,7 @@ public class Pathfinder { - int j = 0; - int k = (int) ((float) this.d * f1); - -+ List destinations = new java.util.ArrayList(); // Akarin - remove stream - while (!this.a.e()) { - ++j; - if (j >= k) { -@@ -62,12 +76,26 @@ public class Pathfinder { - PathPoint pathpoint1 = this.a.c(); - - pathpoint1.i = true; -+ // Akarin start - remove stream -+ /* - set.stream().filter((pathdestination) -> { - return pathpoint1.c((PathPoint) pathdestination) <= (float) i; - }).forEach(PathDestination::e); - if (set.stream().anyMatch(PathDestination::f)) { - break; - } -+ */ -+ for (PathDestination dest : set) { -+ if (pathpoint1.c((PathPoint) dest) <= (float) i) -+ dest.e(); -+ -+ if (dest.f()) -+ destinations.add(createPathEntityBy(dest.d(), dest.position, true)); // copied from below -+ } -+ -+ if (!destinations.isEmpty()) -+ break; -+ // Akarin end - - if (pathpoint1.a(pathpoint) < f) { - int l = this.e.a(this.c, pathpoint1); -@@ -94,15 +122,17 @@ public class Pathfinder { - } - } - -+ // Akarin start - remove stream -+ /* - Stream stream; - - if (set.stream().anyMatch(PathDestination::f)) { - stream = set.stream().filter(PathDestination::f).map((pathdestination) -> { -- return this.a(pathdestination.d(), (BlockPosition) map.get(pathdestination), true); -+ return this.a(pathdestination.d(), (BlockPosition) pathdestination.position, true); - }).sorted(Comparator.comparingInt(PathEntity::e)); - } else { - stream = set.stream().map((pathdestination) -> { -- return this.a(pathdestination.d(), (BlockPosition) map.get(pathdestination), false); -+ return this.a(pathdestination.d(), (BlockPosition) pathdestination.position, false); - }).sorted(Comparator.comparingDouble(PathEntity::l).thenComparingInt(PathEntity::e)); - } - -@@ -115,9 +145,21 @@ public class Pathfinder { - - return pathentity; - } -+ */ -+ if (!destinations.isEmpty()) { -+ Collections.sort(destinations, Comparator.comparingInt(PathEntity::e)); -+ } else { -+ for (PathDestination dest : set) -+ destinations.add(createPathEntityBy(dest.d(), dest.position, false)); -+ -+ Collections.sort(destinations, Comparator.comparingDouble(PathEntity::l).thenComparingInt(PathEntity::e)); -+ } -+ -+ return destinations.get(0); -+ // Akarin end - } - -- private float a(PathPoint pathpoint, Set set) { -+ private float a(PathPoint pathpoint, List set) { // Akarin - Set -> List - float f = Float.MAX_VALUE; - - float f1; -@@ -132,6 +174,7 @@ public class Pathfinder { - return f; - } - -+ private PathEntity createPathEntityBy(PathPoint pathpoint, BlockPosition blockposition, boolean flag) { return this.a(pathpoint, blockposition, flag); } // Akarin - OBFHELPER - private PathEntity a(PathPoint pathpoint, BlockPosition blockposition, boolean flag) { - List list = Lists.newArrayList(); - PathPoint pathpoint1 = pathpoint; diff --git a/patches/server/0020-Tuinity-Change-writes-to-use-NORMAL-priority-rather-.patch b/patches/server/0020-Tuinity-Change-writes-to-use-NORMAL-priority-rather-.patch deleted file mode 100644 index b7693ddb7..000000000 --- a/patches/server/0020-Tuinity-Change-writes-to-use-NORMAL-priority-rather-.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?= - -Date: Sat, 18 Apr 2020 18:08:17 +0800 -Subject: [PATCH] Tuinity Change writes to use NORMAL priority rather than LOW - -Should limit build up of I/O tasks, or at least properly -indicate to server owners that I/O is falling behind - -diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 81bb26abc520f49de2e916cf2757ac4c710d02cd..7808dcd7e1e9a30adb441c2eb47a4410b5afa059 100644 ---- a/src/main/java/net/minecraft/server/PlayerChunkMap.java -+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -789,7 +789,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - } - - com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, chunkPos.x, chunkPos.z, -- poiData, null, com.destroystokyo.paper.io.PrioritizedTaskQueue.LOW_PRIORITY); -+ poiData, null, com.destroystokyo.paper.io.PrioritizedTaskQueue.NORMAL_PRIORITY); // Tuinity - use normal priority - - if (!chunk.isNeedsSaving()) { - return; -@@ -823,7 +823,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - asyncSaveData = ChunkRegionLoader.getAsyncSaveData(this.world, chunk); - } - -- this.world.asyncChunkTaskManager.scheduleChunkSave(chunkPos.x, chunkPos.z, com.destroystokyo.paper.io.PrioritizedTaskQueue.LOW_PRIORITY, -+ this.world.asyncChunkTaskManager.scheduleChunkSave(chunkPos.x, chunkPos.z, com.destroystokyo.paper.io.PrioritizedTaskQueue.NORMAL_PRIORITY, // Tuinity - use normal priority - asyncSaveData, chunk); - - chunk.setLastSaved(this.world.getTime()); -@@ -1232,7 +1232,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { - // Paper start - async chunk io - private boolean writeDataAsync(ChunkCoordIntPair chunkPos, NBTTagCompound poiData, NBTTagCompound chunkData, boolean async) { - com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, chunkPos.x, chunkPos.z, -- poiData, chunkData, !async ? com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY : com.destroystokyo.paper.io.PrioritizedTaskQueue.LOW_PRIORITY); -+ poiData, chunkData, !async ? com.destroystokyo.paper.io.PrioritizedTaskQueue.HIGHEST_PRIORITY : com.destroystokyo.paper.io.PrioritizedTaskQueue.NORMAL_PRIORITY); // Tuinity - use normal priority - - if (async) { - return true; -diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java -index b59ef1a63338aa150d39e8014e12b2275da26d50..f0702969c366be067af61be777e64509d923d081 100644 ---- a/src/main/java/net/minecraft/server/VillagePlace.java -+++ b/src/main/java/net/minecraft/server/VillagePlace.java -@@ -150,7 +150,7 @@ public class VillagePlace extends RegionFileSection { - data = this.getData(chunkcoordintpair); - } - com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(this.world, -- chunkcoordintpair.x, chunkcoordintpair.z, data, null, com.destroystokyo.paper.io.PrioritizedTaskQueue.LOW_PRIORITY); -+ chunkcoordintpair.x, chunkcoordintpair.z, data, null, com.destroystokyo.paper.io.PrioritizedTaskQueue.NORMAL_PRIORITY); // Tuinity - use normal priority - } - } - // Paper end diff --git a/patches/server/0021-Tuinity-Log-exceptions-for-async-chunk-load-failures.patch b/patches/server/0021-Tuinity-Log-exceptions-for-async-chunk-load-failures.patch deleted file mode 100644 index 04b86c48d..000000000 --- a/patches/server/0021-Tuinity-Log-exceptions-for-async-chunk-load-failures.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?= - -Date: Sat, 18 Apr 2020 18:10:56 +0800 -Subject: [PATCH] Tuinity Log exceptions for async chunk load failures - - -diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index d6f4daeec90149ef402c2746a4a054c44f7eb21f..f3943532dca289d4ffd1dc1dc645ca1e41949958 100644 ---- a/src/main/java/net/minecraft/server/ChunkProviderServer.java -+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java -@@ -407,7 +407,10 @@ public class ChunkProviderServer extends IChunkProvider { - // either right -> failure - - if (throwable != null) { -- throw new RuntimeException(throwable); -+ // Tuinity start - thank you once again completablefuture -+ MinecraftServer.LOGGER.fatal("Failed to asynchronously load chunk " + chunkPos, throwable); -+ return; -+ // Tuinity end - thank you once again completablefuture - } - - this.removeTicketAtLevel(TicketType.ASYNC_LOAD, chunkPos, ticketLevel, identifier); -@@ -417,12 +420,19 @@ public class ChunkProviderServer extends IChunkProvider { - - if (failure.isPresent()) { - // failure -- throw new IllegalStateException("Chunk failed to load: " + failure.get().toString()); -+ // Tuinity start - thank you once again completablefuture -+ MinecraftServer.LOGGER.fatal("Failed to asynchronously load chunk " + chunkPos, new IllegalStateException("Chunk failed to load: " + failure.get().toString())); -+ return; -+ // Tuinity end - thank you once again completablefuture - } - - onComplete.accept(either.left().get()); - -- }, this.serverThreadQueue); -+ }, this.serverThreadQueue).exceptionally((throwable) -> { // Tuinity start - thank you once again completablefuture -+ MinecraftServer.LOGGER.fatal("Failed to asynchronously load chunk " + chunkPos); -+ return null; -+ }); -+ // Tuinity end - thank you once again completablefuture - } - - public void addTicketAtLevel(TicketType ticketType, ChunkCoordIntPair chunkPos, int ticketLevel, T identifier) { -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4aafad0762df44990ed9d610a59f3862bd3fe3b0..5583e26fb62d0a0e4ca8e995f609c474a6f0c4c9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2476,6 +2476,13 @@ public class CraftWorld implements World { - this.world.doIfNotEntityTicking(() -> ret.complete(chunk == null ? null : chunk.bukkitChunk)); - }); - -+ // Tuinity start - thank you once again completablefuture -+ ret.exceptionally((throwable) -> { -+ net.minecraft.server.MinecraftServer.LOGGER.fatal("Failed to asynchronously load chunk (" + x + "," + z + ")", throwable); -+ return null; -+ }); -+ // Tuinity end - thank you once again completablefuture -+ - return ret; - } - // Paper end diff --git a/pom.xml b/pom.xml index ed1eef6ce..8eff51614 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,13 @@ pom Akarin (Parent) + + + aikar + https://repo.aikar.co/content/groups/aikar/ + + + install ${project.artifactId} @@ -54,7 +61,7 @@ Akarin-API Akarin-Server - Paper${file.separator}Paper-MojangAPI + Tuinity${file.separator}Paper${file.separator}Paper-MojangAPI diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 595e07be8..c51d2c1a0 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -91,5 +91,5 @@ function applyPatch { fi } -(applyPatch Paper/Paper-API ${FORK_NAME}-API HEAD api $API_REPO 0 2 && -applyPatch Paper/Paper-Server ${FORK_NAME}-Server HEAD server $SERVER_REPO 1 2) || exit 1 +(applyPatch Tuinity/Tuinity-API ${FORK_NAME}-API HEAD api $API_REPO 0 2 && +applyPatch Tuinity/Tuinity-Server ${FORK_NAME}-Server HEAD server $SERVER_REPO 1 2) || exit 1 diff --git a/scripts/commitUpstream.sh b/scripts/commitUpstream.sh index a1333381f..8cd3fb1a0 100755 --- a/scripts/commitUpstream.sh +++ b/scripts/commitUpstream.sh @@ -9,13 +9,13 @@ function changeLog() { base=$(git ls-tree HEAD $1 | cut -d' ' -f3 | cut -f1) cd $1 && git log --oneline ${base}...HEAD } -paper=$(changeLog Paper) +paper=$(changeLog Tuinity) updated="" logsuffix="" if [ ! -z "$paper" ]; then - logsuffix="$logsuffix\n\nPaper Changes:\n$paper" - if [ -z "$updated" ]; then updated="Paper"; else updated="$updated/Paper"; fi + logsuffix="$logsuffix\n\Tuinity Changes:\n$paper" + if [ -z "$updated" ]; then updated="Tuinity"; else updated="$updated/Tuinity"; fi fi disclaimer="Upstream has released updates that appears to apply and compile correctly" @@ -27,4 +27,4 @@ log="Updated Upstream ($updated)\n\n${disclaimer}${logsuffix}" echo -e "$log" | git commit -F - -) || exit 1 \ No newline at end of file +) || exit 1 diff --git a/scripts/functions.sh b/scripts/functions.sh index 99f03ec74..a3ad87ac4 100755 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -43,7 +43,7 @@ function basedir { } function paperdir { - cd "$basedir/Paper" + cd "$basedir/Tuinity" } gitcmd() { diff --git a/scripts/generateImports.sh b/scripts/generateImports.sh index 622aead79..6dbbb0c28 100755 --- a/scripts/generateImports.sh +++ b/scripts/generateImports.sh @@ -9,7 +9,7 @@ basedir=$1 source "$basedir/scripts/functions.sh" -paperworkdir="$basedir/Paper/work" +paperworkdir="$basedir/Tuinity/Paper/work" minecraftversion=$(cat $paperworkdir/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) decompile="$paperworkdir/Minecraft/$minecraftversion/spigot" @@ -28,7 +28,7 @@ rm src/net/minecraft/server/*.java cp $decompile/net/minecraft/server/*.java src/net/minecraft/server # diff and only preserve new added files -paperserver="$basedir/Paper/Paper-Server/src/main/java/net/minecraft/server" +paperserver="$basedir/Tuinity/Tuinity-Server/src/main/java/net/minecraft/server" cd $basedir/mc-dev/src/net/minecraft/server/ for file in $(/bin/ls $paperserver) diff --git a/scripts/importSources.sh b/scripts/importSources.sh index f8fb465ae..06dfb5efc 100755 --- a/scripts/importSources.sh +++ b/scripts/importSources.sh @@ -18,8 +18,8 @@ echo "----------------------------------------" # SCRIPT HEADER end # For a description of this script, see updateUpstream.sh. -paperworkdir="$basedir/Paper/work" -paperserverdir="$basedir/Paper/Paper-Server" +paperworkdir="$basedir/Tuinity/Paper/work" +paperserverdir="$basedir/Tuinity/Tuinity-Server" papersrcdir="$paperserverdir/src/main/java" papernmsdir="$papersrcdir/net/minecraft/server" @@ -31,7 +31,7 @@ papernmsdir="$papersrcdir/net/minecraft/server" fi ) -minecraftversion=$(cat "$basedir"/Paper/work/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) +minecraftversion=$(cat "$basedir"/Tuinity/Paper/work/BuildData/info.json | grep minecraftVersion | cut -d '"' -f 4) decompiledir=$paperworkdir/Minecraft/$minecraftversion/spigot nms="net/minecraft/server" diff --git a/scripts/installLauncher.sh b/scripts/installLauncher.sh index d1815bf52..b8213aed9 100755 --- a/scripts/installLauncher.sh +++ b/scripts/installLauncher.sh @@ -15,7 +15,7 @@ echo "----------------------------------------" # License from Paper applies to this file set -e -paperworkdir="$basedir/Paper/work" +paperworkdir="$basedir/Tuinity/Paper/work" mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4) serverjar="$basedir/Akarin-Server/target/akarin-$mcver.jar" vanillajar="$paperworkdir/Minecraft/$mcver/$mcver.jar" diff --git a/scripts/updateUpstream.sh b/scripts/updateUpstream.sh index 6ac55034e..cb537abeb 100755 --- a/scripts/updateUpstream.sh +++ b/scripts/updateUpstream.sh @@ -41,11 +41,11 @@ if [[ "$2" == "--resetPaper" ]]; then fi # patch paper -echo " $(bashcolor 1 32)(0/$subtasks)$(bashcolorend) - Apply patches of Paper.." +echo " $(bashcolor 1 32)(0/$subtasks)$(bashcolorend) - Apply patches of Tuinity.." echo " " -paperVer=$(gethead Paper) +paperVer=$(gethead Tuinity) paperdir -./paper patch +./tuinity patch #cd "Paper-Server" #mcVer=$($mvncmd -o org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=minecraft_version | sed -n -e '/^\[.*\]/ !{ /^[0-9]/ { p; q } }')