20/37
This commit is contained in:
@@ -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
|
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
|
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||||
@@ -636,38 +636,59 @@ public class Metrics {
|
@@ -636,38 +636,59 @@ public class Metrics {
|
||||||
@@ -8,67 +8,8 @@ Subject: [PATCH] Optimize default configurations
|
|||||||
- AkiraDevelopment/SimplyMC
|
- AkiraDevelopment/SimplyMC
|
||||||
- YouHaveTrouble/minecraft-exploits-and-how-to-fix-them
|
- 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<String, Integer> 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
|
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
|
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||||
+++ b/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 {
|
@@ -156,7 +156,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||||
@@ -80,7 +21,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SpamLimiter spamLimiter;
|
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 Commands commands;
|
||||||
|
|
||||||
public class Commands extends ConfigurationPart {
|
public class Commands extends ConfigurationPart {
|
||||||
@@ -89,7 +30,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
|||||||
public boolean fixTargetSelectorTagCompletion = true;
|
public boolean fixTargetSelectorTagCompletion = true;
|
||||||
public boolean timeCommandAffectsAllWorlds = false;
|
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 BookSize bookSize;
|
||||||
|
|
||||||
public class BookSize extends ConfigurationPart {
|
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 double totalMultiplier = 0.98D; // TODO this should probably be merged into the above inner class
|
||||||
}
|
}
|
||||||
public boolean resolveSelectorsInBooks = false;
|
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 class PacketLimiter extends ConfigurationPart {
|
||||||
public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED);
|
public Component kickMessage = Component.translatable("disconnect.exceeded_packet_rate", NamedTextColor.RED);
|
||||||
public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK);
|
public PacketLimit allPackets = new PacketLimit(7.0, 500.0, PacketLimit.ViolateAction.KICK);
|
||||||
@@ -115,7 +56,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
|||||||
|
|
||||||
@ConfigSerializable
|
@ConfigSerializable
|
||||||
public record PacketLimit(@Required double interval, @Required double maxPacketRate, ViolateAction action) {
|
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);
|
executor.setMaximumPoolSize(_chatExecutorMaxSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,7 +66,7 @@ index 30fe1c0645a07d663b08c0f988a1ab3a750bf7c4..c71daa5d3665cec2836770e5f04da222
|
|||||||
public boolean loadPermissionsYmlBeforePlugins = true;
|
public boolean loadPermissionsYmlBeforePlugins = true;
|
||||||
@Constraints.Min(4)
|
@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
|
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
|
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||||
+++ b/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 {
|
@@ -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 ArmorStands armorStands;
|
||||||
|
|
||||||
public class ArmorStands extends ConfigurationPart {
|
public class ArmorStands extends ConfigurationPart {
|
||||||
- public boolean doCollisionEntityLookups = true;
|
- public boolean doCollisionEntityLookups = true;
|
||||||
- public boolean tick = true;
|
- public boolean tick = true;
|
||||||
+ public boolean doCollisionEntityLookups = !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.aggressiveOptimize; // Plazma - Optimize default configurations
|
+ public boolean tick = !org.plazmamc.plazma.Options.AGGRESSIVE; // Plazma - Optimize default configurations
|
||||||
}
|
}
|
||||||
|
|
||||||
public Markers markers;
|
public Markers markers;
|
||||||
@@ -212,7 +153,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Sniffer sniffer;
|
public Sniffer sniffer;
|
||||||
@@ -182,7 +223,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
@@ -181,7 +222,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||||
@MergeMap
|
@MergeMap
|
||||||
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
||||||
@MergeMap
|
@MergeMap
|
||||||
@@ -221,7 +162,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
@MergeMap
|
@MergeMap
|
||||||
public Reference2IntMap<MobCategory> ticksPerSpawn = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
public Reference2IntMap<MobCategory> 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 class Environment extends ConfigurationPart {
|
||||||
public boolean disableThunder = false;
|
public boolean disableThunder = false;
|
||||||
public boolean disableIceAndSnow = false;
|
public boolean disableIceAndSnow = false;
|
||||||
@@ -230,7 +171,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
public boolean disableExplosionKnockback = false;
|
public boolean disableExplosionKnockback = false;
|
||||||
public boolean generateFlatBedrock = false;
|
public boolean generateFlatBedrock = false;
|
||||||
public FrostedIce frostedIce;
|
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 Fixes fixes;
|
||||||
|
|
||||||
public class Fixes extends ConfigurationPart {
|
public class Fixes extends ConfigurationPart {
|
||||||
@@ -239,7 +180,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
public boolean disableUnloadedChunkEnderpearlExploit = true;
|
public boolean disableUnloadedChunkEnderpearlExploit = true;
|
||||||
public boolean preventTntFromMovingInWater = false;
|
public boolean preventTntFromMovingInWater = false;
|
||||||
public boolean splitOverstackedLoot = true;
|
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 class Collisions extends ConfigurationPart {
|
||||||
public boolean onlyPlayersCollide = false;
|
public boolean onlyPlayersCollide = false;
|
||||||
public boolean allowVehicleCollisions = true;
|
public boolean allowVehicleCollisions = true;
|
||||||
@@ -251,7 +192,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
public boolean allowPlayerCrammingDamage = false;
|
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 class Chunks extends ConfigurationPart {
|
||||||
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
||||||
@@ -301,7 +242,7 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
});
|
});
|
||||||
public boolean flushRegionsOnSave = false;
|
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 TickRates tickRates;
|
||||||
|
|
||||||
public class TickRates extends ConfigurationPart {
|
public class TickRates extends ConfigurationPart {
|
||||||
@@ -313,12 +254,12 @@ index d3fdf62912d190f8b468b77230a927023c361074..6be96d4a772255ac03addd1775008d89
|
|||||||
public int wetFarmland = 1;
|
public int wetFarmland = 1;
|
||||||
public int dryFarmland = 1;
|
public int dryFarmland = 1;
|
||||||
public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
public Table<EntityType<?>, 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 class Misc extends ConfigurationPart {
|
||||||
public int lightQueueSize = 20;
|
public int lightQueueSize = 20;
|
||||||
- public boolean updatePathfindingOnBlockUpdate = true;
|
- 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 boolean showSignClickCommandFailureMsgsToPlayer = false;
|
||||||
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
|
- public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA;
|
||||||
+ public RedstoneImplementation redstoneImplementation = org.plazmamc.plazma.configurations.PlazmaConfigurations.optimize() ? RedstoneImplementation.ALTERNATE_CURRENT : RedstoneImplementation.VANILLA; // Plazma - Optimize default configurations
|
+ 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
|
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
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/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");
|
File configFile = (File) optionset.valueOf("bukkit-settings");
|
||||||
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
|
YamlConfiguration configuration = YamlConfiguration.loadConfiguration(configFile);
|
||||||
configuration.options().copyDefaults(true);
|
configuration.options().copyDefaults(true);
|
||||||
@@ -351,10 +292,10 @@ index 23f0302f2d90b7229828890eb364bc2c9abc11d2..a9753f799ef944a46ee3cedd68c8aad7
|
|||||||
|
|
||||||
File commandFile = (File) optionset.valueOf("commands-settings");
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
+++ b/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<DedicatedServerPropertie
|
@@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
this.spawnMonsters = this.get("spawn-monsters", true);
|
this.spawnMonsters = this.get("spawn-monsters", true);
|
||||||
this.useNativeTransport = this.get("use-native-transport", true);
|
this.useNativeTransport = this.get("use-native-transport", true);
|
||||||
this.enableCommandBlock = this.get("enable-command-block", false);
|
this.enableCommandBlock = this.get("enable-command-block", false);
|
||||||
@@ -373,17 +314,17 @@ index a66dcea06424518290576c7647ae0717040586f9..41d5d15dfa2affdee68501efb2447a20
|
|||||||
this.maxPlayers = this.get("max-players", 20);
|
this.maxPlayers = this.get("max-players", 20);
|
||||||
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
|
this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
|
||||||
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
||||||
@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -146,7 +146,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||||
return Mth.clamp(integer, 1, 29999984);
|
return Mth.clamp(integer, 1, 29999984);
|
||||||
}, 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", 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.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
||||||
this.enableStatus = this.get("enable-status", true);
|
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
|
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
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/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 {
|
@@ -426,7 +426,7 @@ public final class CraftServer implements Server {
|
||||||
@@ -396,18 +337,18 @@ index ceea71c3e6886b03d017c44c287dc20928f63f09..e250196a4210c5b2fe5eadda6312ebc5
|
|||||||
if (!this.configuration.isString("aliases")) {
|
if (!this.configuration.isString("aliases")) {
|
||||||
legacyAlias = this.configuration.getConfigurationSection("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
|
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
|
--- a/src/main/java/org/plazmamc/plazma/Options.java
|
||||||
+++ b/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;
|
@@ -6,5 +6,6 @@ public interface Options {
|
||||||
public interface Options {
|
|
||||||
|
|
||||||
boolean iKnowWhatIAmDoing = Boolean.getBoolean("Plazma.iKnowWhatIAmDoing");
|
boolean NO_OPTIMIZE = getBoolean("Plazma.disableConfigOptimization");
|
||||||
+ boolean aggressiveOptimize = Boolean.getBoolean("Plazma.aggressiveOptimize");
|
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
|
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
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
@@ -49,6 +49,7 @@ public class PurpurConfig {
|
@@ -49,6 +49,7 @@ public class PurpurConfig {
|
||||||
@@ -437,10 +378,10 @@ index a937993f318ef5703420f57fe65c5d990ce2c4dd..65b9e4fc073d0e97c6f90587d20e3ecb
|
|||||||
private static void networkSettings() {
|
private static void networkSettings() {
|
||||||
useUPnP = getBoolean("settings.network.upnp-port-forwarding", useUPnP);
|
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
|
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
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||||
+++ b/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 boolean idleTimeoutTargetPlayer = true;
|
||||||
public String playerDeathExpDropEquation = "expLevel * 7";
|
public String playerDeathExpDropEquation = "expLevel * 7";
|
||||||
public int playerDeathExpDropMax = 100;
|
public int playerDeathExpDropMax = 100;
|
||||||
@@ -449,7 +390,7 @@ index 7dc82ffccc157a17335f1bc56ab81be3813294f6..d756c25e6d0af3153e510d0162e65348
|
|||||||
public boolean teleportOnNetherCeilingDamage = false;
|
public boolean teleportOnNetherCeilingDamage = false;
|
||||||
public boolean totemOfUndyingWorksInInventory = false;
|
public boolean totemOfUndyingWorksInInventory = false;
|
||||||
public boolean playerFixStuckPortal = false;
|
public boolean playerFixStuckPortal = false;
|
||||||
@@ -3127,7 +3127,7 @@ public class PurpurWorldConfig {
|
@@ -3118,7 +3118,7 @@ public class PurpurWorldConfig {
|
||||||
public boolean zombieJockeyOnlyBaby = true;
|
public boolean zombieJockeyOnlyBaby = true;
|
||||||
public double zombieJockeyChance = 0.05D;
|
public double zombieJockeyChance = 0.05D;
|
||||||
public boolean zombieJockeyTryExistingChickens = true;
|
public boolean zombieJockeyTryExistingChickens = true;
|
||||||
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||||
+++ b/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\"");
|
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");
|
DedicatedServer.LOGGER.info("Loading properties");
|
||||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
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.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||||
// Paper end - initialize global and world-defaults configuration
|
// 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
|
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
||||||
this.getProfileCache().save(false); // Paper
|
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 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/";
|
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
|
// Paper end - Add Velocity IP Forwarding Support
|
||||||
@@ -51,7 +51,7 @@ index b7709cbb1a78eb1daac2112cb9fbf5d379aaa662..2a73508dd8a59c6af8b65ab2db97b6e2
|
|||||||
if (!this.usesAuthentication()) {
|
if (!this.usesAuthentication()) {
|
||||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
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.");
|
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
|
// 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
|
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
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/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<ServerPlayer> shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
||||||
// Paper end
|
// Paper end
|
||||||
boolean flag = this.verifyChatTrusted(message);
|
boolean flag = this.verifyChatTrusted(message);
|
||||||
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
+++ b/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
|
@@ -150,6 +150,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||||
@@ -33,14 +33,14 @@ index 518660609566ffe943103b305472590ee9f0a257..a6a697868b22224a26d6c39e594533c3
|
|||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
+++ b/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() {
|
public int getPurpurBreedTime() {
|
||||||
return this.level().purpurConfig.camelBreedingTicks;
|
return this.level().purpurConfig.camelBreedingTicks;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Plazma start - Add missing purpur configuration options
|
+ // Plazma start - Add missing purpur configuration options
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean isSensitiveToWater() {
|
+ public boolean isSensitiveToWater() {
|
||||||
@@ -51,15 +51,15 @@ index 8616a8c09a21f576a07daaa93ebf64e0f03d0c88..77c1bcde8cc5c2f51418a6f385ce84f2
|
|||||||
+ public boolean isAlwaysExperienceDropper() {
|
+ public boolean isAlwaysExperienceDropper() {
|
||||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||||
+ }
|
+ }
|
||||||
+ // Plazma end - Add missing purpur configuration options
|
+ // Plazma end - Add missing purpur configuration optionsurpur end
|
||||||
// Purpur end
|
// Purpur end
|
||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
+++ b/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<FrogVariant> {
|
@@ -160,6 +160,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
||||||
public float getJumpPower() {
|
public float getJumpPower() {
|
||||||
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
|
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
|
||||||
}
|
}
|
||||||
@@ -84,10 +84,10 @@ index 37f1d3c656997906cef57d9dbefc226d04fc65fe..b3880426148bb1ffbf36113343c54850
|
|||||||
|
|
||||||
public int getPurpurBreedTime() {
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||||
+++ b/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() {
|
protected void registerGoals() {
|
||||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||||
}
|
}
|
||||||
@@ -112,12 +112,12 @@ index 2a9c2a69a0589e4e7b7c79d3716376b360a2eba1..630eaae555403db79f4e16880ca44390
|
|||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||||
+++ b/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 {
|
@@ -119,6 +119,18 @@ public class Sniffer extends Animal {
|
||||||
public boolean isControllable() {
|
public int getPurpurBreedTime() {
|
||||||
return level().purpurConfig.snifferControllable;
|
return this.level().purpurConfig.snifferBreedingTicks;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Plazma start - Add missing purpur configuration options
|
+ // Plazma start - Add missing purpur configuration options
|
||||||
@@ -135,7 +135,7 @@ index 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c
|
|||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
+++ b/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 {
|
@@ -147,6 +147,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||||
@@ -163,10 +163,10 @@ index bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16
|
|||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||||
+++ b/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<? extends Boat> type, Level world) {
|
public ChestBoat(EntityType<? extends Boat> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -175,7 +175,13 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ChestBoat(Level world, double d0, double d1, double d2) {
|
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
|
@Override
|
||||||
public int getContainerSize() {
|
public int getContainerSize() {
|
||||||
@@ -185,7 +191,7 @@ index 58af87b8faf4f8d6bdb111c49a429466acface68..22cc678f9bd39acc27ba2d2e7981f9e8
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
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
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
@@ -329,6 +329,7 @@ public class PurpurConfig {
|
@@ -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);
|
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
|
||||||
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
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
|
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
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||||
+++ b/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 allayRidableInWater = true;
|
||||||
public boolean allayControllable = true;
|
public boolean allayControllable = true;
|
||||||
public List<String> allayRespectNBT = new ArrayList<>();
|
|
||||||
+ // Plazma start - Add missing purpur config options
|
+ // Plazma start - Add missing purpur config options
|
||||||
+ public double allayMaxHealth = 20.0D;
|
+ public double allayMaxHealth = 20.0D;
|
||||||
+ public boolean allayTakeDamageFromWater = false;
|
+ public boolean allayTakeDamageFromWater = false;
|
||||||
@@ -224,23 +230,21 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
|||||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
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 camelMovementSpeedMin = 0.09D;
|
||||||
public double camelMovementSpeedMax = 0.09D;
|
public double camelMovementSpeedMax = 0.09D;
|
||||||
public int camelBreedingTicks = 6000;
|
public int camelBreedingTicks = 6000;
|
||||||
+ // Plazma start - Add missing purpur config options
|
+ // Plazma start - Add missing purpur config options
|
||||||
+ //public boolean camelRidableInWater = false;
|
|
||||||
+ public boolean camelTakeDamageFromWater = false;
|
+ public boolean camelTakeDamageFromWater = false;
|
||||||
+ public boolean camelAlwaysDropExp = false;
|
+ public boolean camelAlwaysDropExp = false;
|
||||||
private void camelSettings() {
|
private void camelSettings() {
|
||||||
+ //camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
|
||||||
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
||||||
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
||||||
+ // Plazma end - Add missing purpur configuration options
|
+ // Plazma end - Add missing purpur configuration options
|
||||||
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||||
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
||||||
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
|
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 boolean frogControllable = true;
|
||||||
public float frogRidableJumpHeight = 0.65F;
|
public float frogRidableJumpHeight = 0.65F;
|
||||||
public int frogBreedingTicks = 6000;
|
public int frogBreedingTicks = 6000;
|
||||||
@@ -256,7 +260,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
|||||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
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 boolean snifferControllable = true;
|
||||||
public double snifferMaxHealth = 14.0D;
|
public double snifferMaxHealth = 14.0D;
|
||||||
public int snifferBreedingTicks = 6000;
|
public int snifferBreedingTicks = 6000;
|
||||||
@@ -270,7 +274,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
|||||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||||
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
|
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 tadpoleRidable = false;
|
||||||
public boolean tadpoleRidableInWater = true;
|
public boolean tadpoleRidableInWater = true;
|
||||||
public boolean tadpoleControllable = true;
|
public boolean tadpoleControllable = true;
|
||||||
@@ -286,7 +290,7 @@ index d756c25e6d0af3153e510d0162e65348b1675366..d723b9b6818eae3c40f16f9aeab9604b
|
|||||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
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 wardenRidable = false;
|
||||||
public boolean wardenRidableInWater = true;
|
public boolean wardenRidableInWater = true;
|
||||||
public boolean wardenControllable = true;
|
public boolean wardenControllable = true;
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
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
|
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||||
+++ b/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 {
|
@@ -99,7 +99,7 @@ public class PortalShape {
|
||||||
@@ -18,10 +18,10 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046e
|
|||||||
double d1 = (double) (center.y - maxRange);
|
double d1 = (double) (center.y - maxRange);
|
||||||
double d2 = (double) (center.x + 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
|
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
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/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;
|
long l = k * k;
|
||||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||||
int j1 = this.getCoprime(i1);
|
int j1 = this.getCoprime(i1);
|
||||||
@@ -30,7 +30,7 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792
|
|||||||
|
|
||||||
for (int l1 = 0; l1 < i1; ++l1) {
|
for (int l1 = 0; l1 < i1; ++l1) {
|
||||||
int i2 = (k1 + j1 * l1) % i1;
|
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;
|
long l = k * k;
|
||||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||||
int j1 = this.getCoprime(i1);
|
int j1 = this.getCoprime(i1);
|
||||||
@@ -40,18 +40,18 @@ index 305b90d10a499e9731f5178433fb10207e428091..47a4e4082571e43946b510a844762792
|
|||||||
for (int l1 = 0; l1 < i1; ++l1) {
|
for (int l1 = 0; l1 < i1; ++l1) {
|
||||||
int i2 = (k1 + j1 * l1) % i1;
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/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.serverId = "";
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
- this.challenge = Ints.toByteArray(RandomSource.create().nextInt());
|
- 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.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
|
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
|
index 0e0867d7add9a024bbe9471f8ff92bbb25996a3d..034b41aa8c8a5571f21530a4e8588b1cc110ecf3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
--- a/src/main/java/net/minecraft/server/rcon/thread/QueryThreadGs4.java
|
||||||
@@ -79,7 +79,7 @@ index 3fac11bf02652b5f51f30f99bdf516504467d0d2..add054ac26890b627d1eee87d1b0f88a
|
|||||||
|
|
||||||
public ShufflingList() {
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
||||||
+++ b/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;
|
@@ -8,7 +8,7 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType;
|
||||||
@@ -105,7 +105,7 @@ index 3d792957f27fd4bdfad8d76262a8e2a2012bf35f..2d96cf85fb9250bbbddb8065307a4792
|
|||||||
private static final Codec<Pair<UUID, Integer>> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create(
|
private static final Codec<Pair<UUID, Integer>> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create(
|
||||||
instance -> instance.group(
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||||
+++ b/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 {
|
@@ -32,7 +32,7 @@ public class WanderingTraderSpawner implements CustomSpawner {
|
||||||
@@ -118,7 +118,7 @@ index 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0
|
|||||||
private int tickDelay;
|
private int tickDelay;
|
||||||
private int spawnDelay;
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
+++ b/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 {
|
@@ -87,7 +87,7 @@ public class FishingHook extends Projectile {
|
||||||
@@ -131,10 +131,10 @@ index 91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0..1317d8289898798a9d86a4c995a4a1a3
|
|||||||
this.currentState = FishingHook.FishHookState.FLYING;
|
this.currentState = FishingHook.FishHookState.FLYING;
|
||||||
this.noCulling = true;
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||||
+++ b/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) {
|
public Raid(int id, ServerLevel world, BlockPos pos) {
|
||||||
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
|
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.waveSpawnPos = Optional.empty();
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.level = world;
|
this.level = world;
|
||||||
@@ -128,7 +128,7 @@ public class Raid {
|
@@ -132,7 +132,7 @@ public class Raid {
|
||||||
|
|
||||||
public Raid(ServerLevel world, CompoundTag nbt) {
|
public Raid(ServerLevel world, CompoundTag nbt) {
|
||||||
this.raidEvent = new ServerBossEvent(Raid.RAID_NAME_COMPONENT, BossEvent.BossBarColor.RED, BossEvent.BossBarOverlay.NOTCHED_10);
|
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.level = world;
|
||||||
this.id = nbt.getInt("Id");
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
|
||||||
+++ b/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
|
// Purpur end
|
||||||
};
|
};
|
||||||
@@ -166,23 +166,23 @@ index 1a686780e5aadcbdcfceb770ce8e283b38115209..6c1ba9631e56c336ed3ddee8e6435734
|
|||||||
this.costs = new int[3];
|
this.costs = new int[3];
|
||||||
this.enchantClue = new int[]{-1, -1, -1};
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
+++ b/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> soundEvent) {
|
||||||
- this.random = RandomSource.create();
|
- this.random = RandomSource.create();
|
||||||
+ this.random = world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create(); // Plazma - Reduce create random instace
|
+ this.random = world.plazmaConfig().misc.reduceRandom ? world.getRandom() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||||
this.toBlow = new ObjectArrayList();
|
this.toBlow = new ObjectArrayList();
|
||||||
this.hitPlayers = Maps.newHashMap();
|
this.hitPlayers = Maps.newHashMap();
|
||||||
this.level = world;
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/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;
|
public final Thread thread;
|
||||||
private final boolean isDebug;
|
private final boolean isDebug;
|
||||||
private int skyDarken;
|
private int skyDarken;
|
||||||
@@ -198,14 +198,14 @@ index 16e6716f70d5b9090f29f8b2320302d98dd087c2..72420d9e79d4b480fa060f9b910cea7b
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
- private final RandomSource threadSafeRandom = RandomSource.createThreadSafe();
|
- 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 RandomSource threadSafeRandom = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? random : RandomSource.createThreadSafe(); // Plazma - Reduce create random instace
|
||||||
private final ResourceKey<DimensionType> dimensionTypeId;
|
|
||||||
private final Holder<DimensionType> dimensionTypeRegistration;
|
private final Holder<DimensionType> dimensionTypeRegistration;
|
||||||
public final WritableLevelData levelData;
|
public final WritableLevelData levelData;
|
||||||
|
// private final Supplier<ProfilerFiller> 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
|
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
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
+++ b/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) {
|
private static void spawnGatewayPortal(ServerLevel world, BlockPos pos, EndGatewayConfiguration config) {
|
||||||
@@ -215,7 +215,7 @@ index 4997f120aa9877c199fbcaa0c2f65226e13b5a23..af393eaf3d21a260f0bfff5eaeb78c38
|
|||||||
|
|
||||||
@Override
|
@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
|
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
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||||
+++ b/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 {
|
@@ -224,7 +224,7 @@ public class ChunkGeneratorStructureState {
|
||||||
@@ -241,7 +241,7 @@ index 7bbe93966fa00b7001da53bf2f22f4d942b7cc22..6c5eececc83571b0f60e7f672ed185e1
|
|||||||
} else if (flag1) {
|
} else if (flag1) {
|
||||||
fight.setRespawnStage(SUMMONING_DRAGON); // CraftBukkit - decompile error
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||||
+++ b/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 {
|
@@ -472,7 +472,7 @@ public class EndDragonFight {
|
||||||
@@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations
|
|||||||
Akarin - Swaps the predicate order of collision
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/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 playerTouch(Player player) {}
|
||||||
|
|
||||||
public void push(Entity entity) {
|
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
|
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 d0 = entity.getX() - this.getX();
|
||||||
double d1 = entity.getZ() - this.getZ();
|
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);
|
entity.push(d0, 0.0D, d1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
|
||||||
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<Camel> behaviorcontroller = (Brain<Camel>) 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();
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: AlphaKR93 <dev@alpha93.kr>
|
|
||||||
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
|
|
||||||
Reference in New Issue
Block a user