diff --git a/patches/unapplied/server/0011-Add-more-metrics.patch b/patches/server/0011-Add-more-metrics.patch similarity index 98% rename from patches/unapplied/server/0011-Add-more-metrics.patch rename to patches/server/0011-Add-more-metrics.patch index 7629c2b..d1f981a 100644 --- a/patches/unapplied/server/0011-Add-more-metrics.patch +++ b/patches/server/0011-Add-more-metrics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more metrics diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 0b3d87d2d43148e6370e7a03e0bb6074891ac800..8783c81af1d09e6682256dee0dd546de0be418cd 100644 +index 1de03b16c513d83550077bab46b52ae6e40eb98e..0935884fa747407d262178c25388073957d4547e 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java @@ -636,38 +636,59 @@ public class Metrics { diff --git a/patches/unapplied/server/0012-Optimize-default-configurations.patch b/patches/server/0012-Optimize-default-configurations.patch similarity index 82% rename from patches/unapplied/server/0012-Optimize-default-configurations.patch rename to patches/server/0012-Optimize-default-configurations.patch index 1653bb7..5e7cb84 100644 --- a/patches/unapplied/server/0012-Optimize-default-configurations.patch +++ b/patches/server/0012-Optimize-default-configurations.patch @@ -8,67 +8,8 @@ Subject: [PATCH] Optimize default configurations - AkiraDevelopment/SimplyMC - YouHaveTrouble/minecraft-exploits-and-how-to-fix-them -diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java -index 8afc58f35deb49084a20b803e91ce4692ce6e4d6..1febd6d0743aadb4002b447c07ec43098ca96c18 100644 ---- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java -+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java -@@ -64,7 +64,7 @@ public class PufferfishConfig { - getString("info.version", "1.0"); - setComment("info", - "Pufferfish Configuration", -- "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", -+ //"Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Sponsorblock - "Join our Discord for support: https://discord.gg/reZw4vQV9H", - "Download new builds at https://ci.pufferfish.host/job/Pufferfish"); - -@@ -219,7 +219,7 @@ public class PufferfishConfig { - public static int maxProjectileLoadsPerTick; - public static int maxProjectileLoadsPerProjectile; - private static void projectileLoading() { -- maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); -+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 8 : 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma - Optimize default configurations - maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed."); - - setComment("projectile", "Optimizes projectile settings"); -@@ -233,7 +233,7 @@ public class PufferfishConfig { - public static int activationDistanceMod; - - private static void dynamicActivationOfBrains() throws IOException { -- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur -+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()); // Purpur // Plazma - Optimize default configurations - startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12, - "This value determines how far away an entity has to be", - "from the player to start being effected by DEAR."); -@@ -241,7 +241,7 @@ public class PufferfishConfig { - maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20, - "This value defines how often in ticks, the furthest entity", - "will get their pathfinders and behaviors ticked. 20 = 1s"); -- activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8, -+ activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? 7 : 8, // Plazma - Optimize default configurations - "This value defines how much distance modifies an entity's", - "tick frequency. freq = (distanceToPlayer^2) / (2^value)", - "If you want further away entities to tick less often, use 7.", -@@ -261,8 +261,18 @@ public class PufferfishConfig { - public static Map projectileTimeouts; - private static void projectileTimeouts() { - // Set some defaults -+ // Plazma start - Optimize default configurations -+ if (org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize()) { -+ getInt("entity_timeouts.ARROW", 200); -+ getInt("entity_timeouts.EGG", 200); -+ getInt("entity_timeouts.ENDER_PEARL", 200); -+ getInt("entity_timeouts.SNOWBALL", 200); -+ getInt("entity_timeouts.LLAMA_SPIT", 200); -+ } else { -+ // Plazma end - Optimize default configurations - getInt("entity_timeouts.SNOWBALL", -1); - getInt("entity_timeouts.LLAMA_SPIT", -1); -+ } // Plazma - Optimize default configurations - setComment("entity_timeouts", - "These values define a entity's maximum lifespan. If an", - "entity is in this list and it has survived for longer than", diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222bc5f90ed 100644 +index b8a89bf8a7a0ef25f00ccc0e84ca64f4524fdc3e..08a3a1ea71fb5e3702ceec518de4871840e36930 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java @@ -156,7 +156,7 @@ public class GlobalConfiguration extends ConfigurationPart { @@ -80,7 +21,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222 } public SpamLimiter spamLimiter; -@@ -198,7 +198,7 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -196,7 +196,7 @@ public class GlobalConfiguration extends ConfigurationPart { public Commands commands; public class Commands extends ConfigurationPart { @@ -89,7 +30,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222 public boolean fixTargetSelectorTagCompletion = true; public boolean timeCommandAffectsAllWorlds = false; } -@@ -247,7 +247,7 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -245,7 +245,7 @@ public class GlobalConfiguration extends ConfigurationPart { public BookSize bookSize; public class BookSize extends ConfigurationPart { @@ -98,7 +39,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222 public double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class } public boolean resolveSelectorsInBooks = false; -@@ -258,7 +258,15 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -256,7 +256,15 @@ public class GlobalConfiguration extends ConfigurationPart { public class PacketLimiter extends ConfigurationPart { public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED); public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK); @@ -115,7 +56,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222 @ConfigSerializable public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) { -@@ -326,7 +334,7 @@ public class GlobalConfiguration extends ConfigurationPart { +@@ -324,7 +332,7 @@ public class GlobalConfiguration extends ConfigurationPart { executor.setMaximumPoolSize(_chatExecutorMaxSize); } } @@ -125,7 +66,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222 public boolean loadPermissionsYmlBeforePlugins = true; @Constraints.Min(4) diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d897ab34ac8 100644 +index efc91ff91827872c62b8bd060282549ccdcf67dd..1d926378887b9e42f1827e958f506be3e27d5ab5 100644 --- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java @@ -96,12 +96,32 @@ public class WorldConfiguration extends ConfigurationPart { @@ -194,14 +135,14 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 } } -@@ -152,14 +193,14 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -151,14 +192,14 @@ public class WorldConfiguration extends ConfigurationPart { public ArmorStands armorStands; public class ArmorStands extends ConfigurationPart { - public boolean doCollisionEntityLookups = true; - public boolean tick = true; -+ public boolean doCollisionEntityLookups = !org.plazmamc.plazma.Options.aggressiveOptimize; // Plazma - Optimize default configurations -+ public boolean tick = !org.plazmamc.plazma.Options.aggressiveOptimize; // Plazma - Optimize default configurations ++ public boolean doCollisionEntityLookups = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations ++ public boolean tick = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations } public Markers markers; @@ -212,7 +153,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 } public Sniffer sniffer; -@@ -182,7 +223,7 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart { @MergeMap public Reference2IntMap spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); @MergeMap @@ -221,7 +162,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 @MergeMap public Reference2IntMap ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1))); -@@ -383,7 +424,7 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -382,7 +423,7 @@ public class WorldConfiguration extends ConfigurationPart { public class Environment extends ConfigurationPart { public boolean disableThunder = false; public boolean disableIceAndSnow = false; @@ -230,7 +171,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 public boolean disableExplosionKnockback = false; public boolean generateFlatBedrock = false; public FrostedIce frostedIce; -@@ -438,7 +479,7 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -434,7 +475,7 @@ public class WorldConfiguration extends ConfigurationPart { public Fixes fixes; public class Fixes extends ConfigurationPart { @@ -239,7 +180,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 public boolean disableUnloadedChunkEnderpearlExploit = true; public boolean preventTntFromMovingInWater = false; public boolean splitOverstackedLoot = true; -@@ -466,9 +507,9 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -462,9 +503,9 @@ public class WorldConfiguration extends ConfigurationPart { public class Collisions extends ConfigurationPart { public boolean onlyPlayersCollide = false; public boolean allowVehicleCollisions = true; @@ -251,7 +192,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 public boolean allowPlayerCrammingDamage = false; } -@@ -476,18 +517,41 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -472,18 +513,41 @@ public class WorldConfiguration extends ConfigurationPart { public class Chunks extends ConfigurationPart { public AutosavePeriod autoSaveInterval = AutosavePeriod.def(); @@ -301,7 +242,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 }); public boolean flushRegionsOnSave = false; } -@@ -502,9 +566,9 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -498,9 +562,9 @@ public class WorldConfiguration extends ConfigurationPart { public TickRates tickRates; public class TickRates extends ConfigurationPart { @@ -313,12 +254,12 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89 public int wetFarmland = 1; public int dryFarmland = 1; public Table, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40)); -@@ -538,9 +602,9 @@ public class WorldConfiguration extends ConfigurationPart { +@@ -534,9 +598,9 @@ public class WorldConfiguration extends ConfigurationPart { public class Misc extends ConfigurationPart { public int lightQueueSize = 20; - public boolean updatePathfindingOnBlockUpdate = true; -+ public boolean updatePathfindingOnBlockUpdate = !org.plazmamc.plazma.Options.aggressiveOptimize; // Plazma - Optimize default configurations ++ public boolean updatePathfindingOnBlockUpdate = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations public boolean showSignClickCommandFailureMsgsToPlayer = false; - public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA; + public RedstoneImplementation redstoneImplementation = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? RedstoneImplementation.ALTERNATE_CURRENT : RedstoneImplementation.VANILLA; // Plazma - Optimize default configurations @@ -338,10 +279,10 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357 } diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 23f0302f2d90b7229828890eb364bc2c9abc11d2..a9753f799ef944a46ee3cedd68c8aad7aacc2612 100644 +index 20d215e53b4a02d7f52197decf05fd1e6ee44669..f832834e02594eb35e08108054f395be3b2bed51 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -153,7 +153,7 @@ public class Main { +@@ -178,7 +178,7 @@ public class Main { File configFile = (File) optionset.valueOf("bukkit-settings"); YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile); configuration.options().copyDefaults(true); @@ -351,10 +292,10 @@ index 23f0302f2d90b7229828890eb364bc2c9abc11d2..a9753f799ef944a46ee3cedd68c8aad7 File commandFile = (File) optionset.valueOf("commands-settings"); diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index a66dcea06424518290576c7647ae0717040586f9..41d5d15dfa2affdee68501efb2447a209c38992d 100644 +index 5b7ed096999dbb7e95fb7d615e737f19604f58ff..9684e7079c9586e764931e5b6c40961ac9eda853 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -130,14 +130,14 @@ public class DedicatedServerProperties extends Settings { return Mth.clamp(integer, 1, 29999984); }, 29999984); - this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag -+ this.syncChunkWrites = this.get("sync-chunk-writes", false) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Show disabled by default ++ this.syncChunkWrites = Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Completely remove this setting + this.regionFileComression = this.get("region-file-compression", "deflate"); this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false); this.enableStatus = this.get("enable-status", true); - this.hideOnlinePlayers = this.get("hide-online-players", false); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ceea71c3e6886b03d017c44c287dc20928f63f09..e250196a4210c5b2fe5eadda6312ebc5e17590b8 100644 +index d06473349dff50a33b7843ae6dcde28f50fcd708..c1e5bc9cab10c51712dad1da8ad50e5d821b85b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -426,7 +426,7 @@ public final class CraftServer implements Server { @@ -396,18 +337,18 @@ index ceea71c3e6886b03d017c44c287dc20928f63f09..e250196a4210c5b2fe5eadda6312ebc5 if (!this.configuration.isString("aliases")) { legacyAlias = this.configuration.getConfigurationSection("aliases"); diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java -index a858b7ddef7f6877c0b92f4150e0dd37bea121aa..eab5ea835a524482f8cc043c7be190a835335ed2 100644 +index b02a0dddd99df1691c125660828a61cc4a5a4d02..739bcbb7388b948982202b35a708753103fa38e8 100644 --- a/src/main/java/org/plazmamc/plazma/Options.java +++ b/src/main/java/org/plazmamc/plazma/Options.java -@@ -3,5 +3,6 @@ package org.plazmamc.plazma; - public interface Options { +@@ -6,5 +6,6 @@ public interface Options { - boolean iKnowWhatIAmDoing = Boolean.getBoolean("Plazma.iKnowWhatIAmDoing"); -+ boolean aggressiveOptimize = Boolean.getBoolean("Plazma.aggressiveOptimize"); + boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization"); + boolean NO_WARN = getBoolean("Plazma.iKnowWhatIAmDoing"); ++ boolean AGGRESSIVE = Boolean.getBoolean("Plazma.aggressiveOptimize"); } diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71 100644 +index 79456fab220fc797f0f28fc9657f3a406d751900..2a9573ea2b9b01aa78270440ccb8238dbbd221f9 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -49,6 +49,7 @@ public class PurpurConfig { @@ -437,10 +378,10 @@ index a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecb private static void networkSettings() { useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index 7dc82ffccc157a17335f1bc56ab81be3813294f6..d756c25e6d0af3153e510d0162e65348b1675366 100644 +index 8704cc621937beda692bf484cf5ef11b2d7d7e4c..6928d9e09e3591e457d760d81d112ae82c543b53 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -425,7 +425,7 @@ public class PurpurWorldConfig { +@@ -423,7 +423,7 @@ public class PurpurWorldConfig { public boolean idleTimeoutTargetPlayer = true; public String playerDeathExpDropEquation = "expLevel * 7"; public int playerDeathExpDropMax = 100; @@ -449,7 +390,7 @@ index 7dc82ffccc157a17335f1bc56ab81be3813294f6..d756c25e6d0af3153e510d0162e65348 public boolean teleportOnNetherCeilingDamage = false; public boolean totemOfUndyingWorksInInventory = false; public boolean playerFixStuckPortal = false; -@@ -3127,7 +3127,7 @@ public class PurpurWorldConfig { +@@ -3118,7 +3118,7 @@ public class PurpurWorldConfig { public boolean zombieJockeyOnlyBaby = true; public double zombieJockeyChance = 0.05D; public boolean zombieJockeyTryExistingChickens = true; diff --git a/patches/unapplied/server/0013-Tweak-console-logging.patch b/patches/server/0013-Tweak-console-logging.patch similarity index 92% rename from patches/unapplied/server/0013-Tweak-console-logging.patch rename to patches/server/0013-Tweak-console-logging.patch index dcde573..0f7e345 100644 --- a/patches/unapplied/server/0013-Tweak-console-logging.patch +++ b/patches/server/0013-Tweak-console-logging.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Tweak console logging diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e20b104c57 100644 +index 8289334e77999f72214c330a3306cbfeb17afbf1..361dc9c3434d9b4ac4b9966fa09b17f6820b0f22 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -180,16 +180,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -193,16 +193,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); } @@ -25,7 +25,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2 DedicatedServer.LOGGER.info("Loading properties"); DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties(); -@@ -212,6 +202,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -225,6 +215,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma // Paper end - initialize global and world-defaults configuration @@ -43,7 +43,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2 // Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save if (this.convertOldUsers()) { this.getProfileCache().save(false); // Paper -@@ -320,6 +321,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -330,6 +331,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord"; String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/"; // Paper end - Add Velocity IP Forwarding Support @@ -51,7 +51,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2 if (!this.usesAuthentication()) { DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware."); -@@ -333,7 +335,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -343,7 +345,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose."); } // Spigot end @@ -61,10 +61,10 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 60aa2984e490374ab2659f9d0a4821f1ea17c700..14d15dd0d4973957871f5c06042fcaa4ea8b7a8a 100644 +index b863f6fe65c796a1d3102cc3eddb5d6c5becd3ac..2707a96f9e22469d008ec7d2fa8a8c497efaf8cf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1469,6 +1469,7 @@ public abstract class PlayerList { +@@ -1467,6 +1467,7 @@ public abstract class PlayerList { public void broadcastChatMessage(PlayerChatMessage message, Predicate shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function unsignedFunction) { // Paper end boolean flag = this.verifyChatTrusted(message); diff --git a/patches/unapplied/server/0014-Add-missing-purpur-configuration-options.patch b/patches/server/0014-Add-missing-purpur-configuration-options.patch similarity index 86% rename from patches/unapplied/server/0014-Add-missing-purpur-configuration-options.patch rename to patches/server/0014-Add-missing-purpur-configuration-options.patch index 2c60529..a02f959 100644 --- a/patches/unapplied/server/0014-Add-missing-purpur-configuration-options.patch +++ b/patches/server/0014-Add-missing-purpur-configuration-options.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add missing purpur configuration options diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 518660609566ffe943103b305472590ee9f0a257..a6a697868b22224a26d6c39e594533c3b33e724b 100644 +index bca7b7192debb3a34a08047010a2438e7b7e2a78..b77aa7518b6ca6c6a387fc0f7270d7ff2dca4ac9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java @@ -150,6 +150,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS @@ -33,14 +33,14 @@ index 518660609566ffe943103b305472590ee9f0a257..a6a697868b22224a26d6c39e594533c3 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 8616a8c09a21f576a07daaa93ebf64e0f03d0c88..77c1bcde8cc5c2f51418a6f385ce84f202a13787 100644 +index 24a1663cf1cd3f888981a13907811b55bdbf6133..fdc3aa9672077787e841d240fe1e690dcd9ca321 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -97,6 +97,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl +@@ -93,6 +93,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl public int getPurpurBreedTime() { return this.level().purpurConfig.camelBreedingTicks; } -+ ++ + // Plazma start - Add missing purpur configuration options + @Override + public boolean isSensitiveToWater() { @@ -51,15 +51,15 @@ index 8616a8c09a21f576a07daaa93ebf64e0f03d0c88..77c1bcde8cc5c2f51418a6f385ce84f2 + public boolean isAlwaysExperienceDropper() { + return level().purpurConfig.camelAlwaysDropExp; + } -+ // Plazma end - Add missing purpur configuration options ++ // Plazma end - Add missing purpur configuration optionsurpur end // Purpur end @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 37f1d3c656997906cef57d9dbefc226d04fc65fe..b3880426148bb1ffbf36113343c54850fc344d1c 100644 +index ee8c232ddaa518377bdfa54e83ffc04f7a2f2c9a..2c45f4d321629979926bb9e677ba4bc8b44eec8d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java +++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -161,6 +161,23 @@ public class Frog extends Animal implements VariantHolder { +@@ -160,6 +160,23 @@ public class Frog extends Animal implements VariantHolder> { public float getJumpPower() { return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower(); } @@ -84,10 +84,10 @@ index 37f1d3c656997906cef57d9dbefc226d04fc65fe..b3880426148bb1ffbf36113343c54850 public int getPurpurBreedTime() { diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -index 2a9c2a69a0589e4e7b7c79d3716376b360a2eba1..630eaae555403db79f4e16880ca443904b9254ab 100644 +index 09c4cf772df4644413e40055fedcdf42ee8064fd..73b2e74199d54d87aa6d2b7132f10f29eefa11db 100644 --- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -90,6 +90,23 @@ public class Tadpole extends AbstractFish { +@@ -93,6 +93,23 @@ public class Tadpole extends AbstractFish { protected void registerGoals() { this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur } @@ -112,12 +112,12 @@ index 2a9c2a69a0589e4e7b7c79d3716376b360a2eba1..630eaae555403db79f4e16880ca44390 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c6daf4cfb 100644 +index 21bdcbd51d9f440e0734750b40cefa4c08cdaf5f..a2cc1efaa621861828b007759536ac49d7e3646e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -106,6 +106,18 @@ public class Sniffer extends Animal { - public boolean isControllable() { - return level().purpurConfig.snifferControllable; +@@ -119,6 +119,18 @@ public class Sniffer extends Animal { + public int getPurpurBreedTime() { + return this.level().purpurConfig.snifferBreedingTicks; } + + // Plazma start - Add missing purpur configuration options @@ -135,7 +135,7 @@ index 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16e4116239 100644 +index 0bb577ec9ba0d23a741ccf067ac35f6be68312ca..358811e71b8b8a8a09fb6c56ed51bcc11b052add 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java @@ -147,6 +147,23 @@ public class Warden extends Monster implements VibrationSystem { @@ -163,10 +163,10 @@ index bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16 @Override diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java -index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8026440d4 100644 +index b04f7ce0805453f6c737fa9dc11c4129ca64e934..9840678549e25c6da00aea222a585e7f01ec1e0e 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java -@@ -43,7 +43,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain +@@ -45,12 +45,12 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain public ChestBoat(EntityType type, Level world) { super(type, world); @@ -175,7 +175,13 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8 } public ChestBoat(Level world, double d0, double d1, double d2) { -@@ -170,7 +170,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain + super(EntityType.CHEST_BOAT, world); +- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY); ++ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur configuration options + this.setPos(d0, d1, d2); + this.xo = d0; + this.yo = d1; +@@ -172,7 +172,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain @Override public int getContainerSize() { @@ -185,7 +191,7 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8 @Override diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71..fc48ff9270e32c3b3dbf7ffd310cab7c33d459c0 100644 +index 2a9573ea2b9b01aa78270440ccb8238dbbd221f9..545abffcd9289f135a89f1d5d05f8ebe01154594 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -329,6 +329,7 @@ public class PurpurConfig { @@ -205,13 +211,13 @@ index 65b9e4fc073d0e97c6f90587d20e3ecbdaaf2c71..fc48ff9270e32c3b3dbf7ffd310cab7c org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604bf6ab03ae 100644 +index 6928d9e09e3591e457d760d81d112ae82c543b53..ecd5ba092ba7334da6dc1b97b74b33700788252a 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -1170,7 +1170,15 @@ public class PurpurWorldConfig { +@@ -1163,7 +1163,15 @@ public class PurpurWorldConfig { + public boolean allayRidable = false; public boolean allayRidableInWater = true; public boolean allayControllable = true; - public List allayRespectNBT = new ArrayList<>(); + // Plazma start - Add missing purpur config options + public double allayMaxHealth = 20.0D; + public boolean allayTakeDamageFromWater = false; @@ -224,23 +230,21 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b allayRidable = getBoolean("mobs.allay.ridable", allayRidable); allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater); allayControllable = getBoolean("mobs.allay.controllable", allayControllable); -@@ -1289,7 +1297,15 @@ public class PurpurWorldConfig { +@@ -1280,7 +1288,13 @@ public class PurpurWorldConfig { public double camelMovementSpeedMin = 0.09D; public double camelMovementSpeedMax = 0.09D; public int camelBreedingTicks = 6000; + // Plazma start - Add missing purpur config options -+ //public boolean camelRidableInWater = false; + public boolean camelTakeDamageFromWater = false; + public boolean camelAlwaysDropExp = false; private void camelSettings() { -+ //camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); + camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater); + camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp); + // Plazma end - Add missing purpur configuration options camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater); camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin); camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax); -@@ -1717,7 +1733,15 @@ public class PurpurWorldConfig { +@@ -1708,7 +1722,15 @@ public class PurpurWorldConfig { public boolean frogControllable = true; public float frogRidableJumpHeight = 0.65F; public int frogBreedingTicks = 6000; @@ -256,7 +260,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b frogRidable = getBoolean("mobs.frog.ridable", frogRidable); frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater); frogControllable = getBoolean("mobs.frog.controllable", frogControllable); -@@ -2668,7 +2692,13 @@ public class PurpurWorldConfig { +@@ -2659,7 +2681,13 @@ public class PurpurWorldConfig { public boolean snifferControllable = true; public double snifferMaxHealth = 14.0D; public int snifferBreedingTicks = 6000; @@ -270,7 +274,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable); -@@ -2767,7 +2797,15 @@ public class PurpurWorldConfig { +@@ -2758,7 +2786,15 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -286,7 +290,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable); tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater); tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable); -@@ -2983,7 +3021,15 @@ public class PurpurWorldConfig { +@@ -2974,7 +3010,15 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true; diff --git a/patches/unapplied/server/0016-Completely-remove-Mojang-Profiler.patch b/patches/server/0015-Completely-remove-Mojang-Profiler.patch similarity index 74% rename from patches/unapplied/server/0016-Completely-remove-Mojang-Profiler.patch rename to patches/server/0015-Completely-remove-Mojang-Profiler.patch index fa254d0..a12bbd0 100644 --- a/patches/unapplied/server/0016-Completely-remove-Mojang-Profiler.patch +++ b/patches/server/0015-Completely-remove-Mojang-Profiler.patch @@ -5,20 +5,20 @@ Subject: [PATCH] Completely remove Mojang Profiler diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index b203394ed62807e7d5df433830993f1d2ee14939..e86d6dc83f77ef17c0e4458470009e5ca642f583 100644 +index f9d0e8ee9414b3897f268ba78a1469ddf868f51a..58d89000af36f72d629d8e0873d6efbbbb720fe1 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -434,7 +434,7 @@ public class Commands { +@@ -429,7 +429,7 @@ public class Commands { int j = minecraftserver.getGameRules().getInt(GameRules.RULE_MAX_COMMAND_FORK_COUNT); try { -- ExecutionContext executioncontext1 = new ExecutionContext<>(i, j, minecraftserver.getProfiler()); -+ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j); //, minecraftserver.getProfiler()); // Plazma - Completely remove Mojang Profiler +- ExecutionContext executioncontext1 = new ExecutionContext<>(i, j, minecraftserver.getProfiler()); ++ ExecutionContext executioncontext1 = new ExecutionContext<>(i, j/*, minecraftserver.getProfiler()*/); // Plazma - Completely remove Mojang's Profiler try { Commands.CURRENT_EXECUTION_CONTEXT.set(executioncontext1); diff --git a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java -index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..ec845d3d371021f1c16a4c5466cd1a1d94092d3b 100644 +index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..467e17bfce31d0919d603698c9d88a04b05033dc 100644 --- a/src/main/java/net/minecraft/commands/execution/ExecutionContext.java +++ b/src/main/java/net/minecraft/commands/execution/ExecutionContext.java @@ -12,7 +12,7 @@ import net.minecraft.commands.ExecutionCommandSource; @@ -26,7 +26,7 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..ec845d3d371021f1c16a4c5466cd1a1d import net.minecraft.commands.execution.tasks.CallFunction; import net.minecraft.commands.functions.InstantiatedFunction; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import org.slf4j.Logger; public class ExecutionContext implements AutoCloseable { @@ -35,7 +35,7 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..ec845d3d371021f1c16a4c5466cd1a1d private final int commandLimit; private final int forkLimit; - private final ProfilerFiller profiler; -+ //private final ProfilerFiller profiler; // Plazma - Completely remove Mojang Profiler ++ //private final ProfilerFiller profiler; // Plazma - Completely remove Mojang's Profiler @Nullable private TraceCallbacks tracer; private int commandQuota; @@ -44,11 +44,11 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..ec845d3d371021f1c16a4c5466cd1a1d private int currentFrameDepth; - public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount, ProfilerFiller profiler) { -+ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang Profiler ++ public ExecutionContext(int maxCommandChainLength, int maxCommandForkCount/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler this.commandLimit = maxCommandChainLength; this.forkLimit = maxCommandForkCount; - this.profiler = profiler; -+ //this.profiler = profiler; // Plazma - Completely remove Mojang Profiler ++ //this.profiler = profiler; // Plazma - Completely remove Mojang's Profiler this.commandQuota = maxCommandChainLength; } @@ -56,32 +56,32 @@ index f626a2f28f2aebb3237cebb6afef3c4fa1a6cb37..ec845d3d371021f1c16a4c5466cd1a1d return this.tracer; } -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profiler public ProfilerFiller profiler() { return this.profiler; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler public int forkLimit() { return this.forkLimit; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1cbb3c1142a480201971fae718e6b15a3e4c9d53..74be6ec20b6484ddbffcc5f9e5c6d742640183df 100644 +index 2903c9a2480ac505f0931d29ac3c5013037e65f1..4a265c97ea872b178286394e2b8d2382166e4cf0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -111,18 +111,18 @@ import net.minecraft.util.SignatureValidator; - import net.minecraft.util.TimeUtil; - import net.minecraft.util.Unit; - import net.minecraft.util.datafix.DataFixers; +@@ -104,18 +104,18 @@ import net.minecraft.util.datafix.DataFixers; + import net.minecraft.util.debugchart.RemoteDebugSampleType; + import net.minecraft.util.debugchart.SampleLogger; + import net.minecraft.util.debugchart.TpsDebugDimensions; -import net.minecraft.util.profiling.EmptyProfileResults; -import net.minecraft.util.profiling.ProfileResults; -import net.minecraft.util.profiling.ProfilerFiller; -import net.minecraft.util.profiling.ResultField; -import net.minecraft.util.profiling.SingleTickProfiler; -+// import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.EmptyProfileResults; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.ProfileResults; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.ResultField; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.SingleTickProfiler; // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.profiling.jfr.JvmProfiler; import net.minecraft.util.profiling.jfr.callback.ProfiledDuration; -import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; @@ -89,15 +89,15 @@ index 1cbb3c1142a480201971fae718e6b15a3e4c9d53..74be6ec20b6484ddbffcc5f9e5c6d742 -import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; -import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; -import net.minecraft.util.profiling.metrics.storage.MetricsPersister; -+// import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.metrics.profiling.ActiveMetricsRecorder; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.profiling.InactiveMetricsRecorder; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.profiling.MetricsRecorder; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.profiling.ServerMetricsSamplersProvider; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.storage.MetricsPersister; // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.thread.ReentrantBlockableEventLoop; import net.minecraft.world.Difficulty; import net.minecraft.world.RandomSequences; -@@ -217,14 +217,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop tickables = Lists.newArrayList(); @@ -109,122 +109,117 @@ index 1cbb3c1142a480201971fae718e6b15a3e4c9d53..74be6ec20b6484ddbffcc5f9e5c6d742 - @Nullable - private MinecraftServer.TimeProfiler debugCommandProfiler; - private boolean debugCommandProfilerDelayStart; -+ // private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang Profiler -+ // private ProfilerFiller profiler; // Plazma - Completely remove Mojang Profiler -+ // private Consumer onMetricsRecordingStopped; // Plazma - Completely remove Mojang Profiler -+ // private Consumer onMetricsRecordingFinished; // Plazma - Completely remove Mojang Profiler -+ // private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang Profiler -+ // @Nullable // Plazma - Completely remove Mojang Profiler -+ // private MinecraftServer.TimeProfiler debugCommandProfiler; // Plazma - Completely remove Mojang Profiler -+ // private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang Profiler ++ // private MetricsRecorder metricsRecorder; // Plazma - Completely remove Mojang's Profiler ++ // private ProfilerFiller profiler; // Plazma - Completely remove Mojang's Profiler ++ // private Consumer onMetricsRecordingStopped; // Plazma - Completely remove Mojang's Profiler ++ // private Consumer onMetricsRecordingFinished; // Plazma - Completely remove Mojang's Profiler ++ // private boolean willStartRecordingMetrics; // Plazma - Completely remove Mojang's Profiler ++ // @Nullable // Plazma - Completely remove Mojang's Profiler ++ // private MinecraftServer.TimeProfiler debugCommandProfiler // Plazma - Completely remove Mojang's Profiler; ++ // private boolean debugCommandProfilerDelayStart; // Plazma - Completely remove Mojang's Profiler private ServerConnectionListener connection; public final ChunkProgressListenerFactory progressListenerFactory; @Nullable -@@ -2495,10 +2495,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2763,12 +2766,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop resultConsumer, Consumer dumpConsumer) { - /*this.onMetricsRecordingStopped = (methodprofilerresults) -> { // Purpur -- this.stopRecordingMetrics(); -- resultConsumer.accept(methodprofilerresults); -- }; -- this.onMetricsRecordingFinished = dumpConsumer; ++ this.onMetricsRecordingStopped = (methodprofilerresults) -> { // Purpur // Plazma - IDE problem + this.stopRecordingMetrics(); + resultConsumer.accept(methodprofilerresults); + }; + this.onMetricsRecordingFinished = dumpConsumer; - this.willStartRecordingMetrics = true;*/ // Purpur -+ // Plazma start - IDE Error -+ // this.onMetricsRecordingStopped = (methodprofilerresults) -> { // Purpur -+ // this.stopRecordingMetrics(); -+ // resultConsumer.accept(methodprofilerresults); -+ // }; -+ // this.onMetricsRecordingFinished = dumpConsumer; -+ // this.willStartRecordingMetrics = true; // Purpur ++ this.willStartRecordingMetrics = true; // Purpur // Plazma - IDE problem } public void stopRecordingMetrics() { -@@ -2783,6 +2787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop prepared, ResourceManager manager, ProfilerFiller profiler) { -+ protected void apply(Map prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang Profiler ++ protected void apply(Map prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler + RegistryOps registryops = this.registries.createSerializationContext(JsonOps.INSTANCE); Builder builder = ImmutableMap.builder(); - prepared.forEach((minecraftkey, jsonelement) -> { diff --git a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java -index 981c3023044f3cc6dc22ada20cd4bedcf7a28db3..75a7f4db9fee80cceea268d3a61b54d81b004605 100644 +index bae0d208b31aa0a6977c30f2f8484ab3c316bc71..05d8ca83abf69226aae43ec6f75055726de06e8a 100644 --- a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java +++ b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java @@ -26,7 +26,7 @@ import net.minecraft.server.packs.resources.PreparableReloadListener; @@ -232,7 +227,7 @@ index 981c3023044f3cc6dc22ada20cd4bedcf7a28db3..75a7f4db9fee80cceea268d3a61b54d8 import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.tags.TagLoader; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec3; import org.slf4j.Logger; @@ -242,13 +237,13 @@ index 981c3023044f3cc6dc22ada20cd4bedcf7a28db3..75a7f4db9fee80cceea268d3a61b54d8 ResourceManager manager, - ProfilerFiller prepareProfiler, - ProfilerFiller applyProfiler, -+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang Profiler -+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang Profiler ++ // ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler ++ // ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler Executor prepareExecutor, Executor applyExecutor ) { diff --git a/src/main/java/net/minecraft/server/ServerFunctionManager.java b/src/main/java/net/minecraft/server/ServerFunctionManager.java -index 92aa26881818fec92d0663e2ccf507165c34c733..3b162ddc8dd57abf5ad37e22ed7f0f6f0379c1e1 100644 +index 775b24a9e55528944b629fd85e1f6ebef9a9892f..579e0b0040ea3315fc7c0e209574b7fef799d2d1 100644 --- a/src/main/java/net/minecraft/server/ServerFunctionManager.java +++ b/src/main/java/net/minecraft/server/ServerFunctionManager.java @@ -16,7 +16,7 @@ import net.minecraft.commands.functions.CommandFunction; @@ -256,18 +251,18 @@ index 92aa26881818fec92d0663e2ccf507165c34c733..3b162ddc8dd57abf5ad37e22ed7f0f6f import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import org.slf4j.Logger; public class ServerFunctionManager { diff --git a/src/main/java/net/minecraft/server/commands/PerfCommand.java b/src/main/java/net/minecraft/server/commands/PerfCommand.java -index 8c587f829c5e8c6b6df3150024c4ae704988c47b..a350f18b6be2fa1f18898dac69ebf0b1cba95b38 100644 +index 8c587f829c5e8c6b6df3150024c4ae704988c47b..319f484b535143a94ee2da11114acacce5d12ccf 100644 --- a/src/main/java/net/minecraft/server/commands/PerfCommand.java +++ b/src/main/java/net/minecraft/server/commands/PerfCommand.java @@ -1,36 +1,39 @@ package net.minecraft.server.commands; -+// Plazma start - Completely remove Mojang Profiler ++// Plazma start - Completely remove Mojang's Profiler import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.exceptions.CommandSyntaxException; -import com.mojang.brigadier.exceptions.SimpleCommandExceptionType; @@ -364,9 +359,9 @@ index 8c587f829c5e8c6b6df3150024c4ae704988c47b..a350f18b6be2fa1f18898dac69ebf0b1 } + */ } -+// Plazma end - Completely remove Mojang Profiler ++// Plazma end - Completely remove Mojang's Profiler diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 9116b3d298a9bb6e550d299f76ff1243da824cbe..618f2166417b88c92d99a7cf6f10e769eedc95a3 100644 +index 4e6fccec4f5ca14562bf5bae495ac36c14982d85..73c1f17f1e6fa63e98081304f8cbd336902d9ac6 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener; @@ -374,42 +369,42 @@ index 9116b3d298a9bb6e550d299f76ff1243da824cbe..618f2166417b88c92d99a7cf6f10e769 import net.minecraft.util.CsvOutput; import net.minecraft.util.Mth; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.thread.BlockableEventLoop; import net.minecraft.util.thread.ProcessorHandle; import net.minecraft.util.thread.ProcessorMailbox; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 7b3ba500f465b999ce11964b0e4e30f36005536e..a57b6db99d8b2a41c43a84662b6d023b5a3c470a 100644 +index 476a04d87a61b021816d2970e86042bde32d95a2..fce8968087ddb951f3c154f28d567a42acafca7e 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -23,7 +23,7 @@ import net.minecraft.core.SectionPos; +@@ -21,7 +21,7 @@ import net.minecraft.core.SectionPos; import net.minecraft.network.protocol.Packet; import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.util.VisibleForDebug; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.thread.BlockableEventLoop; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.ai.village.poi.PoiManager; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f5d1c1629a762b0ff5534d546610b1f59f385921..8fc95714ceebc5d5c1b4015a039b7bd375decb6d 100644 +index f03b59754f5900fa47985b4118cacccadf04920f..7a864b55555adbe8bb88a816bbfdbbb59afc6d52 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -78,7 +78,7 @@ import net.minecraft.util.Mth; - import net.minecraft.util.ProgressListener; +@@ -79,7 +79,7 @@ import net.minecraft.util.ProgressListener; import net.minecraft.util.RandomSource; import net.minecraft.util.Unit; + import net.minecraft.util.datafix.DataFixTypes; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.valueproviders.IntProvider; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.DifficultyInstance; -@@ -695,15 +695,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -700,15 +700,15 @@ public class ServerLevel extends Level implements WorldGenLevel { // Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error -- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma -+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), /*minecraftserver::getProfiler,*/ false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang Profiler +- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma ++ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), /*minecraftserver::getProfiler,*/ false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess(), iworlddataserver.getGameRules())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang's Profiler this.pvpMode = minecraftserver.isPvpAllowed(); this.convertable = convertable_conversionsession; this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); @@ -418,13 +413,13 @@ index f5d1c1629a762b0ff5534d546610b1f59f385921..8fc95714ceebc5d5c1b4015a039b7bd3 this.entityTickList = new EntityTickList(); - this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier()); - this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded, this.getProfilerSupplier()); -+ this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang Profiler -+ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang Profiler ++ this.blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler ++ this.fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded/*, this.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler + this.pathTypesByPosCache = new PathTypeCache(); this.navigatingMobs = new ObjectOpenHashSet(); this.blockEvents = new ObjectLinkedOpenHashSet(); - this.blockEventsToReschedule = new ArrayList(64); diff --git a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java -index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..dcbb7f0aadf106ecfe0a0935213e6143b84688aa 100644 +index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..097d7101c802070f554345057bf34dcb6f504cf3 100644 --- a/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java +++ b/src/main/java/net/minecraft/server/packs/resources/PreparableReloadListener.java @@ -2,14 +2,14 @@ package net.minecraft.server.packs.resources; @@ -432,7 +427,7 @@ index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..dcbb7f0aadf106ecfe0a0935213e6143 import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler public interface PreparableReloadListener { CompletableFuture reload( @@ -440,13 +435,13 @@ index 60d33ac7ab7b610e9d5104ac9c7029ba4fc26cdf..dcbb7f0aadf106ecfe0a0935213e6143 ResourceManager manager, - ProfilerFiller prepareProfiler, - ProfilerFiller applyProfiler, -+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang Profiler -+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang Profiler ++ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler ++ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler Executor prepareExecutor, Executor applyExecutor ); diff --git a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java -index 0c25f3ed0a8a538edc7cadd3476100c9b3631f7a..dd6229790a66c1f4cb726f4606b188308683dfb0 100644 +index 0c25f3ed0a8a538edc7cadd3476100c9b3631f7a..ea73502f9e2ac9422031ebc24bf94aaae34e6ba2 100644 --- a/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java +++ b/src/main/java/net/minecraft/server/packs/resources/ResourceManagerReloadListener.java @@ -3,15 +3,15 @@ package net.minecraft.server.packs.resources; @@ -454,7 +449,7 @@ index 0c25f3ed0a8a538edc7cadd3476100c9b3631f7a..dd6229790a66c1f4cb726f4606b18830 import java.util.concurrent.Executor; import net.minecraft.util.Unit; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler public interface ResourceManagerReloadListener extends PreparableReloadListener { @Override @@ -463,13 +458,13 @@ index 0c25f3ed0a8a538edc7cadd3476100c9b3631f7a..dd6229790a66c1f4cb726f4606b18830 ResourceManager manager, - ProfilerFiller prepareProfiler, - ProfilerFiller applyProfiler, -+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang Profiler -+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang Profiler ++ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler ++ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler Executor prepareExecutor, Executor applyExecutor ) { diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java -index 8246e06392c06f70309c1876561bd00b59ba589f..027a0f2cb9c02fe0af7ba9e3824682aee30495ec 100644 +index 8246e06392c06f70309c1876561bd00b59ba589f..0df1be595c6784f06eab328f6b7f6f62a5e056ec 100644 --- a/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java +++ b/src/main/java/net/minecraft/server/packs/resources/SimpleJsonResourceReloadListener.java @@ -12,7 +12,7 @@ import java.util.Map.Entry; @@ -477,7 +472,7 @@ index 8246e06392c06f70309c1876561bd00b59ba589f..027a0f2cb9c02fe0af7ba9e3824682ae import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import org.slf4j.Logger; public abstract class SimpleJsonResourceReloadListener extends SimplePreparableReloadListener> { @@ -486,12 +481,12 @@ index 8246e06392c06f70309c1876561bd00b59ba589f..027a0f2cb9c02fe0af7ba9e3824682ae @Override - protected Map prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) { -+ protected Map prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Mojang Profiler ++ protected Map prepare(ResourceManager resourceManager/*, ProfilerFiller profilerFiller*/) { // Plazma - Completely remove Mojang's Profiler Map map = new HashMap<>(); scanDirectory(resourceManager, this.directory, this.gson, map); return map; diff --git a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java -index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..2b3aef017a31dbf859c0525de6f24cd2b971236d 100644 +index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..2bd55b0353b6db1e2d1ae7d7e0890c352283dc7f 100644 --- a/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java +++ b/src/main/java/net/minecraft/server/packs/resources/SimplePreparableReloadListener.java @@ -2,24 +2,24 @@ package net.minecraft.server.packs.resources; @@ -499,7 +494,7 @@ index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..2b3aef017a31dbf859c0525de6f24cd2 import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler public abstract class SimplePreparableReloadListener implements PreparableReloadListener { @Override @@ -508,26 +503,26 @@ index 298e3eddd600f0b2e48ce2d4080cf68adff59a3a..2b3aef017a31dbf859c0525de6f24cd2 ResourceManager manager, - ProfilerFiller prepareProfiler, - ProfilerFiller applyProfiler, -+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang Profiler -+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang Profiler ++ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler ++ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler Executor prepareExecutor, Executor applyExecutor ) { - return CompletableFuture.supplyAsync(() -> this.prepare(manager, prepareProfiler), prepareExecutor) -+ return CompletableFuture.supplyAsync(() -> this.prepare(manager/*, prepareProfiler*/), prepareExecutor) // Plazma - Completely remove Mojang Profiler ++ return CompletableFuture.supplyAsync(() -> this.prepare(manager/*, prepareProfiler*/), prepareExecutor) // Plazma - Completely remove Mojang's Profiler .thenCompose(synchronizer::wait) - .thenAcceptAsync(prepared -> this.apply((T)prepared, manager, applyProfiler), applyExecutor); -+ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager/*, applyProfiler*/), applyExecutor); // Plazma - Completely remove Mojang Profiler ++ .thenAcceptAsync(prepared -> this.apply((T)prepared, manager/*, applyProfiler*/), applyExecutor); // Plazma - Completely remove Mojang's Profiler } - protected abstract T prepare(ResourceManager manager, ProfilerFiller profiler); -+ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang Profiler ++ protected abstract T prepare(ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang's Profiler - protected abstract void apply(T prepared, ResourceManager manager, ProfilerFiller profiler); -+ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang Profiler ++ protected abstract void apply(T prepared, ResourceManager manager/*, ProfilerFiller profiler*/); // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java -index 5a8ed7c2a0217366c0d7e6341006037c114f8097..138be404edcac9c6a9e8080114ce742ebc4c2e95 100644 +index 5a8ed7c2a0217366c0d7e6341006037c114f8097..8f3990ca74d00d8566255687a778b4ed749bbde0 100644 --- a/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java +++ b/src/main/java/net/minecraft/server/packs/resources/SimpleReloadInstance.java @@ -10,7 +10,7 @@ import java.util.concurrent.Executor; @@ -535,7 +530,7 @@ index 5a8ed7c2a0217366c0d7e6341006037c114f8097..138be404edcac9c6a9e8080114ce742e import net.minecraft.Util; import net.minecraft.util.Unit; -import net.minecraft.util.profiling.InactiveProfiler; -+//import net.minecraft.util.profiling.InactiveProfiler; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.InactiveProfiler; // Plazma - Completely remove Mojang's Profiler public class SimpleReloadInstance implements ReloadInstance { private static final int PREPARATION_PROGRESS_WEIGHT = 2; @@ -549,7 +544,7 @@ index 5a8ed7c2a0217366c0d7e6341006037c114f8097..138be404edcac9c6a9e8080114ce742e initialStage ); diff --git a/src/main/java/net/minecraft/tags/TagManager.java b/src/main/java/net/minecraft/tags/TagManager.java -index 7b9b8a6824fe5587773c1108628a0144d94169a1..d960cf466ffbdcf3f157b6e410eb0755d09543a3 100644 +index cd178d9a30263a3fc68d2b997974a1f9a0c8bab5..f81cd35f9babe7906d3738aa135ac88d78cdfdab 100644 --- a/src/main/java/net/minecraft/tags/TagManager.java +++ b/src/main/java/net/minecraft/tags/TagManager.java @@ -14,7 +14,7 @@ import net.minecraft.resources.ResourceKey; @@ -557,7 +552,7 @@ index 7b9b8a6824fe5587773c1108628a0144d94169a1..d960cf466ffbdcf3f157b6e410eb0755 import net.minecraft.server.packs.resources.PreparableReloadListener; import net.minecraft.server.packs.resources.ResourceManager; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler public class TagManager implements PreparableReloadListener { private static final Map>, String> CUSTOM_REGISTRY_DIRECTORIES = Map.of( @@ -567,19 +562,19 @@ index 7b9b8a6824fe5587773c1108628a0144d94169a1..d960cf466ffbdcf3f157b6e410eb0755 ResourceManager manager, - ProfilerFiller prepareProfiler, - ProfilerFiller applyProfiler, -+ //ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang Profiler -+ //ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang Profiler ++ // ProfilerFiller prepareProfiler, // Plazma - Completely remove Mojang's Profiler ++ // ProfilerFiller applyProfiler, // Plazma - Completely remove Mojang's Profiler Executor prepareExecutor, Executor applyExecutor ) { diff --git a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java -index 600a7036b503f60cc9c95f189f73c2dbf020e2e1..5d8dddca2a9e3a3440ccd2a2fd565f2afcffbb40 100644 +index 600a7036b503f60cc9c95f189f73c2dbf020e2e1..bbc7e78d38a720b00456efd71f7d8ee36bf967ff 100644 --- a/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java +++ b/src/main/java/net/minecraft/util/profiling/ActiveProfiler.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.mojang.logging.LogUtils; @@ -587,10 +582,10 @@ index 600a7036b503f60cc9c95f189f73c2dbf020e2e1..5d8dddca2a9e3a3440ccd2a2fd565f2a import net.minecraft.util.profiling.metrics.MetricCategory; import org.apache.commons.lang3.tuple.Pair; import org.slf4j.Logger; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class ActiveProfiler implements ProfileCollector { -+interface ActiveProfiler {/* implements ProfileCollector { // Plazma - Completely remove Mojang Profiler ++interface ActiveProfiler {/* implements ProfileCollector { // Plazma - Completely remove Mojang's Profiler private static final long WARNING_TIME_NANOS = Duration.ofMillis(100L).toNanos(); private static final Logger LOGGER = LogUtils.getLogger(); private final List paths = Lists.newArrayList(); @@ -598,22 +593,22 @@ index 600a7036b503f60cc9c95f189f73c2dbf020e2e1..5d8dddca2a9e3a3440ccd2a2fd565f2a return Object2LongMaps.unmodifiable(this.counters); } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java b/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java -index 4424bca7effa4fef26453afcd06d86e6a30d7b8f..e8e662b07d9a31bbaa6e3bcc22c0b036dfe4def6 100644 +index 4424bca7effa4fef26453afcd06d86e6a30d7b8f..04012ab769a21bff11305fb4f01e72f71e3b5bd8 100644 --- a/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java +++ b/src/main/java/net/minecraft/util/profiling/ContinuousProfiler.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.util.function.IntSupplier; import java.util.function.LongSupplier; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class ContinuousProfiler { -+interface ContinuousProfiler { /* // Plazma - Completely remove Mojang Profiler ++interface ContinuousProfiler { /* // Plazma - Completely remove Mojang's Profiler private final LongSupplier realTime; private final IntSupplier tickCount; private ProfileCollector profiler = InactiveProfiler.INSTANCE; @@ -621,23 +616,23 @@ index 4424bca7effa4fef26453afcd06d86e6a30d7b8f..e8e662b07d9a31bbaa6e3bcc22c0b036 public ProfileResults getResults() { return this.profiler.getResults(); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java b/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java -index 843e28baf089349851d7794c496e518ca396e92d..3bfd3d5d88a8b9ba790693ee45b7f21f87a34e5a 100644 +index 843e28baf089349851d7794c496e518ca396e92d..25d0ffdfdd50cfd794f735a00bc0131a102d7911 100644 --- a/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java +++ b/src/main/java/net/minecraft/util/profiling/EmptyProfileResults.java @@ -1,10 +1,12 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.nio.file.Path; import java.util.Collections; import java.util.List; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class EmptyProfileResults implements ProfileResults { -+interface EmptyProfileResults { /*implements ProfileResults { // Plazma - Completely remove Mojang Profiler ++interface EmptyProfileResults { /*implements ProfileResults { // Plazma - Completely remove Mojang's Profiler public static final EmptyProfileResults EMPTY = new EmptyProfileResults(); private EmptyProfileResults() { @@ -645,16 +640,16 @@ index 843e28baf089349851d7794c496e518ca396e92d..3bfd3d5d88a8b9ba790693ee45b7f21f public String getProfilerResults() { return ""; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java b/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java -index fc3a3a32e6432c284b29216989385f8b0993c315..50fc93ec6bedccb74ec0347299c148daf0fb5abb 100644 +index fc3a3a32e6432c284b29216989385f8b0993c315..ac32c5e8aab03f949b7848cac35e475f30810ecb 100644 --- a/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java +++ b/src/main/java/net/minecraft/util/profiling/FilledProfileResults.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.google.common.base.Splitter; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -662,10 +657,10 @@ index fc3a3a32e6432c284b29216989385f8b0993c315..50fc93ec6bedccb74ec0347299c148da import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ObjectUtils; import org.slf4j.Logger; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class FilledProfileResults implements ProfileResults { -+interface FilledProfileResults {/* implements ProfileResults { // Plazma - Completely remove Mojang Profiler ++interface FilledProfileResults {/* implements ProfileResults { // Plazma - Completely remove Mojang's Profiler private static final Logger LOGGER = LogUtils.getLogger(); private static final ProfilerPathEntry EMPTY = new ProfilerPathEntry() { @Override @@ -673,26 +668,26 @@ index fc3a3a32e6432c284b29216989385f8b0993c315..50fc93ec6bedccb74ec0347299c148da } } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java b/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java -index 5d2d8018460c04f7314c872441a8b21bc296c1ea..bbab8ea9b07cca407c8b0a5a62cd7cf2e712e0cf 100644 +index 5d2d8018460c04f7314c872441a8b21bc296c1ea..124beebb323e39b7cc9cc123019cb32d13b384cb 100644 --- a/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java +++ b/src/main/java/net/minecraft/util/profiling/InactiveProfiler.java @@ -1,13 +1,15 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.google.common.collect.ImmutableSet; import java.util.Set; import java.util.function.Supplier; import javax.annotation.Nullable; import net.minecraft.util.profiling.metrics.MetricCategory; import org.apache.commons.lang3.tuple.Pair; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class InactiveProfiler implements ProfileCollector { -+interface InactiveProfiler { /* implements ProfileCollector { // Plazma - Completely remove Mojang Profiler ++interface InactiveProfiler { /* implements ProfileCollector { // Plazma - Completely remove Mojang's Profiler public static final InactiveProfiler INSTANCE = new InactiveProfiler(); private InactiveProfiler() { @@ -700,46 +695,46 @@ index 5d2d8018460c04f7314c872441a8b21bc296c1ea..bbab8ea9b07cca407c8b0a5a62cd7cf2 public Set> getChartedPaths() { return ImmutableSet.of(); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ProfileCollector.java b/src/main/java/net/minecraft/util/profiling/ProfileCollector.java -index fe47a3ce6318ad74bd4d9b10dbf5ee06c94b6939..eb3287d06f2072624a95d3a15355cab8c6cadf31 100644 +index fe47a3ce6318ad74bd4d9b10dbf5ee06c94b6939..b3c84a9bca9b66c58837b94732bd9be12c213029 100644 --- a/src/main/java/net/minecraft/util/profiling/ProfileCollector.java +++ b/src/main/java/net/minecraft/util/profiling/ProfileCollector.java @@ -1,15 +1,18 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.util.Set; import javax.annotation.Nullable; import net.minecraft.util.profiling.metrics.MetricCategory; import org.apache.commons.lang3.tuple.Pair; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public interface ProfileCollector extends ProfilerFiller { -+interface ProfileCollector { /* extends ProfilerFiller { // Plazma - Completely remove Mojang Profiler ++interface ProfileCollector { /* extends ProfilerFiller { // Plazma - Completely remove Mojang's Profiler ProfileResults getResults(); @Nullable ActiveProfiler.PathEntry getEntry(String name); Set> getChartedPaths(); -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ProfileResults.java b/src/main/java/net/minecraft/util/profiling/ProfileResults.java -index afefd549cf9792a91dd8919c12697a693200d042..0e81cf4d0cbf23eae5b9713a8f969742c7e63dec 100644 +index afefd549cf9792a91dd8919c12697a693200d042..46c2447650e108065a19420a71e29775f69c746f 100644 --- a/src/main/java/net/minecraft/util/profiling/ProfileResults.java +++ b/src/main/java/net/minecraft/util/profiling/ProfileResults.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.nio.file.Path; import java.util.List; + */ -public interface ProfileResults { -+interface ProfileResults { /* { // Plazma - Completely remove Mojang Profiler ++interface ProfileResults { /* { // Plazma - Completely remove Mojang's Profiler char PATH_SEPARATOR = '\u001e'; List getTimes(String parentPath); @@ -747,22 +742,22 @@ index afefd549cf9792a91dd8919c12697a693200d042..0e81cf4d0cbf23eae5b9713a8f969742 static String demanglePath(String path) { return path.replace('\u001e', '.'); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java -index 223c3665126c576eddb1a8f7c9f5bc60c6ff9818..7fc5aa5b468186d793ebbdbafbf757367a6f9b1a 100644 +index 223c3665126c576eddb1a8f7c9f5bc60c6ff9818..7623bbd58d9a95e04e9260f85d39e5f9ebb1c75b 100644 --- a/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java +++ b/src/main/java/net/minecraft/util/profiling/ProfilerFiller.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.util.function.Supplier; import net.minecraft.util.profiling.metrics.MetricCategory; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public interface ProfilerFiller { -+interface ProfilerFiller { /* // Plazma - Completely remove Mojang Profiler ++interface ProfilerFiller { /* // Plazma - Completely remove Mojang's Profiler String ROOT = "root"; @io.papermc.paper.annotation.DoNotUse // Purpur @@ -770,20 +765,20 @@ index 223c3665126c576eddb1a8f7c9f5bc60c6ff9818..7fc5aa5b468186d793ebbdbafbf75736 }; } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java b/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java -index c073262f663309e6f73e67b303927b3996ea0c16..c2788315122e34ba4725e9fdbb4f471e0a168aff 100644 +index c073262f663309e6f73e67b303927b3996ea0c16..2fae8377f0cb3ff22c2d4e2b8e8322f76e00f5ff 100644 --- a/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java +++ b/src/main/java/net/minecraft/util/profiling/ProfilerPathEntry.java @@ -1,8 +1,8 @@ package net.minecraft.util.profiling; -import it.unimi.dsi.fastutil.objects.Object2LongMap; -+// import it.unimi.dsi.fastutil.objects.Object2LongMap; // Plazma - Completely remove Mojang Profiler ++// import it.unimi.dsi.fastutil.objects.Object2LongMap; // Plazma - Completely remove Mojang's Profiler -public interface ProfilerPathEntry { -+interface ProfilerPathEntry { /* // Plazma - Completely remove Mojang Profiler ++interface ProfilerPathEntry { /* // Plazma - Completely remove Mojang's Profiler long getDuration(); long getMaxDuration(); @@ -791,17 +786,17 @@ index c073262f663309e6f73e67b303927b3996ea0c16..c2788315122e34ba4725e9fdbb4f471e long getCount(); Object2LongMap getCounters(); -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/ResultField.java b/src/main/java/net/minecraft/util/profiling/ResultField.java -index 179dd48aeeacc0b2a42c99f6213dd23683159681..9e225f5181465032bc517bc2dec3ec129375a0ad 100644 +index 179dd48aeeacc0b2a42c99f6213dd23683159681..892926e44cc8a271a839881e108f6aa8420f60e6 100644 --- a/src/main/java/net/minecraft/util/profiling/ResultField.java +++ b/src/main/java/net/minecraft/util/profiling/ResultField.java @@ -1,6 +1,6 @@ package net.minecraft.util.profiling; -public final class ResultField implements Comparable { -+interface ResultField { /* implements Comparable { // Plazma - Completely remove Mojang Profiler ++interface ResultField { /* implements Comparable { // Plazma - Completely remove Mojang's Profiler public final double percentage; public final double globalPercentage; public final long count; @@ -809,26 +804,26 @@ index 179dd48aeeacc0b2a42c99f6213dd23683159681..9e225f5181465032bc517bc2dec3ec12 public int getColor() { return (this.name.hashCode() & 11184810) + 4473924; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java b/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java -index 563d82c9153c88b651d6991caae4374c285a3065..b590a585dd4fd07a84e5971586c9a31c2a4273f0 100644 +index 563d82c9153c88b651d6991caae4374c285a3065..a028709d3e1fba0e697b8ad097efb95311a2403e 100644 --- a/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java +++ b/src/main/java/net/minecraft/util/profiling/SingleTickProfiler.java @@ -1,13 +1,15 @@ package net.minecraft.util.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.mojang.logging.LogUtils; import java.io.File; import java.util.function.LongSupplier; import javax.annotation.Nullable; import net.minecraft.Util; import org.slf4j.Logger; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class SingleTickProfiler { -+interface SingleTickProfiler { /* // Plazma - Completely remove Mojang Profiler ++interface SingleTickProfiler { /* // Plazma - Completely remove Mojang's Profiler private static final Logger LOGGER = LogUtils.getLogger(); private final LongSupplier realTime; private final long saveThreshold; @@ -836,17 +831,17 @@ index 563d82c9153c88b651d6991caae4374c285a3065..b590a585dd4fd07a84e5971586c9a31c public static ProfilerFiller decorateFiller(ProfilerFiller profiler, @Nullable SingleTickProfiler monitor) { return monitor != null ? ProfilerFiller.tee(monitor.startTick(), profiler) : profiler; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java -index 6c40f626197337826f2172211b9b05015ff659bd..a6a17ee7dcd464095bb26cd8f77b1c9b3a923389 100644 +index fc84538abcb3e8617e91a4b54c968f1ab2900cf8..b2e626bb31ffef87175fbd1aa316062a445c032d 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricCategory.java @@ -1,6 +1,6 @@ package net.minecraft.util.profiling.metrics; -public enum MetricCategory { -+interface MetricCategory { /* // Plazma - Completely remove Mojang Profiler ++interface MetricCategory { /* // Plazma - Completely remove Mojang's Profiler PATH_FINDING("pathfinding"), EVENT_LOOPS("event-loops"), MAIL_BOXES("mailboxes"), @@ -854,16 +849,16 @@ index 6c40f626197337826f2172211b9b05015ff659bd..a6a17ee7dcd464095bb26cd8f77b1c9b public String getDescription() { return this.description; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java -index dd2bf15d22e5839ca986d3e824fb785786af86c8..1c9a40dfb43fa5bd473f59db365ecf08297bac3d 100644 +index dd2bf15d22e5839ca986d3e824fb785786af86c8..4e6d03e2e7975ad2299f3ca9944c3e29f6d24eb7 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricSampler.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling.metrics; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufAllocator; import it.unimi.dsi.fastutil.ints.Int2DoubleMap; @@ -871,10 +866,10 @@ index dd2bf15d22e5839ca986d3e824fb785786af86c8..1c9a40dfb43fa5bd473f59db365ecf08 import java.util.function.DoubleSupplier; import java.util.function.ToDoubleFunction; import javax.annotation.Nullable; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class MetricSampler { -+interface MetricSampler { /* // Plazma - Completely remove Mojang Profiler ++interface MetricSampler { /* // Plazma - Completely remove Mojang's Profiler private final String name; private final MetricCategory category; private final DoubleSupplier sampler; @@ -882,10 +877,10 @@ index dd2bf15d22e5839ca986d3e824fb785786af86c8..1c9a40dfb43fa5bd473f59db365ecf08 return bl2; } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java -index c22a91ee393744a4eaffe1fff168b18ac1bc55bd..d2e6a7b661d1d3166a58cc3cc681bebdb229215c 100644 +index c22a91ee393744a4eaffe1fff168b18ac1bc55bd..f93afd84b47041f6ccc6a651fbe1831931befbc7 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricsRegistry.java @@ -1,13 +1,15 @@ @@ -898,10 +893,10 @@ index c22a91ee393744a4eaffe1fff168b18ac1bc55bd..d2e6a7b661d1d3166a58cc3cc681bebd import java.util.WeakHashMap; import java.util.stream.Collectors; import javax.annotation.Nullable; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class MetricsRegistry { -+interface MetricsRegistry { /* // Plazma - Completely remove Mojang Profiler ++interface MetricsRegistry { /* // Plazma - Completely remove Mojang's Profiler public static final MetricsRegistry INSTANCE = new MetricsRegistry(); private final WeakHashMap measuredInstances = new WeakHashMap<>(); @@ -909,28 +904,28 @@ index c22a91ee393744a4eaffe1fff168b18ac1bc55bd..d2e6a7b661d1d3166a58cc3cc681bebd return Objects.hash(super.hashCode(), this.delegates); } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java b/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java -index 07f78c451e5330296c38f6b599d979610a03381f..54f78126dda64bb5f624eb8bd88b310b22c8c973 100644 +index 07f78c451e5330296c38f6b599d979610a03381f..b6ea87aa3fef7b03ec83d789b9ce588f1b2d9b13 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/MetricsSamplerProvider.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling.metrics; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.util.Set; import java.util.function.Supplier; import net.minecraft.util.profiling.ProfileCollector; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public interface MetricsSamplerProvider { - Set samplers(Supplier profilerSupplier); +interface MetricsSamplerProvider { -+ //Set samplers(Supplier profilerSupplier); // Plazma - Completely remove Mojang Profiler ++ //Set samplers(Supplier profilerSupplier); // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java b/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java -index 3057e9caa1936d114e07b3dfbd0dffd8aca1223c..4103faed61d1c2296bf46ce99ee8d165be12e839 100644 +index 3057e9caa1936d114e07b3dfbd0dffd8aca1223c..976dcc062391c6b3a05a8848b029ee8424cda63b 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/ProfilerMeasured.java @@ -2,6 +2,6 @@ package net.minecraft.util.profiling.metrics; @@ -939,17 +934,17 @@ index 3057e9caa1936d114e07b3dfbd0dffd8aca1223c..4103faed61d1c2296bf46ce99ee8d165 -public interface ProfilerMeasured { - List profiledMetrics(); -+interface ProfilerMeasured { // Plazma - Completely remove Mojang Profiler -+ // List profiledMetrics(); // Plazma - Completely remove Mojang Profiler ++interface ProfilerMeasured { // Plazma - Completely remove Mojang's Profiler ++ // List profiledMetrics(); // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java -index 9b8e774dfbfc9e06e9bf04ff789737511d6966ba..a42cbf219342bf12fc0d36ba5a4d394cf0562e17 100644 +index 9b8e774dfbfc9e06e9bf04ff789737511d6966ba..746b7f8a136d2611e1d72e71425ee32a219454dd 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ActiveMetricsRecorder.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling.metrics.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -957,10 +952,10 @@ index 9b8e774dfbfc9e06e9bf04ff789737511d6966ba..a42cbf219342bf12fc0d36ba5a4d394c import net.minecraft.util.profiling.metrics.MetricsSamplerProvider; import net.minecraft.util.profiling.metrics.storage.MetricsPersister; import net.minecraft.util.profiling.metrics.storage.RecordedDeviation; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class ActiveMetricsRecorder implements MetricsRecorder { -+interface ActiveMetricsRecorder {/*implements MetricsRecorder { // Plazma - Completely remove Mojang Profiler ++interface ActiveMetricsRecorder {/*implements MetricsRecorder { // Plazma - Completely remove Mojang's Profiler public static final int PROFILING_MAX_DURATION_SECONDS = 10; @Nullable private static Consumer globalOnReportFinished = null; @@ -968,22 +963,22 @@ index 9b8e774dfbfc9e06e9bf04ff789737511d6966ba..a42cbf219342bf12fc0d36ba5a4d394c public static void registerGlobalCompletionCallback(Consumer consumer) { globalOnReportFinished = consumer; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java -index 12d7b7c86115b667bd8f940206985d9ed4b837d4..cf58add13a2de5db5e9db1712cef7d1c203ec6db 100644 +index 12d7b7c86115b667bd8f940206985d9ed4b837d4..0feece395aaaec1be498af95454238270c0bfd01 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/InactiveMetricsRecorder.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling.metrics.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import net.minecraft.util.profiling.InactiveProfiler; import net.minecraft.util.profiling.ProfilerFiller; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class InactiveMetricsRecorder implements MetricsRecorder { -+interface InactiveMetricsRecorder { /* implements MetricsRecorder { // Plazma - Completely remove Mojang Profiler ++interface InactiveMetricsRecorder { /* implements MetricsRecorder { // Plazma - Completely remove Mojang's Profiler public static final MetricsRecorder INSTANCE = new InactiveMetricsRecorder(); @Override @@ -991,20 +986,20 @@ index 12d7b7c86115b667bd8f940206985d9ed4b837d4..cf58add13a2de5db5e9db1712cef7d1c @Override public void endTick() { } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java -index 48e7211e01691a677c52cf1f5982b0c179eaf83b..f9f64aa5d8a8215d4a7f549c4a2cde2993df17f4 100644 +index 48e7211e01691a677c52cf1f5982b0c179eaf83b..9aa963c3e8d58832d4b0ce1e7f1122eee3773928 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/MetricsRecorder.java @@ -1,8 +1,8 @@ package net.minecraft.util.profiling.metrics.profiling; -import net.minecraft.util.profiling.ProfilerFiller; -+// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler -public interface MetricsRecorder { -+interface MetricsRecorder { /* // Plazma - Completely remove Mojang Profiler ++interface MetricsRecorder { /* // Plazma - Completely remove Mojang's Profiler void end(); void cancel(); @@ -1012,16 +1007,16 @@ index 48e7211e01691a677c52cf1f5982b0c179eaf83b..f9f64aa5d8a8215d4a7f549c4a2cde29 ProfilerFiller getProfiler(); void endTick(); -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java -index cf47ee0f4ec9ffb130b04c7cf92e7907f9b791ef..db2e6ac76b31c15767a202b7426555ae9cf9fa93 100644 +index cf47ee0f4ec9ffb130b04c7cf92e7907f9b791ef..63cbfb116ac524498eac756ae95f1e0a19aed7fa 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ProfilerSamplerAdapter.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling.metrics.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; import java.util.Set; import java.util.function.Supplier; @@ -1029,10 +1024,10 @@ index cf47ee0f4ec9ffb130b04c7cf92e7907f9b791ef..db2e6ac76b31c15767a202b7426555ae import net.minecraft.util.profiling.ProfileCollector; import net.minecraft.util.profiling.metrics.MetricCategory; import net.minecraft.util.profiling.metrics.MetricSampler; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class ProfilerSamplerAdapter { -+interface ProfilerSamplerAdapter {/* // Plazma - Completely remove Mojang Profiler ++interface ProfilerSamplerAdapter {/* // Plazma - Completely remove Mojang's Profiler private final Set previouslyFoundSamplerNames = new ObjectOpenHashSet<>(); public Set newSamplersFoundInProfiler(Supplier profilerSupplier) { @@ -1040,16 +1035,16 @@ index cf47ee0f4ec9ffb130b04c7cf92e7907f9b791ef..db2e6ac76b31c15767a202b7426555ae return pathEntry == null ? 0.0 : (double)pathEntry.getMaxDuration() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND; }); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java -index 978412a8b9e24d7d79c94911f0cf7d20796389e1..c8bcf6f053beb3197fdfaec629f0896199b34165 100644 +index 978412a8b9e24d7d79c94911f0cf7d20796389e1..7bcbb6d4a828cf65ff2599554e24c1228657fa73 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/profiling/ServerMetricsSamplersProvider.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling.metrics.profiling; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.google.common.base.Stopwatch; import com.google.common.base.Ticker; import com.google.common.collect.ImmutableSet; @@ -1057,7 +1052,7 @@ index 978412a8b9e24d7d79c94911f0cf7d20796389e1..c8bcf6f053beb3197fdfaec629f08961 import org.slf4j.Logger; import oshi.SystemInfo; import oshi.hardware.CentralProcessor; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class ServerMetricsSamplersProvider implements MetricsSamplerProvider { +interface ServerMetricsSamplersProvider {/*implements MetricsSamplerProvider { @@ -1068,16 +1063,16 @@ index 978412a8b9e24d7d79c94911f0cf7d20796389e1..c8bcf6f053beb3197fdfaec629f08961 return this.currentLoad[index] * 100.0; } } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java b/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java -index 8579309bf1b6ad0e42aa9431a8d274ee810911fd..9f030526c7dec8ecca146a034c1266de6b15dafc 100644 +index 8579309bf1b6ad0e42aa9431a8d274ee810911fd..176e04d4e18eae86dd0e3c57831512aae5f0b19c 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/storage/MetricsPersister.java @@ -1,5 +1,6 @@ package net.minecraft.util.profiling.metrics.storage; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import com.mojang.logging.LogUtils; import java.io.IOException; import java.io.UncheckedIOException; @@ -1085,10 +1080,10 @@ index 8579309bf1b6ad0e42aa9431a8d274ee810911fd..9f030526c7dec8ecca146a034c1266de import net.minecraft.util.profiling.metrics.MetricSampler; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public class MetricsPersister { -+interface MetricsPersister { /* // Plazma - Completely remove Mojang Profiler ++interface MetricsPersister { /* // Plazma - Completely remove Mojang's Profiler public static final Path PROFILING_RESULTS_DIR = Paths.get("debug/profiling"); public static final String METRICS_DIR_NAME = "metrics"; public static final String DEVIATIONS_DIR_NAME = "deviations"; @@ -1096,22 +1091,22 @@ index 8579309bf1b6ad0e42aa9431a8d274ee810911fd..9f030526c7dec8ecca146a034c1266de private void saveProfilingTaskExecutionResult(ProfileResults result, Path directory) { result.saveResults(directory.resolve("profiling.txt")); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java b/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java -index f012d23b22b1a9d1acb6c020c66dc727f7fe9e1a..0f8874fa65e2614388cdf3f79d714b600697191e 100644 +index f012d23b22b1a9d1acb6c020c66dc727f7fe9e1a..9be6accd64c6669a7e63e8e78889b958464f039f 100644 --- a/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java +++ b/src/main/java/net/minecraft/util/profiling/metrics/storage/RecordedDeviation.java @@ -1,9 +1,11 @@ package net.minecraft.util.profiling.metrics.storage; -+/* // Plazma - Completely remove Mojang Profiler ++/* // Plazma - Completely remove Mojang's Profiler import java.time.Instant; import net.minecraft.util.profiling.ProfileResults; -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler -public final class RecordedDeviation { -+interface RecordedDeviation { /* // Plazma - Completely remove Mojang Profiler ++interface RecordedDeviation { /* // Plazma - Completely remove Mojang's Profiler public final Instant timestamp; public final int tick; public final ProfileResults profilerResultAtTick; @@ -1119,53 +1114,53 @@ index f012d23b22b1a9d1acb6c020c66dc727f7fe9e1a..0f8874fa65e2614388cdf3f79d714b60 this.tick = ticks; this.profilerResultAtTick = result; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java -index d0dbe7e3c7c9c2727d5de456808765b2666108e4..698fb4881fe754502196fcc93fa636ba4e858cdd 100644 +index 43487a9ee202c5b0e5a416519939111f77b3059c..dee5cab2d8e28d968de5beb7084efeaf1a20da3a 100644 --- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java +++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java -@@ -10,13 +10,13 @@ import java.util.concurrent.Executor; - import java.util.concurrent.locks.LockSupport; +@@ -11,13 +11,13 @@ import java.util.concurrent.locks.LockSupport; import java.util.function.BooleanSupplier; import java.util.function.Supplier; + import javax.annotation.CheckReturnValue; -import net.minecraft.util.profiling.metrics.MetricCategory; -import net.minecraft.util.profiling.metrics.MetricSampler; -import net.minecraft.util.profiling.metrics.MetricsRegistry; -import net.minecraft.util.profiling.metrics.ProfilerMeasured; -+// import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang Profiler -+// import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang's Profiler import org.slf4j.Logger; -public abstract class BlockableEventLoop implements ProfilerMeasured, ProcessorHandle, Executor { -+public abstract class BlockableEventLoop implements /*ProfilerMeasured,*/ ProcessorHandle, Executor { // Plazma - Completely remove Mojang Profiler ++public abstract class BlockableEventLoop implements /*ProfilerMeasured,*/ ProcessorHandle, Executor { // Plazma - Completely remove Mojang's Profiler private final String name; private static final Logger LOGGER = LogUtils.getLogger(); private final Queue pendingRunnables = Queues.newConcurrentLinkedQueue(); -@@ -24,7 +24,7 @@ public abstract class BlockableEventLoop implements Profiler +@@ -25,7 +25,7 @@ public abstract class BlockableEventLoop implements Profiler protected BlockableEventLoop(String name) { this.name = name; - MetricsRegistry.INSTANCE.add(this); -+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang Profiler ++ // MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang's Profiler } protected abstract R wrapRunnable(Runnable runnable); -@@ -153,8 +153,10 @@ public abstract class BlockableEventLoop implements Profiler +@@ -155,8 +155,10 @@ public abstract class BlockableEventLoop implements Profiler } } -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profiler @Override public List profiledMetrics() { return ImmutableList.of(MetricSampler.create(this.name + "-pending-tasks", MetricCategory.EVENT_LOOPS, this::getPendingTasksCount)); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java -index 97c129f5949ca7cb7430e1cf56e881c00f129530..45d6803d6627c383ea99c74699994ee08acd9afe 100644 +index 97c129f5949ca7cb7430e1cf56e881c00f129530..5c4d902a6febe8ffadecbbc64b50ecdc60307588 100644 --- a/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java +++ b/src/main/java/net/minecraft/util/thread/ProcessorMailbox.java @@ -9,13 +9,13 @@ import java.util.concurrent.Executor; @@ -1176,10 +1171,10 @@ index 97c129f5949ca7cb7430e1cf56e881c00f129530..45d6803d6627c383ea99c74699994ee0 -import net.minecraft.util.profiling.metrics.MetricSampler; -import net.minecraft.util.profiling.metrics.MetricsRegistry; -import net.minecraft.util.profiling.metrics.ProfilerMeasured; -+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang Profiler -+//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang Profiler -+//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang Profiler -+//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang's Profiler ++//import net.minecraft.util.profiling.metrics.MetricSampler; // Plazma - Completely remove Mojang's Profiler ++//import net.minecraft.util.profiling.metrics.MetricsRegistry; // Plazma - Completely remove Mojang's Profiler ++//import net.minecraft.util.profiling.metrics.ProfilerMeasured; // Plazma - Completely remove Mojang's Profiler import org.slf4j.Logger; -public class ProcessorMailbox implements ProfilerMeasured, ProcessorHandle, AutoCloseable, Runnable { @@ -1192,7 +1187,7 @@ index 97c129f5949ca7cb7430e1cf56e881c00f129530..45d6803d6627c383ea99c74699994ee0 this.queue = queue; this.name = name; - MetricsRegistry.INSTANCE.add(this); -+ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang Profiler ++ //MetricsRegistry.INSTANCE.add(this); // Plazma - Completely remove Mojang's Profiler } private boolean setAsScheduled() { @@ -1200,142 +1195,139 @@ index 97c129f5949ca7cb7430e1cf56e881c00f129530..45d6803d6627c383ea99c74699994ee0 return this.name; } -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profiler @Override public List profiledMetrics() { return ImmutableList.of(MetricSampler.create(this.name + "-queue-size", MetricCategory.MAIL_BOXES, this::size)); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index dd275ece5887f5215cb785564af27152b29b370e..41ee792f572b13054084b9ad6c6e4cf67ed10290 100644 +index 56da8a4600688efd1987d82d4fcad1757e33f4f2..274ca06fbda0f54805fc82614d43b6e1a4a5d4a8 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -149,8 +149,8 @@ public abstract class Mob extends LivingEntity implements Targeting { - this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.class); +@@ -165,8 +165,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti + this.pathfindingMalus = Maps.newEnumMap(PathType.class); this.restrictCenter = BlockPos.ZERO; this.restrictRadius = -1.0F; - this.goalSelector = new GoalSelector(world.getProfilerSupplier()); - this.targetSelector = new GoalSelector(world.getProfilerSupplier()); -+ this.goalSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang Profiler -+ this.targetSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang Profiler ++ this.goalSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler ++ this.targetSelector = new GoalSelector(/*world.getProfilerSupplier()*/); // Plazma - Completely remove Mojang's Profiler this.lookControl = new org.purpurmc.purpur.controller.LookControllerWASD(this); // Purpur this.moveControl = new org.purpurmc.purpur.controller.MoveControllerWASD(this); // Purpur this.jumpControl = new JumpControl(this); diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -index a2cca3d528625d49411a94e2b6ec578fec9b10da..8f73b73eb472683c9a5cd5aea1d8f57ed7d810ed 100644 +index b4e4670536f6dcea109c029d75d9710cb386f1d0..9155d68c43239b535190cc7cb5ee92c60189f1ac 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java -@@ -12,7 +12,7 @@ import java.util.Map.Entry; +@@ -8,7 +8,7 @@ import java.util.Map; + import java.util.Set; import java.util.function.Predicate; import java.util.function.Supplier; - import java.util.stream.Stream; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler - import org.slf4j.Logger; ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler public class GoalSelector { -@@ -30,7 +30,7 @@ public class GoalSelector { + private static final WrappedGoal NO_GOAL = new WrappedGoal(Integer.MAX_VALUE, new Goal() { +@@ -24,14 +24,16 @@ public class GoalSelector { }; private final Map lockedFlags = new EnumMap<>(Goal.Flag.class); - private final Set availableGoals = Sets.newLinkedHashSet(); + private final Set availableGoals = new ObjectLinkedOpenHashSet<>(); - private final Supplier profiler; -+ //private final Supplier profiler; // Plazma - Completely remove Mojang Profiler - private final EnumSet disabledFlags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. - private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector - private int tickCount; -@@ -38,9 +38,11 @@ public class GoalSelector { - private int curRate; ++ // private final Supplier profiler; // Plazma - Completely remove Mojang's Profiler private static final Goal.Flag[] GOAL_FLAG_VALUES = Goal.Flag.values(); // Paper - remove streams from pathfindergoalselector + private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector + private int curRate; -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profiler public GoalSelector(Supplier profiler) { this.profiler = profiler; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler public void addGoal(int priority, Goal goal) { this.availableGoals.add(new WrappedGoal(priority, goal)); diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java -index d87124f5356180a37e581febc6141fdc5f1395a7..681e3fcd759a26578e054f88e8048e392312b84b 100644 +index a31326e24cb68472c81cd781c5e3041772712862..03323be2a120c53ac5a3607f6154c99d0b990308 100644 --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java -@@ -37,7 +37,7 @@ import net.minecraft.resources.ResourceLocation; +@@ -28,7 +28,7 @@ import net.minecraft.resources.RegistryOps; + import net.minecraft.resources.ResourceLocation; import net.minecraft.server.packs.resources.ResourceManager; import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; - import net.minecraft.util.GsonHelper; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler - - public class RecipeManager extends SimpleJsonResourceReloadListener { - -@@ -51,7 +51,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { - super(RecipeManager.GSON, "recipes"); ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler + import net.minecraft.world.Container; + import net.minecraft.world.item.ItemStack; + import net.minecraft.world.level.Level; +@@ -53,7 +53,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { + this.registries = registryLookup; } - protected void apply(Map prepared, ResourceManager manager, ProfilerFiller profiler) { -+ protected void apply(Map prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Profiler ++ protected void apply(Map prepared, ResourceManager manager/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler this.hasErrors = false; - // CraftBukkit start - SPIGOT-5667 make sure all types are populated and mutable - Map, Object2ObjectLinkedOpenHashMap>> map1 = Maps.newHashMap(); + Builder, RecipeHolder> builder = ImmutableMultimap.builder(); + com.google.common.collect.ImmutableMap.Builder> com_google_common_collect_immutablemap_builder = ImmutableMap.builder(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7578b6d4ee52ebafea16b7eaf88dcedbd1f093d8..16e6716f70d5b9090f29f8b2320302d98dd087c2 100644 +index 79ebec0543f730af403240e9c1c011777464a698..648b21e3a83e0c35be739bd4ebfa930b84b1e4dd 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -36,7 +36,7 @@ import net.minecraft.sounds.SoundSource; +@@ -35,7 +35,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.util.AbortableIterationConsumer; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.DifficultyInstance; import net.minecraft.world.TickRateManager; import net.minecraft.world.damagesource.DamageSource; -@@ -135,7 +135,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - private final ResourceKey dimensionTypeId; +@@ -133,7 +133,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + private final RandomSource threadSafeRandom = RandomSource.createThreadSafe(); private final Holder dimensionTypeRegistration; public final WritableLevelData levelData; - private final Supplier profiler; -+ //private final Supplier profiler; // Plazma - Completely remove Mojang Profiler ++ // private final Supplier profiler; // Plazma - Completely remove Mojang's Profiler public final boolean isClientSide; private final WorldBorder worldBorder; private final BiomeManager biomeManager; -@@ -267,7 +267,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -263,7 +263,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - //protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI + public abstract ResourceKey getTypeKey(); - protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma -+ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, /*Supplier supplier,*/ boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang Profiler ++ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, /*Supplier supplier,*/ boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.function.Function plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma // Plazma - Completely remove Mojang's Profiler this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma - Configurable Plazma -@@ -284,7 +284,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -280,7 +280,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // CraftBukkit end - this.profiler = supplier; -+ //this.profiler = supplier; // Plazma - Completely remove Mojang Profiler ++ // this.profiler = supplier; // Plazma - Completely remove Mojang's Profiler this.levelData = worlddatamutable; this.dimensionTypeRegistration = holder; - this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> { -@@ -1850,6 +1850,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { + final DimensionType dimensionmanager = (DimensionType) holder.value(); +@@ -1841,6 +1841,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profi public ProfilerFiller getProfiler() { - if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur + //if (true || gg.pufferfish.pufferfish.PufferfishConfig.disableMethodProfiler) return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Pufferfish // Purpur // Purpur - TODO: Pufferfish return (ProfilerFiller) this.profiler.get(); -@@ -1858,6 +1859,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1849,6 +1850,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public Supplier getProfilerSupplier() { return this.profiler; } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler @Override public BiomeManager getBiomeManager() { diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java -index c5454b92ca2565461c799d7340160f9fb72c1b0f..9c242badd7e13f522e2b3c501d2fbbf5958b07b3 100644 +index c5454b92ca2565461c799d7340160f9fb72c1b0f..760a4f4b15a02f9cbb7a368961286ae3c64d9db3 100644 --- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java +++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java @@ -8,7 +8,7 @@ import net.minecraft.core.BlockPos; @@ -1343,7 +1335,7 @@ index c5454b92ca2565461c799d7340160f9fb72c1b0f..9c242badd7e13f522e2b3c501d2fbbf5 import net.minecraft.core.SectionPos; import net.minecraft.core.registries.Registries; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.level.biome.Biome; @@ -1351,36 +1343,36 @@ index c5454b92ca2565461c799d7340160f9fb72c1b0f..9c242badd7e13f522e2b3c501d2fbbf5 return this.level.getHeight(); } -+ /* // Plazma - Completely remove Mojang Profiler ++ /* // Plazma - Completely remove Mojang's Profiler public ProfilerFiller getProfiler() { return this.level.getProfiler(); } -+ */ // Plazma - Completely remove Mojang Profiler ++ */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 97724cbd6c1bf172379e98d4a3f6e8cda5cda823..17a13cc7b681afc9131fb919604a352961b81f60 100644 +index fd637415625fdabcac07e120e9168d09c06141d4..e33c7fe50aabdb8223dc96b9d2ac288292024db9 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -25,7 +25,7 @@ import net.minecraft.network.FriendlyByteBuf; +@@ -26,7 +26,7 @@ import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData; import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.entity.Entity; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; -@@ -455,7 +455,7 @@ public class LevelChunk extends ChunkAccess { +@@ -441,7 +441,7 @@ public class LevelChunk extends ChunkAccess { } if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) { - ProfilerFiller gameprofilerfiller = this.level.getProfiler(); -+ //ProfilerFiller gameprofilerfiller = this.level.getProfiler(); // Plazma - Completely remove Mojang Profiler ++ // ProfilerFiller gameprofilerfiller = this.level.getProfiler(); // Plazma - Completely remove Mojang's Profiler //gameprofilerfiller.push("updateSkyLightSources"); // Purpur // Paper - starlight - remove skyLightSources diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -index 2046ac397f5c46cc45f233e36abbdbe717753fc7..2363169eaa8a4bf84810e7b46811ac23ca2d56e8 100644 +index 404080976208c30e9e95e5bee47c2a749e709a45..97a81d749d9fece6283fdd1b0ed89ce04be32c78 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java @@ -12,8 +12,8 @@ import java.util.function.Function; @@ -1389,17 +1381,17 @@ index 2046ac397f5c46cc45f233e36abbdbe717753fc7..2363169eaa8a4bf84810e7b46811ac23 import net.minecraft.core.BlockPos; -import net.minecraft.util.profiling.ProfilerFiller; -import net.minecraft.util.profiling.metrics.MetricCategory; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler -+//import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang Profiler ++// import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler ++// import net.minecraft.util.profiling.metrics.MetricCategory; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.entity.Mob; import net.minecraft.world.level.PathNavigationRegion; @@ -44,7 +44,7 @@ public class PathFinder { - map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getGoal(pos.getX(), pos.getY(), pos.getZ()), pos)); + map.add(new java.util.AbstractMap.SimpleEntry<>(this.nodeEvaluator.getTarget(pos.getX(), pos.getY(), pos.getZ()), pos)); } // Paper end - Perf: remove streams and optimize collection - Path path = this.findPath(world.getProfiler(), node, map, followRange, distance, rangeMultiplier); -+ Path path = this.findPath(/*world.getProfiler(),*/ node, map, followRange, distance, rangeMultiplier); // Plazma - Completely remove Mojang Profiler ++ Path path = this.findPath(/*world.getProfiler(), */node, map, followRange, distance, rangeMultiplier); // Plazma - Completely remove Mojang's Profiler this.nodeEvaluator.done(); return path; } @@ -1408,34 +1400,12 @@ index 2046ac397f5c46cc45f233e36abbdbe717753fc7..2363169eaa8a4bf84810e7b46811ac23 @Nullable // Paper start - Perf: remove streams and optimize collection - private Path findPath(ProfilerFiller profiler, Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { -+ private Path findPath(/*ProfilerFiller profiler,*/ Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { // Plazma - Completely remove Mojang Profiler ++ private Path findPath(/*ProfilerFiller profiler, */Node startNode, List> positions, float followRange, int distance, float rangeMultiplier) { // Plazma - Completely remove Mojang's Profiler //profiler.push("find_path"); // Purpur //profiler.markForCharting(MetricCategory.PATH_FINDING); // Purpur // Set set = positions.keySet(); -diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java -index 3ddf6ab00de2456ebf504985b88994f970e3b5c4..61c36d6d2a4a958ca63adbd2b4f6805261b13909 100644 ---- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java -+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java -@@ -20,7 +20,7 @@ import net.minecraft.server.packs.resources.PreparableReloadListener; - import net.minecraft.server.packs.resources.ResourceManager; - import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener; - import net.minecraft.util.ProblemReporter; --import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler // Plazma - Completely remove Mojang Profiler - import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; - import org.bukkit.craftbukkit.CraftLootTable; - import org.bukkit.craftbukkit.util.CraftNamespacedKey; -@@ -37,7 +37,7 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv - public LootDataManager() {} - - @Override -- public final CompletableFuture reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler, Executor prepareExecutor, Executor applyExecutor) { -+ public final CompletableFuture reload(PreparableReloadListener.PreparationBarrier synchronizer, ResourceManager manager, /*ProfilerFiller prepareProfiler, ProfilerFiller applyProfiler,*/ Executor prepareExecutor, Executor applyExecutor) { // Plazma - Completely remove Mojang Profiler - Map, Map> map = new HashMap(); - CompletableFuture[] acompletablefuture = (CompletableFuture[]) LootDataType.values().map((lootdatatype) -> { - return LootDataManager.scheduleElementParse(lootdatatype, manager, prepareExecutor, map); diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java -index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4be99fa812 100644 +index a6d62abd3102770652f914b9d697c6d3c2533cfc..7ad353388f975e271f597de8c262b9b8866547b4 100644 --- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java +++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java @@ -24,14 +24,14 @@ import net.minecraft.Util; @@ -1443,7 +1413,7 @@ index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4b import net.minecraft.core.SectionPos; import net.minecraft.core.Vec3i; -import net.minecraft.util.profiling.ProfilerFiller; -+//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang Profiler ++//import net.minecraft.util.profiling.ProfilerFiller; // Plazma - Completely remove Mojang's Profiler import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.levelgen.structure.BoundingBox; @@ -1451,7 +1421,7 @@ index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4b private static final Comparator> CONTAINER_DRAIN_ORDER = (a, b) -> ScheduledTick.INTRA_TICK_DRAIN_ORDER.compare(a.peek(), b.peek()); private final LongPredicate tickCheck; - private final Supplier profiler; -+ //private final Supplier profiler; // Plazma - Completely remove Mojang Profiler ++ //private final Supplier profiler; // Plazma - Completely remove Mojang's Profiler private final Long2ObjectMap> allContainers = new Long2ObjectOpenHashMap<>(); private final Long2LongMap nextTickForContainer = Util.make(new Long2LongOpenHashMap(), map -> map.defaultReturnValue(Long.MAX_VALUE)); private final Queue> containersToTick = new PriorityQueue<>(CONTAINER_DRAIN_ORDER); @@ -1460,10 +1430,10 @@ index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4b }; - public LevelTicks(LongPredicate tickingFutureReadyPredicate, Supplier profilerGetter) { -+ public LevelTicks(LongPredicate tickingFutureReadyPredicate/*, Supplier profilerGetter*/) { // Plazma - Completely remove Mojang Profiler ++ public LevelTicks(LongPredicate tickingFutureReadyPredicate/*, Supplier profilerGetter*/) { // Plazma - Completely remove Mojang's Profiler this.tickCheck = tickingFutureReadyPredicate; - this.profiler = profilerGetter; -+ //this.profiler = profilerGetter; // Plazma - Completely remove Mojang Profiler ++ //this.profiler = profilerGetter; // Plazma - Completely remove Mojang's Profiler } public void addContainer(ChunkPos pos, LevelChunkTicks scheduler) { @@ -1472,7 +1442,7 @@ index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4b //ProfilerFiller profilerFiller = this.profiler.get(); // Purpur //profilerFiller.push("collect"); // Purpur - this.collectTicks(time, maxTicks, null); // Purpur -+ this.collectTicks(time, maxTicks/*, null*/); // Purpur // Plazma - Completely remove Mojang Profiler ++ this.collectTicks(time, maxTicks/*, null*/); // Purpur // Plazma - Completely remove Mojang's Profiler //profilerFiller.popPush("run"); // Purpur //profilerFiller.incrementCounter("ticksToRun", this.toRunThisTick.size()); // Purpur this.runCollectedTicks(ticker); @@ -1481,7 +1451,7 @@ index a6d62abd3102770652f914b9d697c6d3c2533cfc..bc46276b820b81b7686c31e1ccfb4a4b } - private void collectTicks(long time, int maxTicks, ProfilerFiller profiler) { -+ private void collectTicks(long time, int maxTicks/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang Profiler ++ private void collectTicks(long time, int maxTicks/*, ProfilerFiller profiler*/) { // Plazma - Completely remove Mojang's Profiler this.sortContainersToTick(time); //profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur this.drainContainers(time, maxTicks); diff --git a/patches/unapplied/server/0017-Add-option-to-change-nether-portal-size.patch b/patches/server/0016-Add-option-to-change-nether-portal-size.patch similarity index 97% rename from patches/unapplied/server/0017-Add-option-to-change-nether-portal-size.patch rename to patches/server/0016-Add-option-to-change-nether-portal-size.patch index 83b007c..296dc45 100644 --- a/patches/unapplied/server/0017-Add-option-to-change-nether-portal-size.patch +++ b/patches/server/0016-Add-option-to-change-nether-portal-size.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to change nether portal size diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -index 46910a3bdacc9df1835e16b300f9e107744d2660..9b372b494b831c374bab478267309544b4b31748 100644 +index afe6b2170846273b41b694aa53dca4c31bf78b3f..52043e451ca0641c93205aac62aba5427625b81f 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java @@ -99,7 +99,7 @@ public class PortalShape { diff --git a/patches/unapplied/server/0018-Reduce-create-random-instance.patch b/patches/server/0017-Reduce-create-random-instance.patch similarity index 91% rename from patches/unapplied/server/0018-Reduce-create-random-instance.patch rename to patches/server/0017-Reduce-create-random-instance.patch index 82497e7..b5556d2 100644 --- a/patches/unapplied/server/0018-Reduce-create-random-instance.patch +++ b/patches/server/0017-Reduce-create-random-instance.patch @@ -18,10 +18,10 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046e double d1 = (double) (center.y - maxRange); double d2 = (double) (center.x + maxRange); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a8447627923ee4086c 100644 +index 42a623254bd2886d09eb0cfeb01dd12d0dda19cf..feed838fe1ff9db60f1971cbafc25baf9af69fac 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -456,7 +456,7 @@ public class ServerPlayer extends Player { +@@ -482,7 +482,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -30,7 +30,7 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792 for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; -@@ -493,7 +493,7 @@ public class ServerPlayer extends Player { +@@ -519,7 +519,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -40,18 +40,18 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792 for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index c0729d3a38e0b9924711c0ca96afd138fa69fa3b..d45a435a3aa8fc5b8f028e0455c3789b36cbdf12 100644 +index 3b4fadb37eafb2f7b0ce4d6b276d2fdaa8287521..75104b17725f723327007d75b7923f33c6eeb9bd 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -71,7 +71,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -91,7 +91,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, this.serverId = ""; this.server = server; this.connection = connection; - this.challenge = Ints.toByteArray(RandomSource.create().nextInt()); + this.challenge = Ints.toByteArray((org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? server.random() : RandomSource.create()).nextInt()); // Plazma - Reduce create random instance + this.transferred = transferred; } - @Override diff --git a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java b/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java index 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..034b41aa8c8a5571f21530a4e8588b1cc110ecf3 100644 --- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java @@ -79,7 +79,7 @@ index 3fac11bf02652b5f51f30f99bdf516504467d0d2..add054ac26890b627d1eee87d1b0f88a public ShufflingList() { diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java -index e553f52de2e0b30511ac1b73cb436374017cd7d7..cbb94ec3111865563e451e758e5b9813f3c6102f 100644 +index 09a7b418ddf564c0be13297f7c216db2e7ae1578..0eebd9e50e8a26c40e246bcc9feb18cba137ee7d 100644 --- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java +++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java @@ -8,7 +8,7 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType; @@ -105,7 +105,7 @@ index 3d792957f27fd4bdfad8d76262a8e2a2012bf35f..2d96cf85fb9250bbbddb8065307a4792 private static final Codec> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create( instance -> instance.group( diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0888acda2 100644 +index 96e9fce5f9084737d2fcf4deb83305733b480179..0a5277638a0d5197d7bbce301bc5f74de40a321a 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java @@ -32,7 +32,7 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -118,7 +118,7 @@ index 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0 private int tickDelay; private int spawnDelay; diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0..1317d8289898798a9d86a4c995a4a1a317631bf7 100644 +index 35299affb699d745804a3b60cb78b9323f3e068e..75890635b357bc54a03ed00bcfb3e287f1eb2cff 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -87,7 +87,7 @@ public class FishingHook extends Projectile { @@ -131,10 +131,10 @@ index 91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0..1317d8289898798a9d86a4c995a4a1a3 this.currentState = FishingHook.FishHookState.FLYING; this.noCulling = true; diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java -index bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e069d254c35 100644 +index fdff9788eaf663be79214b2ca491f0f0444f6136..de50b06f13df481fa59e1abe16d5181b8124b427 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raid.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java -@@ -114,7 +114,7 @@ public class Raid { +@@ -118,7 +118,7 @@ public class Raid { public Raid(int id, ServerLevel world, BlockPos pos) { this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10); @@ -143,7 +143,7 @@ index bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e06 this.waveSpawnPos = Optional.empty(); this.id = id; this.level = world; -@@ -128,7 +128,7 @@ public class Raid { +@@ -132,7 +132,7 @@ public class Raid { public Raid(ServerLevel world, CompoundTag nbt) { this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10); @@ -153,10 +153,10 @@ index bf2c23fad919820512ce031cf28a000b249b2876..cb81994735650ec7c54b3f5a97d94e06 this.level = world; this.id = nbt.getInt("Id"); diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index 1a686780e5aadcbdcfceb770ce8e283b38115209..6c1ba9631e56c336ed3ddee8e6435734597a3aa3 100644 +index c3a644b0f8c7c5622acc9e1a496f95d432718806..ce8fb88b31af1d27a7118735154673a9f05499ec 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -97,7 +97,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -95,7 +95,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { } // Purpur end }; @@ -166,23 +166,23 @@ index 1a686780e5aadcbdcfceb770ce8e283b38115209..6c1ba9631e56c336ed3ddee8e6435734 this.costs = new int[3]; this.enchantClue = new int[]{-1, -1, -1}; diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 0be03430d8257d918b7cf646af518473ae027399..824f210af6d8467ed596ece1573740d99b92b7ba 100644 +index f5e84bf8817e2d53557e0909d8c9e0e0e8206a16..1792f18397d733d87ef067a7daaf076be4163c63 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -92,7 +92,7 @@ public class Explosion { +@@ -93,7 +93,7 @@ public class Explosion { } - public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType, ParticleOptions particle, ParticleOptions emitterParticle, SoundEvent soundEvent) { + public Explosion(Level world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Explosion.BlockInteraction destructionType, ParticleOptions particle, ParticleOptions emitterParticle, Holder soundEvent) { - this.random = RandomSource.create(); + this.random = world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create(); // Plazma - Reduce create random instace this.toBlow = new ObjectArrayList(); this.hitPlayers = Maps.newHashMap(); this.level = world; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 16e6716f70d5b9090f29f8b2320302d98dd087c2..72420d9e79d4b480fa060f9b910cea7b677a1427 100644 +index 648b21e3a83e0c35be739bd4ebfa930b84b1e4dd..9e8faa787fe3f924da898244a00eb3da3354d68b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -122,16 +122,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -121,16 +121,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final Thread thread; private final boolean isDebug; private int skyDarken; @@ -198,14 +198,14 @@ index 16e6716f70d5b9090f29f8b2320302d98dd087c2..72420d9e79d4b480fa060f9b910cea7b @Deprecated - private final RandomSource threadSafeRandom = RandomSource.createThreadSafe(); + private final RandomSource threadSafeRandom = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? random : RandomSource.createThreadSafe(); // Plazma - Reduce create random instace - private final ResourceKey dimensionTypeId; private final Holder dimensionTypeRegistration; public final WritableLevelData levelData; + // private final Supplier profiler; // Plazma - Completely remove Mojang's Profiler diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 4997f120aa9877c199fbcaa0c2f65226e13b5a23..af393eaf3d21a260f0bfff5eaeb78c389161bffd 100644 +index fb9611866671880fc7a1a969da928b8f2ad15269..44962ecedf724e941e59913188afe4cfad252fc8 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -363,7 +363,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -357,7 +357,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { } private static void spawnGatewayPortal(ServerLevel world, BlockPos pos, EndGatewayConfiguration config) { @@ -215,7 +215,7 @@ index 4997f120aa9877c199fbcaa0c2f65226e13b5a23..af393eaf3d21a260f0bfff5eaeb78c38 @Override diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java -index 798e22fb4d685b5845ebf687e8004e94f13a9751..189f425565c9c38b29031ae26de667422eb3b6bb 100644 +index a6b6e5ea191c0e2cd7a2e4f01b89d8af40a83c1b..6908248519c39a1fb4454c1d6c8503c36d7ddaa0 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java @@ -224,7 +224,7 @@ public class ChunkGeneratorStructureState { @@ -241,7 +241,7 @@ index 7bbe93966fa00b7001da53bf2f22f4d942b7cc22..6c5eececc83571b0f60e7f672ed185e1 } else if (flag1) { fight.setRespawnStage(SUMMONING_DRAGON); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index d4f903c402765c6e8e1db99e148613748f530726..c8d76fdee94a0ffb76fcb476ca386acf154dda28 100644 +index 18a1b4325cac81b040596071dab99ef9bf6f3142..ab492b184a4ecdefc423823fc72abd800b71f016 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java @@ -472,7 +472,7 @@ public class EndDragonFight { diff --git a/patches/unapplied/server/0019-Apply-various-optimizations.patch b/patches/server/0018-Apply-various-optimizations.patch similarity index 82% rename from patches/unapplied/server/0019-Apply-various-optimizations.patch rename to patches/server/0018-Apply-various-optimizations.patch index 2ef1b64..922f9e0 100644 --- a/patches/unapplied/server/0019-Apply-various-optimizations.patch +++ b/patches/server/0018-Apply-various-optimizations.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations Akarin - Swaps the predicate order of collision diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f2c6b52fe7fbb05afa0074684cd195f6ae598f1f..f16a347e0e263a0479a73cb14626e31c9de37e6c 100644 +index 3aae4fa4176c0bf170f4532ae187e3122c142a6a..215368ec72d4763479c2cdc668c3e2389ceb4f7a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2154,8 +2154,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2201,8 +2201,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void playerTouch(Player player) {} public void push(Entity entity) { @@ -21,7 +21,7 @@ index f2c6b52fe7fbb05afa0074684cd195f6ae598f1f..f16a347e0e263a0479a73cb14626e31c if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant double d0 = entity.getX() - this.getX(); double d1 = entity.getZ() - this.getZ(); -@@ -2183,8 +2184,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2230,8 +2231,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.push(d0, 0.0D, d1); } } diff --git a/patches/unapplied/server/0015-Add-some-missing-Pufferfish-configurations.patch b/patches/unapplied/server/0015-Add-some-missing-Pufferfish-configurations.patch deleted file mode 100644 index 444ae74..0000000 --- a/patches/unapplied/server/0015-Add-some-missing-Pufferfish-configurations.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Wed, 27 Sep 2023 18:29:51 +0900 -Subject: [PATCH] Add some missing Pufferfish configurations - - -diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 77c1bcde8cc5c2f51418a6f385ce84f202a13787..8ac2f6749f3bd85b73ac543bc9040aacb6032623 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -170,11 +170,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl - return dimensions.height - 0.1F * this.getScale(); - } - -+ private int behaviorTick = 0; // Plazma - Add missing pufferfish configurations - @Override - protected void customServerAiStep() { - //this.level().getProfiler().push("camelBrain"); // Purpur - Brain behaviorcontroller = (Brain) this.getBrain(); // CraftBukkit - decompile error -- -+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations - behaviorcontroller.tick((ServerLevel) this.level(), this); - //this.level().getProfiler().pop(); // Purpur - //this.level().getProfiler().push("camelActivityUpdate"); // Purpur -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 24e351b40745d15e065f4c3cd904596c6daf4cfb..aa60c4a251de2877a9b4ea72899f07194ce15ed7 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -527,9 +527,11 @@ public class Sniffer extends Animal { - return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES); - } - -+ private int behaviorTick; // Plazma - Add missing pufferfish configurations - @Override - protected void customServerAiStep() { - //this.level().getProfiler().push("snifferBrain"); // Purpur -+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Plazma - Add missing pufferfish configurations - this.getBrain().tick((ServerLevel) this.level(), this); - //this.level().getProfiler().popPush("snifferActivityUpdate"); // Purpur - SnifferAi.updateActivity(this); -diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index 1f476a4fd148ac9a4c9ad5d12de46a16e4116239..707fd662c7f17986fffcabe774de176741456227 100644 ---- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -@@ -320,7 +320,7 @@ public class Warden extends Monster implements VibrationSystem { - ServerLevel worldserver = (ServerLevel) this.level(); - - //worldserver.getProfiler().push("wardenBrain"); // Purpur -- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish -+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing pufferfish configurations - this.getBrain().tick(worldserver, this); - //this.level().getProfiler().pop(); // Purpur - super.customServerAiStep(); diff --git a/patches/unapplied/server/0020-Avoid-double-I-O-operation-on-load-player-file.patch b/patches/unapplied/server/0020-Avoid-double-I-O-operation-on-load-player-file.patch deleted file mode 100644 index b321a5a..0000000 --- a/patches/unapplied/server/0020-Avoid-double-I-O-operation-on-load-player-file.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Wed, 27 Sep 2023 22:13:07 +0900 -Subject: [PATCH] Avoid double I/O operation on load player file - - -diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index e0f085169fafa5e574caf368efa343514540b348..042617c7de30707f66e60536cebc31e210647b64 100644 ---- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -60,7 +60,8 @@ public class PlayerDataStorage { - File file = new File(this.playerDir, player.getStringUUID() + ".dat"); - // Spigot Start - boolean usingWrongFile = false; -- if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first -+ boolean isNormalFile = file.exists() && file.isFile(); // Plazma - Avoid double I/O operation -+ if ( org.bukkit.Bukkit.getOnlineMode() && !isNormalFile ) // Paper - Check online mode first // Plazma - Avoid double I/O operation - { - file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); - if ( file.exists() ) -@@ -71,7 +72,7 @@ public class PlayerDataStorage { - } - // Spigot End - -- if (file.exists() && file.isFile()) { -+ if (isNormalFile) { // Plazma - Avoid double I/O operation - nbttagcompound = NbtIo.readCompressed(file.toPath(), NbtAccounter.unlimitedHeap()); - } - // Spigot Start