9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-19 14:59:25 +00:00

update upstream

This commit is contained in:
NONPLAYT
2025-01-13 19:02:10 +03:00
parent b1b4820042
commit 0246330f7b
19 changed files with 88 additions and 159 deletions

View File

@@ -52,10 +52,6 @@ subprojects {
}
}
dependencies {
"testRuntimeOnly"("org.junit.platform:junit-platform-launcher")
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 21

View File

@@ -179,7 +179,7 @@ index 42e7e712403676171d34d5f2be27e48e7a071ebd..00000000000000000000000000000000
-}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
deleted file mode 100644
index 157617933a772451f6c073d97afaf305769b4d40..0000000000000000000000000000000000000000
index c178d77bd23a484043f50e46ccd603734f7b6059..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/TimedEventExecutor.java
+++ /dev/null
@@ -1,93 +0,0 @@
@@ -265,9 +265,9 @@ index 157617933a772451f6c073d97afaf305769b4d40..00000000000000000000000000000000
- executor.execute(listener, event);
- return;
- }
- try (Timing ignored = timings.startTiming()){
- //try (Timing ignored = timings.startTiming()){ // Purpur - Remove Timings
- executor.execute(listener, event);
- }
- //} // Purpur - Remove Timings
- }
-
- @Override
@@ -278,10 +278,10 @@ index 157617933a772451f6c073d97afaf305769b4d40..00000000000000000000000000000000
-}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
deleted file mode 100644
index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..0000000000000000000000000000000000000000
index acd06662bf1da1f12f73e2e85c0fd1b10f3b8b93..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/Timing.java
+++ /dev/null
@@ -1,86 +0,0 @@
@@ -1,92 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
@@ -323,6 +323,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000
- * @return Timing
- */
- @NotNull
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- Timing startTiming();
-
- /**
@@ -330,6 +331,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000
- *
- * Will automatically be called when this Timing is used with try-with-resources
- */
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- void stopTiming();
-
- /**
@@ -340,6 +342,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000
- * @return Timing
- */
- @NotNull
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- Timing startTimingIfSync();
-
- /**
@@ -349,12 +352,14 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000
- *
- * But only if we are on the primary thread.
- */
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- void stopTimingIfSync();
-
- /**
- * @deprecated Doesn't do anything - Removed
- */
- @Deprecated
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- void abort();
-
- /**
@@ -366,6 +371,7 @@ index 4195efcfe044618052bb03dea34a4fb2ca7c44f0..00000000000000000000000000000000
- TimingHandler getTimingHandler();
-
- @Override
- @io.papermc.paper.annotation.DoNotUse // Purpur - Remove Timings
- void close();
-}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
@@ -1279,10 +1285,10 @@ index df142a89b8c43acb81eb383eac0ef048a1f49a6e..00000000000000000000000000000000
-}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
deleted file mode 100644
index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..0000000000000000000000000000000000000000
index 213c89fddc9413246443d66506ba5437bdb60dce..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/Timings.java
+++ /dev/null
@@ -1,325 +0,0 @@
@@ -1,324 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
@@ -1409,7 +1415,7 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000
- @NotNull
- public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
- Timing timing = of(plugin, name, groupHandler);
- timing.startTiming();
- //timing.startTiming(); // Purpur - Remove Timings
- return timing;
- }
-
@@ -1431,7 +1437,7 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000
- */
- public static void setTimingsEnabled(boolean enabled) {
- if (enabled && !warnedAboutDeprecationOnEnable) {
- Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
- //Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage())); // Purpur - Remove Timings
- warnedAboutDeprecationOnEnable = true;
- }
- }
@@ -1607,13 +1613,13 @@ index 95b7cdf0677ef71e6885fa78aa5c75bb500f5f53..00000000000000000000000000000000
- return TimingsManager.getHandler(groupName, name, groupHandler);
- }
-}
-
\ No newline at end of file
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
deleted file mode 100644
index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..0000000000000000000000000000000000000000
index 04d0dc27406e9f96224f88edb1c535176e84d395..0000000000000000000000000000000000000000
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
+++ /dev/null
@@ -1,127 +0,0 @@
@@ -1,132 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
@@ -1663,7 +1669,7 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000
- public TimingsCommand(@NotNull String name) {
- super(name);
- this.description = "Manages Spigot Timings data to see performance of the server.";
- this.usageMessage = "/timings <reset|report|on|off|verbon|verboff>";
- this.usageMessage = "/timings";// <reset|report|on|off|verbon|verboff>"; // Purpur - Remove Timings
- this.setPermission("bukkit.command.timings");
- }
-
@@ -1673,7 +1679,12 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000
- return true;
- }
- if (true) {
- sender.sendMessage(Timings.deprecationMessage());
- // Purpur start - Remove Timings
- net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage();
- sender.sendMessage(mm.deserialize("<gold>Purpur has removed timings to save your performance. Please use <click:suggest_command:'/spark'><grey>/spark</grey></click> instead"));
- sender.sendMessage(mm.deserialize("<gold>For more information, view its documentation at"));
- sender.sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>"));
- // Purpur end - Remove Timings
- return true;
- }
- if (args.length < 1) {
@@ -1734,7 +1745,7 @@ index b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da..00000000000000000000000000000000
- Preconditions.checkNotNull(args, "Arguments cannot be null");
- Preconditions.checkNotNull(alias, "Alias cannot be null");
-
- if (args.length == 1) {
- if (false && args.length == 1) { // Purpur - Remove Timings
- return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS,
- new ArrayList<String>(TIMINGS_SUBCOMMANDS.size()));
- }
@@ -2094,76 +2105,3 @@ index 632c4961515f5052551f841cfa840e60bba7a257..00000000000000000000000000000000
- super.stopTiming();
- }
-}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
deleted file mode 100644
index 12946bd55fcf7c40d39081779a7fa30049ee6165..0000000000000000000000000000000000000000
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * This file is licensed under the MIT License (MIT).
- *
- * Copyright (c) 2014 Daniel Ennis <http://aikar.co>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-package org.spigotmc;
-
-import org.bukkit.Bukkit;
-import org.jetbrains.annotations.NotNull;
-import org.bukkit.plugin.AuthorNagException;
-import co.aikar.timings.Timing;
-import co.aikar.timings.Timings;
-import co.aikar.timings.TimingsManager;
-
-import java.lang.reflect.Method;
-import java.util.logging.Level;
-
-/**
- * This is here for legacy purposes incase any plugin used it.
- *
- * If you use this, migrate ASAP as this will be removed in the future!
- *
- * @deprecated
- * @see co.aikar.timings.Timings#of
- */
-@Deprecated(forRemoval = true)
-public final class CustomTimingsHandler {
- private final Timing handler;
-
- public CustomTimingsHandler(@NotNull String name) {
- Timing timing;
-
- new AuthorNagException("Deprecated use of CustomTimingsHandler. Please Switch to Timings.of ASAP").printStackTrace();
- try {
- final Method ofSafe = TimingsManager.class.getDeclaredMethod("getHandler", String.class, String.class, Timing.class);
- ofSafe.setAccessible(true);
- timing = (Timing) ofSafe.invoke(null,"Minecraft", "(Deprecated API) " + name, null);
- } catch (Exception e) {
- e.printStackTrace();
- Bukkit.getLogger().log(Level.SEVERE, "This handler could not be registered");
- timing = Timings.NULL_HANDLER;
- }
- handler = timing;
- }
-
- public void startTiming() { handler.startTiming(); }
- public void stopTiming() { handler.stopTiming(); }
-
-}

View File

@@ -16,21 +16,16 @@
label = label.toLowerCase(Locale.ROOT).trim();
fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim();
boolean registered = register(label, command, false, fallbackPrefix);
@@ -166,17 +_,9 @@
@@ -165,12 +_,6 @@
sentCommandLabel = event.getLabel();
parsedArgs = event.getArgs();
// Purpur end - ExecuteCommandEvent
-
- // Paper start - Plugins do weird things to workaround normal registration
- if (target.timings == null) {
- target.timings = co.aikar.timings.TimingsManager.getCommandTiming(null, target);
- }
- // Paper end
-
try {
- try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources
// Note: we don't return the result of target.execute as thats success / failure, we return handled (true) or not handled (false)
target.execute(sender, sentCommandLabel, parsedArgs); // Purpur - ExecuteCommandEvent
- } // target.timings.stopTiming(); // Spigot // Paper
} catch (CommandException ex) {
server.getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
//target.timings.stopTiming(); // Spigot // Paper
//try (co.aikar.timings.Timing ignored = target.timings.startTiming()) { // Paper - use try with resources // Purpur - Remove Timings

View File

@@ -8,7 +8,7 @@
import org.yaml.snakeyaml.error.YAMLException;
/**
@@ -293,7 +_,7 @@
@@ -294,7 +_,7 @@
}
}
@@ -17,7 +17,7 @@
@Override
public void execute(@NotNull Listener listener, @NotNull Event event) throws EventException { // Paper
try {
@@ -307,7 +_,7 @@
@@ -308,7 +_,7 @@
throw new EventException(t);
}
}

View File

@@ -56,7 +56,7 @@
implementation("ca.spottedleaf:concurrentutil:0.0.2") // Paper - Add ConcurrentUtil dependency
// Paper start
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
@@ -207,26 +_,35 @@
@@ -208,26 +_,35 @@
// Paper end - spark
}

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] DivineMC Configuration
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index b545362d99d39e1fbecf2e38ba4406e7936b9d6e..18b8405ac4de2b96ae8164fd580f9bd164b8db81 100644
index 96253bf49a6895524f6f606a9c434cb1b78948a6..2c7c1335d4524486ed701365e64920091c85eaac 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -301,6 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -16,7 +16,7 @@ index b545362d99d39e1fbecf2e38ba4406e7936b9d6e..18b8405ac4de2b96ae8164fd580f9bd1
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public boolean lagging = false; // Purpur - Lagging threshold
@@ -473,6 +474,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -474,6 +475,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
@@ -74,10 +74,10 @@ index ee760cc9d6756c40f13fe6459725dcfc200b9630..f407553fa89e85412193f617d01f2e36
}
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index f6f90b69a0fe21ab9689b74b22cec272c63425fd..2d38e8a31ae290b41b05e152481199a5ed9a49d2 100644
index 236b698ebc1dc8355dce35a3f27fdea877b7c599..5ec864a48aa2582458f741b9e81be8805d55913c 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -221,6 +221,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -222,6 +222,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
@@ -89,7 +89,7 @@ index f6f90b69a0fe21ab9689b74b22cec272c63425fd..2d38e8a31ae290b41b05e152481199a5
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
if (this.convertOldUsers()) {
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index b29a421c67ce9889af32e5c049c9bc6a6d640df0..6be5095aa7d57f0c4034f9375453a882d3736fd4 100644
index fd84a5aac26bbf2de2c2fa8bb5bc76bcbd09c3e4..069f793b6dcc1e560ca0b1070b97f4f0006ae377 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -591,7 +591,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Make entity goals public
diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java
index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de2970971a54 100644
index 57c50ce5724b073b1aedf4df3129285143097303..1c3bbf91d9527ded33ec4b5a508d4c6c5b835167 100644
--- a/net/minecraft/world/entity/animal/Bee.java
+++ b/net/minecraft/world/entity/animal/Bee.java
@@ -778,7 +778,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -786,7 +786,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
&& (!state.is(Blocks.SUNFLOWER) || state.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.UPPER);
}
@@ -17,7 +17,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
public abstract boolean canBeeUse();
public abstract boolean canBeeContinueToUse();
@@ -810,7 +810,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -818,7 +818,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -26,7 +26,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
BeeBecomeAngryTargetGoal(Bee mob) {
super(mob, Player.class, 10, true, false, mob::isAngryAt);
}
@@ -837,7 +837,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -845,7 +845,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -35,7 +35,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
@Override
public boolean canBeeUse() {
if (Bee.this.hivePos != null && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0)) {
@@ -1040,7 +1040,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1048,7 +1048,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -44,7 +44,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
static final int GROW_CHANCE = 30;
@Override
@@ -1096,7 +1096,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1104,7 +1104,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -53,7 +53,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
BeeHurtByOtherGoal(final Bee mob) {
super(mob);
}
@@ -1114,7 +1114,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1122,7 +1122,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -62,7 +62,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
@Override
public boolean canBeeUse() {
return Bee.this.remainingCooldownBeforeLocatingNewHive == 0 && !Bee.this.hasHive() && Bee.this.wantsToEnterHive();
@@ -1153,7 +1153,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1161,7 +1161,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -71,7 +71,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
BeeLookControl(final Mob mob) {
super(mob);
}
@@ -1171,7 +1171,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1179,7 +1179,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -80,7 +80,7 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
private static final int MIN_POLLINATION_TICKS = 400;
private static final double ARRIVAL_THRESHOLD = 0.1;
private static final int POSITION_CHANGE_CHANCE = 25;
@@ -1340,7 +1340,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -1351,7 +1351,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
}
@@ -90,10 +90,10 @@ index 5c8b88e8dca604d053c59106e64bfcf32491ec4f..9c235c20744c637ffad780dfa962de29
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
}
diff --git a/net/minecraft/world/entity/animal/Cat.java b/net/minecraft/world/entity/animal/Cat.java
index b41ca04043e65f107edaebc49d398650898e35fb..1827c63fd06faca2f16988a71fd0d5091f99d2d5 100644
index edd796fd34e43d66a48104201d885756fdd968c3..32eb4cd68f9caa42230ea50ec8ace12c455b21f8 100644
--- a/net/minecraft/world/entity/animal/Cat.java
+++ b/net/minecraft/world/entity/animal/Cat.java
@@ -510,7 +510,7 @@ public class Cat extends TamableAnimal implements VariantHolder<Holder<CatVarian
@@ -517,7 +517,7 @@ public class Cat extends TamableAnimal implements VariantHolder<Holder<CatVarian
return this.isCrouching() || super.isSteppingCarefully();
}
@@ -102,7 +102,7 @@ index b41ca04043e65f107edaebc49d398650898e35fb..1827c63fd06faca2f16988a71fd0d509
private final Cat cat;
public CatAvoidEntityGoal(Cat cat, Class<T> entityClassToAvoid, float maxDist, double walkSpeedModifier, double sprintSpeedModifier) {
@@ -529,7 +529,7 @@ public class Cat extends TamableAnimal implements VariantHolder<Holder<CatVarian
@@ -536,7 +536,7 @@ public class Cat extends TamableAnimal implements VariantHolder<Holder<CatVarian
}
}
@@ -112,10 +112,10 @@ index b41ca04043e65f107edaebc49d398650898e35fb..1827c63fd06faca2f16988a71fd0d509
@Nullable
private Player ownerPlayer;
diff --git a/net/minecraft/world/entity/monster/Vindicator.java b/net/minecraft/world/entity/monster/Vindicator.java
index 5f68d73460adfac2ead57d168156a2784af979ae..d08a7807147d9f3d14cb84085d83391e5ceec011 100644
index b584f71440a81ac09d24e59763a21e857f290e5a..81b9553b2354452258a9a520343d39c7cf4c0233 100644
--- a/net/minecraft/world/entity/monster/Vindicator.java
+++ b/net/minecraft/world/entity/monster/Vindicator.java
@@ -95,7 +95,7 @@ public class Vindicator extends AbstractIllager {
@@ -102,7 +102,7 @@ public class Vindicator extends AbstractIllager {
this.goalSelector.addGoal(1, new AvoidEntityGoal<>(this, Creaking.class, 8.0F, 1.0, 1.2));
this.goalSelector.addGoal(2, new Vindicator.VindicatorBreakDoorGoal(this));
this.goalSelector.addGoal(3, new AbstractIllager.RaiderOpenDoorGoal(this));

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -231,6 +_,7 @@
@@ -232,6 +_,7 @@
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
@@ -8,7 +8,7 @@
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
// Purpur start - Purpur config files
@@ -301,7 +_,7 @@
@@ -326,7 +_,7 @@
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

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -2240,6 +_,7 @@
@@ -2259,6 +_,7 @@
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId()));
if (gameMode == GameType.SPECTATOR) {
this.removeEntitiesOnShoulder();

View File

@@ -18,7 +18,7 @@
flag2 = true; // Paper - diff on change, this should be moved wrongly
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
}
@@ -2387,6 +_,7 @@
@@ -2397,6 +_,7 @@
}
private void tryHandleChat(String message, Runnable handler, boolean sync) { // CraftBukkit
@@ -26,7 +26,7 @@
if (isChatMessageIllegal(message)) {
this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
@@ -2414,6 +_,15 @@
@@ -2424,6 +_,15 @@
return optional;
}
}

View File

@@ -8,7 +8,7 @@
public boolean onGround;
public boolean horizontalCollision;
public boolean verticalCollision;
@@ -1113,6 +_,12 @@
@@ -1120,6 +_,12 @@
// Paper end - detailed watchdog information
public void move(MoverType type, Vec3 movement) {
@@ -21,7 +21,7 @@
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
// Paper start - detailed watchdog information
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
@@ -4232,6 +_,7 @@
@@ -4253,6 +_,7 @@
}
public final void setBoundingBox(AABB bb) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1377,7 +_,7 @@
@@ -1385,7 +_,7 @@
player.setRealHealth(health);
}
@@ -9,7 +9,7 @@
return;
}
// CraftBukkit end
@@ -2656,6 +_,7 @@
@@ -2664,6 +_,7 @@
}
protected void updateSwingTime() {
@@ -17,7 +17,7 @@
int currentSwingDuration = this.getCurrentSwingDuration();
if (this.swinging) {
this.swingTime++;
@@ -3139,7 +_,13 @@
@@ -3148,7 +_,13 @@
}
protected float getFlyingSpeed() {
@@ -32,7 +32,7 @@
}
public float getSpeed() {
@@ -3606,6 +_,7 @@
@@ -3615,6 +_,7 @@
protected void updateFallFlying() {
this.checkSlowFallDistance();
if (!this.level().isClientSide) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -313,6 +_,12 @@
@@ -320,6 +_,12 @@
if (!this.isSilent()) {
serverLevel.levelEvent(null, 1027, this.blockPosition(), 0);
}

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/Blocks.java
+++ b/net/minecraft/world/level/block/Blocks.java
@@ -6630,6 +_,7 @@
@@ -6632,6 +_,7 @@
.mapColor(MapColor.COLOR_ORANGE)
.instrument(NoteBlockInstrument.BASEDRUM)
.requiresCorrectToolForDrops()

View File

@@ -133,10 +133,10 @@ index 05339a176083af667c16f77d76dc1878dafce3f0..0a1428b826fe4057058cf24284bd5f6f
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4cf13628c0d304fbf658fcb6f09631b282c34bfa..14a499fd21d653951a30552f740b4d1ca3851158 100644
index c68b97ab916746570229cef37357756b6df44baf..b8bc80e60dc36bfe9aac83d7f46b79303b7d66cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1087,6 +1087,7 @@ public final class CraftServer implements Server {
@@ -1101,6 +1101,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -144,7 +144,7 @@ index 4cf13628c0d304fbf658fcb6f09631b282c34bfa..14a499fd21d653951a30552f740b4d1c
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur - Purpur config files
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
@@ -3056,6 +3057,13 @@ public final class CraftServer implements Server {
@@ -3124,6 +3125,13 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}

View File

@@ -8,7 +8,7 @@
private YamlConfiguration configuration;
private YamlConfiguration commandsConfiguration;
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
@@ -1521,6 +_,7 @@
@@ -1535,6 +_,7 @@
this.getLogger().log(Level.SEVERE, null, ex);
}
@@ -16,7 +16,7 @@
this.worlds.remove(world.getName().toLowerCase(Locale.ROOT));
this.console.removeLevel(handle);
return true;
@@ -1539,6 +_,7 @@
@@ -1553,6 +_,7 @@
@Override
public World getWorld(UUID uid) {
@@ -24,7 +24,7 @@
for (World world : this.worlds.values()) {
if (world.getUID().equals(uid)) {
return world;
@@ -1562,6 +_,7 @@
@@ -1576,6 +_,7 @@
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
return;
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize default values for configs
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 31f41990623120f8de9f7c842bd8ad4f5affe59f..8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d 100644
index 702f71bed6634042bc306fa365ff00b4053d8661..8208a91dd9d15a23b17590f88ab2fefdc0fcfcf3 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -217,7 +217,7 @@ public class PurpurConfig {
@@ -240,7 +240,7 @@ public class PurpurConfig {
laggingThreshold = getDouble("settings.lagging-threshold", laggingThreshold);
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Add missing purpur config options
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d33fe31aa 100644
index 8208a91dd9d15a23b17590f88ab2fefdc0fcfcf3..0ead27518fc23943b29f163ed0feb6c61c119468 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -273,6 +273,7 @@ public class PurpurConfig {
@@ -327,6 +327,7 @@ public class PurpurConfig {
}
public static int barrelRows = 3;
@@ -16,7 +16,7 @@ index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
public static boolean cryingObsidianValidForPortalFrame = false;
@@ -306,6 +307,7 @@ public class PurpurConfig {
@@ -369,6 +370,7 @@ public class PurpurConfig {
case 1 -> 9;
default -> 27;
});
@@ -25,10 +25,10 @@ index 8f9a73f524ffaa439f0cb59eeb3de3c2ff9fac3d..3ba75f262e7477fc4d1a544599646e1d
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 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b389f0d22c 100644
index 22e793c40f3a784b514905c1d756d4cbdf1fd740..235c851e8dd202690a5eac6537d22d244c012494 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -979,12 +979,20 @@ public class PurpurWorldConfig {
@@ -1144,12 +1144,20 @@ public class PurpurWorldConfig {
public boolean allayControllable = true;
public double allayMaxHealth = 20.0D;
public double allayScale = 1.0D;
@@ -49,7 +49,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
}
public boolean armadilloRidable = false;
@@ -1124,6 +1132,10 @@ public class PurpurWorldConfig {
@@ -1299,6 +1307,10 @@ public class PurpurWorldConfig {
public double camelMovementSpeedMin = 0.09D;
public double camelMovementSpeedMax = 0.09D;
public int camelBreedingTicks = 6000;
@@ -60,7 +60,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
private void camelSettings() {
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
@@ -1133,6 +1145,10 @@ public class PurpurWorldConfig {
@@ -1308,6 +1320,10 @@ public class PurpurWorldConfig {
camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin);
camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax);
camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks);
@@ -71,7 +71,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
}
public boolean catRidable = false;
@@ -1539,12 +1555,22 @@ public class PurpurWorldConfig {
@@ -1764,12 +1780,22 @@ public class PurpurWorldConfig {
public boolean frogControllable = true;
public float frogRidableJumpHeight = 0.65F;
public int frogBreedingTicks = 6000;
@@ -94,7 +94,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
}
public boolean ghastRidable = false;
@@ -2439,6 +2465,10 @@ public class PurpurWorldConfig {
@@ -2776,6 +2802,10 @@ public class PurpurWorldConfig {
public double snifferMaxHealth = 14.0D;
public double snifferScale = 1.0D;
public int snifferBreedingTicks = 6000;
@@ -105,7 +105,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
private void snifferSettings() {
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
@@ -2446,6 +2476,10 @@ public class PurpurWorldConfig {
@@ -2783,6 +2813,10 @@ public class PurpurWorldConfig {
snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth);
snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D);
snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks);
@@ -116,7 +116,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
}
public boolean squidRidable = false;
@@ -2539,10 +2573,20 @@ public class PurpurWorldConfig {
@@ -2884,10 +2918,20 @@ public class PurpurWorldConfig {
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
@@ -137,7 +137,7 @@ index 278e43c190613a0181211c160e063a514afae1ae..8203ff823587b6a282506620d0b1f6b3
}
public boolean traderLlamaRidable = false;
@@ -2730,10 +2774,20 @@ public class PurpurWorldConfig {
@@ -3116,10 +3160,20 @@ public class PurpurWorldConfig {
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;

View File

@@ -2,7 +2,7 @@ group = space.bxteam.divinemc
mcVersion = 1.21.4
version = 1.21.4-R0.1-SNAPSHOT
purpurRef = a4e8b4d70b42fbecd7dc4ea82cad847f6fd65282
purpurRef = ad38c53a655585a430dcd2ae79b99f576dd53b4a
org.gradle.configuration-cache=true
org.gradle.caching = true