mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-29 11:59:24 +00:00
Some work
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
</div>
|
||||
|
||||
> [!WARNING]
|
||||
> Leaf is a performance-oriented fork. Make sure to take backups **before** switching to it. Everyone is welcome to contribute optimizations or report issues to help us improve.
|
||||
> Current Leaf 1.21.9 is a temp branch which is isolated from the 1.21.8 branch. \
|
||||
> Update Paper upstream will be done every month, and will not receive fixes from Leaf 1.21.8, until Leaf 1.21.8 becomes stable again. \
|
||||
> It's only for people want to try or test 1.21.9, **DO NOT** use in production!
|
||||
|
||||
**English** | [中文](public/readme/README_CN.md)
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ index bb021fc9de91f8c4f79e6a753d57fa157efbbda7..9926848124f0b74ebb615fbbc45d95eb
|
||||
final DamageSource damageSource = this.copy();
|
||||
damageSource.eventEntityDamager = entity;
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index 384f2cd090d6d23bd1308d6e82c24338f2bf55d1..3634d68c77ee99567b51a9a848d7cbbb218a0ba7 100644
|
||||
index 8ea830f561f5b7d6ff6ca3c38adc7fe8e54e4cc7..55c329b758f53cb292f130723a167e6c2142a4f5 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -308,7 +308,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -309,7 +309,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Paper (https://github.com/PaperMC/Paper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index d6dcb6d146d89a8fb96e7c669e5deb802223abd6..84f4f0c87f904a31f3f972e9fb1da8a01474dfca 100644
|
||||
index 7d3d12f10bab86ac77caf1a4369cfcb65df91bf3..adce3c9357e555ae1fcce45a15c7602e8b5ebc20 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -300,6 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -307,6 +307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public volatile boolean abnormalExit; // Paper - Improved watchdog support
|
||||
public volatile Thread shutdownThread; // Paper - Improved watchdog support
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
@@ -24,36 +24,37 @@ index d6dcb6d146d89a8fb96e7c669e5deb802223abd6..84f4f0c87f904a31f3f972e9fb1da8a0
|
||||
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 static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
|
||||
@@ -471,6 +472,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -476,6 +477,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
|
||||
this.paperConfigurations = services.paper().configurations(); // Paper - add paper configuration files
|
||||
+ this.galeConfigurations = services.galeConfigurations(); // Gale - Gale configuration
|
||||
}
|
||||
|
||||
private void readScoreboard(DimensionDataStorage dataStorage) {
|
||||
diff --git a/net/minecraft/server/Services.java b/net/minecraft/server/Services.java
|
||||
index 015e3ff8d856a7722def4448d8c68792cc3a32a2..e7c3d84d64cc62989c01019b71c499ae39ea3a41 100644
|
||||
index 94ea277d53c97d6518265c25411b908659f2c9f9..1fba1962dd12d7ae0866929e6668e13e3ad3ee6f 100644
|
||||
--- a/net/minecraft/server/Services.java
|
||||
+++ b/net/minecraft/server/Services.java
|
||||
@@ -11,13 +11,13 @@ import net.minecraft.server.players.GameProfileCache;
|
||||
import net.minecraft.util.SignatureValidator;
|
||||
|
||||
public record Services(
|
||||
- MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations // Paper - add paper configuration files
|
||||
+ MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @javax.annotation.Nullable org.galemc.gale.configuration.GaleConfigurations galeConfigurations // Paper - add paper configuration files // Gale - Gale configuration
|
||||
@@ -19,6 +19,7 @@ public record Services(
|
||||
UserNameToIdResolver nameToIdCache,
|
||||
ProfileResolver profileResolver
|
||||
, @javax.annotation.Nullable PaperServices paper // Paper
|
||||
+ , @javax.annotation.Nullable org.galemc.gale.configuration.GaleConfigurations galeConfigurations // Gale - Gale configuration
|
||||
) {
|
||||
public static final String USERID_CACHE_FILE = "usercache.json";
|
||||
|
||||
// Paper start - add paper configuration files
|
||||
public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
|
||||
- this(sessionService, servicesKeySet, profileRepository, profileCache, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, profileCache, null, null); // Gale - Gale configuration
|
||||
@@ -29,7 +30,7 @@ public record Services(
|
||||
) {}
|
||||
|
||||
public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, UserNameToIdResolver nameToIdCache, ProfileResolver profileResolver) {
|
||||
- this(sessionService, servicesKeySet, profileRepository, nameToIdCache, profileResolver, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, nameToIdCache, profileResolver, null, null); // Gale - Gale configuration
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -25,6 +25,12 @@ public record Services(
|
||||
return java.util.Objects.requireNonNull(this.paperConfigurations);
|
||||
@@ -37,6 +38,12 @@ public record Services(
|
||||
return java.util.Objects.requireNonNull(this.paper);
|
||||
}
|
||||
// Paper end - add paper configuration files
|
||||
+ // Gale start - Gale configuration
|
||||
@@ -65,23 +66,23 @@ index 015e3ff8d856a7722def4448d8c68792cc3a32a2..e7c3d84d64cc62989c01019b71c499ae
|
||||
|
||||
public static Services create(YggdrasilAuthenticationService authenticationService, File profileRepository, File userCacheFile, joptsimple.OptionSet optionSet) throws Exception { // Paper - add optionset to load paper config files; add userCacheFile parameter
|
||||
MinecraftSessionService minecraftSessionService = authenticationService.createMinecraftSessionService();
|
||||
@@ -34,7 +40,10 @@ public record Services(
|
||||
final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath();
|
||||
final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath();
|
||||
io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, profileRepository.toPath(), (File) optionSet.valueOf("spigot-settings"));
|
||||
- return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations);
|
||||
@@ -51,7 +58,10 @@ public record Services(
|
||||
new io.papermc.paper.profile.PaperFilledProfileCache()
|
||||
);
|
||||
ProfileResolver profileResolver = new ProfileResolver.Cached(minecraftSessionService, userNameToIdResolver, paperServices.filledProfileCache());
|
||||
- return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, userNameToIdResolver, profileResolver, paperServices);
|
||||
+ // Gale start - Gale configuration
|
||||
+ org.galemc.gale.configuration.GaleConfigurations galeConfigurations = org.galemc.gale.configuration.GaleConfigurations.setup(configDirPath);
|
||||
+ return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations, galeConfigurations);
|
||||
+ return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, userNameToIdResolver, profileResolver, paperServices, galeConfigurations);
|
||||
+ // Gale end - Gale configuration
|
||||
// Paper end - load paper config files from cli options
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5fea5e2e9fc10d348fa3e65cd354ef6a4a717a4d..92a6376d4a242f4ca276cf8232f083d9734f5ee9 100644
|
||||
index 9b3894ec6d458a8d7ed8078fb51193c5dfa1641c..26ebab18013d4587c2de5c62c14df486afae9f15 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -171,6 +171,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -264,6 +264,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
|
||||
@@ -93,23 +94,23 @@ index 5fea5e2e9fc10d348fa3e65cd354ef6a4a717a4d..92a6376d4a242f4ca276cf8232f083d9
|
||||
// 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 dda8d38ef61672cc714d9e5a475f9b0412ed5ff9..b4c983216cd839d793a09e327bb2f15ab90cbff8 100644
|
||||
index 6c0b1ce3888ab599a84fb4a8ee69a0d6454e50fd..65757a85d6836fbfb4bebf0273d9f4291a64ee88 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -583,7 +583,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -602,7 +602,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
org.bukkit.generator.BiomeProvider biomeProvider // CraftBukkit
|
||||
) {
|
||||
// CraftBukkit start
|
||||
- super(serverLevelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(levelStorageAccess.levelDirectory.path(), serverLevelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), serverLevelData.getGameRules())), dispatcher); // Paper - create paper world configs; Async-Anti-Xray: Pass executor
|
||||
+ super(serverLevelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(levelStorageAccess.levelDirectory.path(), serverLevelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), serverLevelData.getGameRules())), spigotConfig -> server.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(levelStorageAccess.levelDirectory.path(), serverLevelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), serverLevelData.getGameRules())), dispatcher); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Gale - Gale configuration
|
||||
this.pvpMode = server.isPvpAllowed();
|
||||
this.levelStorageAccess = levelStorageAccess;
|
||||
- super(levelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(storageSource.levelDirectory.path(), levelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), levelData.getGameRules())), dispatcher); // Paper - create paper world configsAsync-Anti-Xray: Pass executor
|
||||
+ super(levelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(storageSource.levelDirectory.path(), levelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), levelData.getGameRules())), spigotConfig -> server.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(storageSource.levelDirectory.path(), levelData.getLevelName(), dimension.location(), spigotConfig, server.registryAccess(), levelData.getGameRules())), dispatcher); // Paper - create paper world configsAsync-Anti-Xray: Pass executor // Gale - Gale configuration
|
||||
this.levelStorageAccess = storageSource;
|
||||
this.uuid = org.bukkit.craftbukkit.util.WorldUUID.getOrCreate(levelStorageAccess.levelDirectory.path().toFile());
|
||||
this.levelLoadListener = new net.minecraft.server.level.progress.LoggingLevelLoadListener(false, this);
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index c41df4b1fff1f65532256e835dc30fadbb4f8c8b..4b96e512905aca3b69408145054c0658ee932eed 100644
|
||||
index a0cc94561c77b5e20b9dcee3190fe26cdaf55036..65a1ef05643f5eb65bb0b815c3975579c7374dcd 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -159,6 +159,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -164,6 +164,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
return this.paperConfig;
|
||||
}
|
||||
// Paper end - add paper world config
|
||||
@@ -122,7 +123,7 @@ index c41df4b1fff1f65532256e835dc30fadbb4f8c8b..4b96e512905aca3b69408145054c0658
|
||||
|
||||
public static @Nullable BlockPos lastPhysicsProblem; // Spigot
|
||||
private int tileTickPosition;
|
||||
@@ -827,6 +833,8 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -832,6 +838,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
org.bukkit.World.Environment environment, // Paper
|
||||
java.util.function.Function<org.spigotmc.SpigotWorldConfig, // Spigot - create per world config
|
||||
io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, // Paper - create paper world config
|
||||
@@ -131,7 +132,7 @@ index c41df4b1fff1f65532256e835dc30fadbb4f8c8b..4b96e512905aca3b69408145054c0658
|
||||
java.util.concurrent.Executor executor // Paper - Anti-Xray
|
||||
) {
|
||||
// Paper start - getblock optimisations - cache world height/sections
|
||||
@@ -840,6 +848,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -845,6 +853,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
// Paper end - getblock optimisations - cache world height/sections
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) levelData).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||
|
||||
@@ -13,10 +13,10 @@ Update config reload:
|
||||
(Or sync reload)
|
||||
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf094cb30599 100644
|
||||
index 8d299a75c80fddc61a2aa4dc5b0dc5948aef5a0d..307187a16a3a5219b432237845f9cf6c4a6f897d 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -109,10 +109,12 @@ public class Main {
|
||||
@@ -107,10 +107,12 @@ public class Main {
|
||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf09
|
||||
DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support
|
||||
dedicatedServerSettings.forceSave();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index b737c4a6ae23342d71efeec99bee61eee1f1a67d..a795aa7a812a1773ba76d03ab8dba6e9b1ecf298 100644
|
||||
index adce3c9357e555ae1fcce45a15c7602e8b5ebc20..a43a0ecdc073ef1d8544f8e8cf8cf9146de89c51 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1186,6 +1186,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1118,6 +1118,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.tick();
|
||||
// Paper end
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
|
||||
@@ -18,10 +18,10 @@ Leaf config v3 move to new key
|
||||
...
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index c697b3adeabd4f913e9e5e0b90c620a2a642f35d..c2ed1b0b67e62434292ebf3edd70c74af0c0d9af 100644
|
||||
index 26ebab18013d4587c2de5c62c14df486afae9f15..f36998b6d484afb900c399bd8b906977250c58d4 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -185,6 +185,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -278,6 +278,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -99,7 +99,7 @@ public class Main {
|
||||
```
|
||||
|
||||
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
|
||||
index ab3a221c115992d0f4ea921aa92cf0976b815ff4..75da3011058918e1da6936522f19a2ccdb843d73 100644
|
||||
index 0713d164851216483247da09ff7901f8bfbe2eb9..65ad3ea9439fed47766ec7576760380d259ddfe5 100644
|
||||
--- a/net/minecraft/util/Mth.java
|
||||
+++ b/net/minecraft/util/Mth.java
|
||||
@@ -58,18 +58,15 @@ public class Mth {
|
||||
@@ -139,21 +139,4 @@ index ab3a221c115992d0f4ea921aa92cf0976b815ff4..75da3011058918e1da6936522f19a2cc
|
||||
+ return (int) Math.ceil(value); // Gale - use platform math functions
|
||||
}
|
||||
|
||||
public static int clamp(int value, int min, int max) {
|
||||
@@ -123,15 +118,7 @@ public class Mth {
|
||||
}
|
||||
|
||||
public static double absMax(double x, double y) {
|
||||
- if (x < 0.0) {
|
||||
- x = -x;
|
||||
- }
|
||||
-
|
||||
- if (y < 0.0) {
|
||||
- y = -y;
|
||||
- }
|
||||
-
|
||||
- return Math.max(x, y);
|
||||
+ return Math.max(Math.abs(x), Math.abs(y)); // Gale - use platform math functions
|
||||
}
|
||||
|
||||
public static int floorDiv(int dividend, int divisor) {
|
||||
public static long ceilLong(double value) {
|
||||
|
||||
@@ -9,10 +9,10 @@ Gale - https://galemc.org
|
||||
The JMH benchmark of this patch can be found in SunBox's `FasterFloatingPointPositiveModulo`
|
||||
|
||||
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
|
||||
index 75da3011058918e1da6936522f19a2ccdb843d73..1b60fa34e4d6a5c00a983bf94e4d16d1eb46c665 100644
|
||||
index 65ad3ea9439fed47766ec7576760380d259ddfe5..3cd7364363863bde9f7a89a5830d7cf80f2a045d 100644
|
||||
--- a/net/minecraft/util/Mth.java
|
||||
+++ b/net/minecraft/util/Mth.java
|
||||
@@ -149,14 +149,26 @@ public class Mth {
|
||||
@@ -154,14 +154,26 @@ public class Mth {
|
||||
return Math.floorMod(x, y);
|
||||
}
|
||||
|
||||
@@ -42,10 +42,10 @@ index 75da3011058918e1da6936522f19a2ccdb843d73..1b60fa34e4d6a5c00a983bf94e4d16d1
|
||||
return number % multiple == 0;
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/levelgen/blending/Blender.java b/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
index 01e5b29d6e9a5c53c0e23b61ed0c1d7be1a0fe08..314a189e2099e3688fd23e7100120abea6886ccd 100644
|
||||
index 78c77a25c0e81496336611d6999cc0da05094ca2..c3edcedcc87f474cc1d40fcea23047662fce9739 100644
|
||||
--- a/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
+++ b/net/minecraft/world/level/levelgen/blending/Blender.java
|
||||
@@ -144,7 +144,7 @@ public class Blender {
|
||||
@@ -149,7 +149,7 @@ public class Blender {
|
||||
private static double heightToOffset(double height) {
|
||||
double d = 1.0;
|
||||
double d1 = height + 0.5;
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index ee16a05b8b2747ce95fcae1616c96143a5dec74e..36124bfd4189e35208875e971733889410242641 100644
|
||||
index d538b1df2b07abd1c4257726891238696bf7a718..d4a8ec0effa773b85519f0d428e4f23181f36335 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -50,6 +50,55 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -51,6 +51,55 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
super(entityType, level);
|
||||
}
|
||||
|
||||
@@ -89,4 +89,4 @@ index ee16a05b8b2747ce95fcae1616c96143a5dec74e..36124bfd4189e35208875e9717338894
|
||||
+
|
||||
protected void setOwner(@Nullable EntityReference<Entity> owner) {
|
||||
this.owner = owner;
|
||||
}
|
||||
this.refreshProjectileSource(false); // Paper
|
||||
|
||||
@@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we
|
||||
initialize it earlier, ensuring that it is available sooner.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 1413511500ce8ae25cc4af1d54fc33c8912c24bc..0665c2ec275086b8c555c550af93dfef197fba07 100644
|
||||
index 2a8d613a2c041ea1ed034d66b20955845a4c0255..d02ffa4ed99e44bdaa07bd1d7c7465007f667d3a 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -834,8 +834,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -864,8 +864,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
|
||||
// Paper start - optimise random ticking
|
||||
@@ -32,10 +32,10 @@ index 1413511500ce8ae25cc4af1d54fc33c8912c24bc..0665c2ec275086b8c555c550af93dfef
|
||||
final LevelChunkSection[] sections = chunk.getSections();
|
||||
final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this);
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 9f630dda781dd540ab5655bd7ce916949eeee61c..19a9b37bad1d465440047cbde9a00b12ba5d9a4b 100644
|
||||
index 406f5f758370d3d53dcd32c1abc65d2851d2235e..9b6d21735c10d89b618c6ae4632e6b9ad34dc735 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -174,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
private int tileTickPosition;
|
||||
public final Map<ServerExplosion.CacheKey, Float> explosionDensityCache = new java.util.HashMap<>(); // Paper - Optimize explosions
|
||||
public java.util.ArrayDeque<net.minecraft.world.level.block.RedstoneTorchBlock.Toggle> redstoneUpdateInfos; // Paper - Faster redstone torch rapid clock removal; Move from Map in BlockRedstoneTorch to here
|
||||
|
||||
@@ -52,10 +52,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 6020b71802babb35ef60aca65afe9c2612c05bb7..e53440bd5f0e659db0745a009540520f6dc41238 100644
|
||||
index b0a699f967e4078dd1363261bfa58f519ec3d6c2..49595e4cc8de3200608d2e8afff52da64642e8b0 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -500,6 +500,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -495,6 +495,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
long l = gameTime - this.lastInhabitedUpdate;
|
||||
this.lastInhabitedUpdate = gameTime;
|
||||
if (!this.level.isDebug()) {
|
||||
@@ -64,10 +64,10 @@ index 6020b71802babb35ef60aca65afe9c2612c05bb7..e53440bd5f0e659db0745a009540520f
|
||||
this.tickChunks(l); // Gale - Purpur - remove vanilla profiler
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb1557ca74ee 100644
|
||||
index d02ffa4ed99e44bdaa07bd1d7c7465007f667d3a..413bc3ccd89cbf04b52c5e60fec2880f5ea72e32 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -883,13 +883,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -913,13 +913,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
// Paper end - optimise random ticking
|
||||
|
||||
@@ -84,7 +84,7 @@ index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb15
|
||||
for (int i = 0; i < randomTickSpeed; i++) {
|
||||
if (simpleRandom.nextInt(48) == 0) { // Paper - optimise random ticking
|
||||
this.tickPrecipitation(this.getBlockRandomPos(minBlockX, 0, minBlockZ, 15));
|
||||
@@ -907,7 +909,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -937,7 +939,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
boolean isRaining = this.isRaining();
|
||||
int minBlockX = pos.getMinBlockX();
|
||||
int minBlockZ = pos.getMinBlockZ();
|
||||
@@ -94,10 +94,10 @@ index 0665c2ec275086b8c555c550af93dfef197fba07..6bc70c1d53049a1f75268ab9944bfb15
|
||||
if (this.isRainingAt(blockPos)) {
|
||||
DifficultyInstance currentDifficultyAt = this.getCurrentDifficultyAt(blockPos);
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..9e2debee38bc4b25281c8a8c6e7082cca1f7b569 100644
|
||||
index 5fe908727c0131bf5e04c6f5bc64f52c19a013a0..f7c0629c3495d048a19b14d54815b669dee95229 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -128,6 +128,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -135,6 +135,18 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
}
|
||||
// Paper end - get block chunk optimisation
|
||||
|
||||
@@ -116,7 +116,7 @@ index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..9e2debee38bc4b25281c8a8c6e7082cc
|
||||
public LevelChunk(Level level, ChunkPos pos) {
|
||||
this(level, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, null, null, null);
|
||||
}
|
||||
@@ -164,6 +176,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -171,6 +183,8 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
this.debug = !empty && this.level.isDebug();
|
||||
this.defaultBlockState = empty ? VOID_AIR_BLOCKSTATE : AIR_BLOCKSTATE;
|
||||
// Paper end - get block chunk optimisation
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 4edd94ac765d2ab107612504b67e6e07da609313..9b0235c50426accde002cbb0a09a992f13b05cd7 100644
|
||||
index dcb49e8305aa8b9215da9f77fa147f701fdbbef0..9d23d413cc76f90c856387659169b4e9a44f690f 100644
|
||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -296,11 +296,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -302,11 +302,19 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
private boolean teleport(double x, double y, double z) {
|
||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ index ae2bb9a73106febfe5f0d090abd4252bbb5fd27e..eee9c41e40402e52b73f34a734b4cbde
|
||||
}
|
||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index c2f93f2e71ea5cab84a5821d952a6f90dc1068ed..bd22f0bca65be702a92641a95e944e43f882e440 100644
|
||||
index ca46c3a7ba5ffb6cd552cc1313db615c28bd7509..b51c565c9785bc22306380744f8f855ebe9e2b11 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2115,6 +2115,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -2147,6 +2147,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,28 +40,29 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/world/phys/shapes/EntityCollisionContext.java b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917fedabd54 100644
|
||||
index a2467db9f096368810e3c1ab8ddabf610fa38379..59edec180a3f2aa4665e380651b213bcd0d45cba 100644
|
||||
--- a/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
+++ b/net/minecraft/world/phys/shapes/EntityCollisionContext.java
|
||||
@@ -19,27 +19,39 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
return canAscend;
|
||||
}
|
||||
};
|
||||
@@ -12,27 +12,41 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
|
||||
public class EntityCollisionContext implements CollisionContext {
|
||||
+ // Gale start - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
+ /*
|
||||
private final boolean descending;
|
||||
private final double entityBottom;
|
||||
private final boolean placement;
|
||||
private final ItemStack heldItem;
|
||||
private final Predicate<FluidState> canStandOnFluid;
|
||||
private final boolean alwaysCollideWithFluid;
|
||||
+ */
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
+ private final boolean placement;
|
||||
+ private final boolean alwaysCollideWithFluid;
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
@Nullable
|
||||
private final Entity entity;
|
||||
|
||||
protected EntityCollisionContext(
|
||||
boolean descending, boolean placement, double entityBottom, ItemStack heldItem, Predicate<FluidState> canStandOnFluid, @Nullable Entity entity
|
||||
boolean descending, boolean placement, double entityBottom, ItemStack heldItem, boolean alwaysCollideWithFluid, @Nullable Entity entity
|
||||
) {
|
||||
+ // Gale start - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
+ /*
|
||||
@@ -69,10 +70,11 @@ index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917
|
||||
this.placement = placement;
|
||||
this.entityBottom = entityBottom;
|
||||
this.heldItem = heldItem;
|
||||
this.canStandOnFluid = canStandOnFluid;
|
||||
this.alwaysCollideWithFluid = alwaysCollideWithFluid;
|
||||
+ */
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
+ this.placement = placement;
|
||||
+ this.alwaysCollideWithFluid = alwaysCollideWithFluid;
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove these and pray no plugin uses them
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
@@ -83,12 +85,13 @@ index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917
|
||||
this(
|
||||
entity.isDescending(),
|
||||
placement,
|
||||
@@ -50,16 +62,20 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
: (entity instanceof LivingEntity livingEntity ? fluidState -> livingEntity.canStandOnFluid(fluidState) : fluidState -> false),
|
||||
@@ -41,11 +55,16 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
canStandOnFluid,
|
||||
entity
|
||||
);
|
||||
+ */
|
||||
+ this.placement = placement;
|
||||
+ this.alwaysCollideWithFluid = canStandOnFluid;
|
||||
+ this.entity = entity;
|
||||
+ // Gale end - Airplane - make EntityCollisionContext a live representation - remove unneeded things
|
||||
}
|
||||
@@ -100,13 +103,7 @@ index ebc9360ea64a248418fcac8b446664b0dd019335..b09d1b7c76410580663f2419e3b5e917
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canStandOnFluid(FluidState fluid1, FluidState fluid2) {
|
||||
- return this.canStandOnFluid.test(fluid2) && !fluid1.getType().isSame(fluid2.getType());
|
||||
+ return this.entity instanceof LivingEntity livingEntity && livingEntity.canStandOnFluid(fluid2) && !fluid1.getType().isSame(fluid2.getType()); // Gale - Airplane - make EntityCollisionContext a live representation
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,12 +85,12 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
@@ -65,12 +84,12 @@ public class EntityCollisionContext implements CollisionContext {
|
||||
|
||||
@Override
|
||||
public boolean isDescending() {
|
||||
|
||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||
index e958972ca09eb0ab07d81990e661076ab0371850..5df8ee3955593e70f0e67e91431e464d177bdeeb 100644
|
||||
index 39daebffb12628a47c8e7c3055ecb911e457917e..29ded5aa70a4a2d6de4533e487170eaf0dc61fdf 100644
|
||||
--- a/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -193,19 +193,25 @@ public class ServerEntity {
|
||||
@@ -181,19 +181,25 @@ public class ServerEntity {
|
||||
packet = ClientboundEntityPositionSyncPacket.of(this.entity);
|
||||
flag3 = true;
|
||||
flag4 = true;
|
||||
|
||||
@@ -33,10 +33,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 6bc70c1d53049a1f75268ab9944bfb1557ca74ee..a9c2f419200483673f6743ed94af110a8e875e71 100644
|
||||
index 413bc3ccd89cbf04b52c5e60fec2880f5ea72e32..24f3954645dfd5142de2f2ae964ba5caf12582ac 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -788,7 +788,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -809,7 +809,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
entity.stopRiding();
|
||||
}
|
||||
|
||||
@@ -58,10 +58,10 @@ index 6bc70c1d53049a1f75268ab9944bfb1557ca74ee..a9c2f419200483673f6743ed94af110a
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index a4c915c8fdd167bfa2c5ef20c5ec7acc53c89726..a0254e85fccebb66ce02bd58f9d461addd8ad73d 100644
|
||||
index 9b6d21735c10d89b618c6ae4632e6b9ad34dc735..e49d7bc1b060ee3922bb171ba0e7723148c601df 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1489,10 +1489,10 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1443,10 +1443,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, var6);
|
||||
getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, var6))); // Paper - ServerExceptionEvent
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index b63f1b27c60faf90b3d991b9a88b0642afa29a93..38266ae67c440e94d30cd16ab09232906e1e8d7d 100644
|
||||
index 1e8aec79decfe160e8c19b907f1441637b2832be..f58799f368071b1a7bc3b5814261177c002d13f6 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -190,6 +190,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -283,6 +283,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
|
||||
@@ -27,6 +27,6 @@ index b63f1b27c60faf90b3d991b9a88b0642afa29a93..38266ae67c440e94d30cd16ab0923290
|
||||
+ } catch (Throwable ignored) {}
|
||||
+ // Gale end - Pufferfish - SIMD support
|
||||
+
|
||||
this.setPvpAllowed(properties.pvp);
|
||||
this.setFlightAllowed(properties.allowFlight);
|
||||
this.setMotd(properties.motd);
|
||||
// this.worldData.setGameType(properties.gameMode.get()); // CraftBukkit - moved to world loading
|
||||
LOGGER.info("Default game type: {}", properties.gameMode.get());
|
||||
// Paper start - Unix domain socket support
|
||||
|
||||
@@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this
|
||||
functionality before additional exploits are found.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ca13dd72f173be6714965c506f2d48dcd3c9e569..81d6bad5ef230de7852c79a607eb2f5aa32768da 100644
|
||||
index edbf335a758c2bdd4b581e57fc3167bb0341e00a..8a4256925045f70990805c4bef1e5f8de2beea37 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1269,6 +1269,11 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1275,6 +1275,11 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
|
||||
@@ -28,11 +28,11 @@ but is so much cheaper than the suffocation check that it's worth
|
||||
keeping it.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index bd22f0bca65be702a92641a95e944e43f882e440..1b7d8a8838e9b75bc12ce4b9f30429110e9af913 100644
|
||||
index b51c565c9785bc22306380744f8f855ebe9e2b11..6bd80817991a0f21d650c89e24193e4c4f98769e 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -433,7 +433,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
@@ -436,7 +436,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
super.baseTick();
|
||||
if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) {
|
||||
boolean flag = this instanceof Player;
|
||||
- if (this.isInWall()) {
|
||||
@@ -42,8 +42,8 @@ index bd22f0bca65be702a92641a95e944e43f882e440..1b7d8a8838e9b75bc12ce4b9f3042911
|
||||
+ // Gale end - Pufferfish - reduce in wall checks
|
||||
this.hurtServer(serverLevel1, this.damageSources().inWall(), 1.0F);
|
||||
} else if (flag && !serverLevel1.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||
double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getDamageSafeZone();
|
||||
@@ -1399,6 +1402,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
double d = serverLevel1.getWorldBorder().getDistanceToBorder(this) + serverLevel1.getWorldBorder().getSafeZone();
|
||||
@@ -1406,6 +1409,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
Only do an item "suck in" action once per second
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 51804b611f469f2ab53e455e8c633b867b00cc88..fcb1f6806908eb66592dc52f2b57286498cf7032 100644
|
||||
index e9a7630b7f2a4b49e2794fcd64dc19b7002d27a1..8b176f5783d810b41a37db09b328992157986099 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -148,7 +148,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -139,7 +139,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -34,7 +34,7 @@ index 51804b611f469f2ab53e455e8c633b867b00cc88..fcb1f6806908eb66592dc52f2b572864
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
|
||||
@@ -232,9 +238,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -223,9 +229,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
||||
@@ -67,7 +67,7 @@ index 51804b611f469f2ab53e455e8c633b867b00cc88..fcb1f6806908eb66592dc52f2b572864
|
||||
@Override
|
||||
public BlockPos getBlockPosBelowThatAffectsMyMovement() {
|
||||
diff --git a/net/minecraft/world/entity/vehicle/MinecartHopper.java b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
index 41a6ec508a10a49a37539d2f10171d15c233b280..fb099517927f3c2699a348ea7692772c5420b8d1 100644
|
||||
index 99e7fad89a55909e345e15b3bec0b10471a72f22..a0928f913ec3863198d09f09b65119f7702852e6 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||
@@ -23,6 +23,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||
@@ -105,10 +105,10 @@ index 484c2ba2752fbf3ad929e46c2f078e906f6f0637..6ced5a7e27703a7cf5a7495dc3a1a290
|
||||
|
||||
double getLevelY();
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 01ed25d1f895d94485b5fecd98476534cbb26930..c1fcd9e0ab47332ce48e391c6cd1455960340df3 100644
|
||||
index 28348e3881c3c8591053a01b193fb2a956f79726..737344e0ca9babd4aaafb6c162eb44df920fac98 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -544,7 +544,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -545,7 +545,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = hopper.isGridAligned() && blockState.isCollisionShapeFullBlock(level, blockPos) && !blockState.is(BlockTags.DOES_NOT_BLOCK_HOPPERS);
|
||||
@@ -117,7 +117,7 @@ index 01ed25d1f895d94485b5fecd98476534cbb26930..c1fcd9e0ab47332ce48e391c6cd14559
|
||||
for (ItemEntity itemEntity : getItemsAtAndAbove(level, hopper)) {
|
||||
if (addItem(hopper, itemEntity)) {
|
||||
return true;
|
||||
@@ -822,6 +822,34 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -823,6 +823,34 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
return stack1.getCount() < stack1.getMaxStackSize() && ItemStack.isSameItemSameComponents(stack1, stack2); // Paper - Perf: Optimize Hoppers; used to return true for full itemstacks?!
|
||||
}
|
||||
|
||||
|
||||
@@ -13,24 +13,24 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 822691293834c4da31adb2573fbc87467db2daa5..917908e69154c5c5c9f847ae47548ee3d9221bc2 100644
|
||||
index 2edec1f0a6b456959139f897c41d96af55365156..636f9ae7320a9f4a06459b2e8682099f309fa3f7 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -424,6 +424,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -437,6 +437,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public boolean sentListPacket = false;
|
||||
public boolean supressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready
|
||||
public boolean suppressTrackerForLogin = false; // Paper - Fire PlayerJoinEvent when Player is actually ready
|
||||
// CraftBukkit end
|
||||
+ public boolean didPlayerJoinEvent = false; // Gale - EMC - do not process chat/commands before player has joined
|
||||
public boolean isRealPlayer; // Paper
|
||||
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 81d6bad5ef230de7852c79a607eb2f5aa32768da..08c0b02e8f70dfc349da2b534435b5f09f99e2b8 100644
|
||||
index 8a4256925045f70990805c4bef1e5f8de2beea37..e318003a58db37d5d278e7f6a35f6a2983d3e673 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2443,7 +2443,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2450,7 +2450,7 @@ public class ServerGamePacketListenerImpl
|
||||
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
|
||||
} else if (this.player.isRemoved() || (!bypassHiddenChat && this.player.getChatVisibility() == ChatVisiblity.HIDDEN)) { // CraftBukkit - dead men tell no tales
|
||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
- } else {
|
||||
+ } else if (player.didPlayerJoinEvent) { // Gale - EMC - do not process chat/commands before player has joined
|
||||
@@ -38,15 +38,15 @@ index 81d6bad5ef230de7852c79a607eb2f5aa32768da..08c0b02e8f70dfc349da2b534435b5f0
|
||||
// CraftBukkit start
|
||||
if (sync) {
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 33b1a6fdf169001093642cc8200d2789e80692b0..c0129b6e5c74a5412546c167fb03b705686c996f 100644
|
||||
index cacd56bfe256f34b3d9211fea8bd9c933fad11cb..0ed0e3db7909fe0a24a405ab96cc5e3067eb011c 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -335,6 +335,8 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
@@ -238,6 +238,8 @@ public abstract class PlayerList {
|
||||
return;
|
||||
}
|
||||
|
||||
+ player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
||||
+ player.didPlayerJoinEvent = true; // Gale - EMC - do not process chat/commands before player has joined
|
||||
+
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage();
|
||||
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 08c0b02e8f70dfc349da2b534435b5f09f99e2b8..7b4eb3773bc88cc5b5287b55388a4dab2a2f562b 100644
|
||||
index e318003a58db37d5d278e7f6a35f6a2983d3e673..4bbf8c56f71f68cc7062927aafe59ac85b1ada12 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2525,7 +2525,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2532,7 +2532,7 @@ public class ServerGamePacketListenerImpl
|
||||
// CraftBukkit start
|
||||
String rawMessage = message.signedContent();
|
||||
if (rawMessage.isEmpty()) {
|
||||
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index c0129b6e5c74a5412546c167fb03b705686c996f..0509c3b79a01a18ddb1a6ed41c1668ee5d3c50e7 100644
|
||||
index 0ed0e3db7909fe0a24a405ab96cc5e3067eb011c..31fd2ce06f173db7228e5addb6e3cf407df4cadc 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1256,7 +1256,7 @@ public abstract class PlayerList {
|
||||
@@ -1180,7 +1180,7 @@ public abstract class PlayerList {
|
||||
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
||||
// Paper end
|
||||
boolean flag = this.verifyChatTrusted(message);
|
||||
|
||||
@@ -17,10 +17,10 @@ Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
This can help to hide annoying scanning bots from showing up in console.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index ebf4d4516233c002b33084f1679044b23869d848..5bac1c0ba691e516f2d603583971df7fe7ac212c 100644
|
||||
index c5d071c591c844b11667013131d1d3bae8e3bac6..c2ce73976568bc1538ea82d70175e004943b4585 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -124,6 +124,15 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -125,6 +125,15 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
|
||||
public void disconnect(Component reason) {
|
||||
try {
|
||||
|
||||
@@ -41,10 +41,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 38266ae67c440e94d30cd16ab09232906e1e8d7d..e7e4262981bcbf75a5c6a76f4588c91de15bf975 100644
|
||||
index f58799f368071b1a7bc3b5814261177c002d13f6..ab2c4451374916faf62bf3859b40cc513197de38 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -142,7 +142,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -235,7 +235,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
|
||||
// Paper start - detect running as root
|
||||
|
||||
@@ -41,10 +41,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index e7e4262981bcbf75a5c6a76f4588c91de15bf975..9c8d88e81ad9d06966bcec0ef134c8e658b9b51e 100644
|
||||
index ab2c4451374916faf62bf3859b40cc513197de38..42fedf1f09d72303cad70d96ba6fced4b9be052d 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -253,7 +253,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -341,7 +341,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
|
||||
@@ -42,10 +42,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/AbstractArrow.java b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
index 11adb3eacce9d46f15e6c5216e9b2494df158baf..fe738894f82480c6a7c2ff8fde895daaa0ba8bc6 100644
|
||||
index 7e1dd3c6a2f8852ab4471e0331f590d4c2015cfc..e21f08b8e073794cb4c7e3378894cc4a23dd53bf 100644
|
||||
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -349,7 +349,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
@@ -350,7 +350,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
this.setInGround(false);
|
||||
Vec3 deltaMovement = this.getDeltaMovement();
|
||||
this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F));
|
||||
|
||||
@@ -13,20 +13,26 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 0509c3b79a01a18ddb1a6ed41c1668ee5d3c50e7..f4a73d3f56d6a10493752653bd50c8caeda63a94 100644
|
||||
index 31fd2ce06f173db7228e5addb6e3cf407df4cadc..2406f4d7debd0615ddfa40a307b29edac11451b7 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -403,7 +403,13 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable
|
||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), loggableAddress, player.getId(), serverLevel.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
+ // Gale start - JettPack - make logging login location configurable
|
||||
+ } else {
|
||||
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getName().getString(), loggableAddress, player.getId());
|
||||
+ }
|
||||
+ // Gale end - JettPack - make logging login location configurable
|
||||
// Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead
|
||||
if (player.isDeadOrDying()) {
|
||||
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME)
|
||||
@@ -306,6 +306,7 @@ public abstract class PlayerList {
|
||||
scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||
}
|
||||
// Paper end - Configurable player collision
|
||||
+ if (org.galemc.gale.configuration.GaleGlobalConfiguration.get().logToConsole.playerLoginLocations) { // Gale - JettPack - make logging login location configurable
|
||||
// CraftBukkit start - moved down
|
||||
LOGGER.info(
|
||||
"{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", // CraftBukkit - add world name
|
||||
@@ -318,6 +319,11 @@ public abstract class PlayerList {
|
||||
player.getZ()
|
||||
);
|
||||
// CraftBukkit end - moved down
|
||||
+ // Gale start - JettPack - make logging login location configurable
|
||||
+ } else {
|
||||
+ PlayerList.LOGGER.info("{}[{}] logged in with entity id {}", player.getPlainTextName(), loggableAddress, player.getId());
|
||||
+ }
|
||||
+ // Gale end - JettPack - make logging login location configurable
|
||||
// Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead
|
||||
if (player.isDeadOrDying()) {
|
||||
net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> plains = serverLevel.registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME)
|
||||
|
||||
@@ -57,7 +57,7 @@ index b2bcfb3557a0326fd7ec1059f95d6da4568dfd80..fee4a7452178c274eb835d758b718d8e
|
||||
} else {
|
||||
this.storage = Arrays.copyOf(this.storage, this.storage.length * 2);
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
index 82824ae7ffbced513a8bcace684af94916135e84..47a600204ae1a1e7f166284dc26a1a7afc1dbecc 100644
|
||||
index a42938e1abd371dba6806e65552fde71b178a096..7960594a8ee61fbd223ad5df3c50a4dcd35427cb 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
@@ -19,10 +19,8 @@ import net.minecraft.world.level.entity.LevelCallback;
|
||||
@@ -127,7 +127,7 @@ index 121685cacef111fbec0057d386f748497bc3a36d..b4a4fafec1a8e279ec1e31e58fee2d5d
|
||||
protected CipherBase(Cipher cipher) {
|
||||
this.cipher = cipher;
|
||||
diff --git a/net/minecraft/network/chat/contents/TranslatableContents.java b/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
index 8ef16f98996b1ec0c9c3f158248ac95f1b07328f..6780b2493d625603b74e635c4996bb8303ce5b9a 100644
|
||||
index db7bb1dbd485ec51a0131caa10682330312a2778..4900efb298a5ff6b24926dff88543d48d7338bd5 100644
|
||||
--- a/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
+++ b/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.util.ExtraCodecs;
|
||||
@@ -140,10 +140,10 @@ index 8ef16f98996b1ec0c9c3f158248ac95f1b07328f..6780b2493d625603b74e635c4996bb83
|
||||
private static final Codec<Object> ARG_CODEC = Codec.either(PRIMITIVE_ARG_CODEC, ComponentSerialization.CODEC)
|
||||
.xmap(
|
||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||
index 5df8ee3955593e70f0e67e91431e464d177bdeeb..b7581796dda77bca66c03e421f2a83a920f44ef1 100644
|
||||
index 29ded5aa70a4a2d6de4533e487170eaf0dc61fdf..4e1a33e27f4fcfb21991ac71f8ab4ceb08f899bf 100644
|
||||
--- a/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -366,7 +366,7 @@ public class ServerEntity {
|
||||
@@ -347,7 +347,7 @@ public class ServerEntity {
|
||||
if (this.entity instanceof LivingEntity livingEntityx) {
|
||||
List<Pair<EquipmentSlot, ItemStack>> list = Lists.newArrayList();
|
||||
|
||||
@@ -153,10 +153,10 @@ index 5df8ee3955593e70f0e67e91431e464d177bdeeb..b7581796dda77bca66c03e421f2a83a9
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
list.add(Pair.of(equipmentSlot, itemBySlot.copy()));
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index a9c2f419200483673f6743ed94af110a8e875e71..617eb1b9d30d499124576c5d7cb5152571cc6b84 100644
|
||||
index 24f3954645dfd5142de2f2ae964ba5caf12582ac..75d0ba4e2407b6b10c14b33fe6c50108be1dad8b 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1228,7 +1228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1258,7 +1258,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
public static List<Entity> getCurrentlyTickingEntities() {
|
||||
Entity ticking = currentlyTickingEntity.get();
|
||||
@@ -166,10 +166,10 @@ index a9c2f419200483673f6743ed94af110a8e875e71..617eb1b9d30d499124576c5d7cb51525
|
||||
return ret;
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 917908e69154c5c5c9f847ae47548ee3d9221bc2..e4976eff4d18a1a1a752956c7e214122ddb05401 100644
|
||||
index 636f9ae7320a9f4a06459b2e8682099f309fa3f7..8f9ca82adea0c07fef37b3b800ddeebbe3d29c21 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1104,7 +1104,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1210,7 +1210,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.getInventory().getNonEquipmentItems().set(i, net.minecraft.world.item.ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
@@ -179,10 +179,10 @@ index 917908e69154c5c5c9f847ae47548ee3d9221bc2..e4976eff4d18a1a1a752956c7e214122
|
||||
this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7b4eb3773bc88cc5b5287b55388a4dab2a2f562b..a2e43621a9ad2eb7eef0b4a5d7c9bf0f627b9bc9 100644
|
||||
index 4bbf8c56f71f68cc7062927aafe59ac85b1ada12..4415125bef926f39e8904400242b8afcd65162d0 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2795,7 +2795,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2802,7 +2802,7 @@ public class ServerGamePacketListenerImpl
|
||||
// SPIGOT-7136 - Allays
|
||||
if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.horse.AbstractHorse) { // Paper - Fix horse armor desync
|
||||
ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket(
|
||||
@@ -192,10 +192,10 @@ index 7b4eb3773bc88cc5b5287b55388a4dab2a2f562b..a2e43621a9ad2eb7eef0b4a5d7c9bf0f
|
||||
.collect(Collectors.toList()), true)); // Paper - sanitize
|
||||
player.containerMenu.sendAllDataToRemote();
|
||||
diff --git a/net/minecraft/server/players/StoredUserList.java b/net/minecraft/server/players/StoredUserList.java
|
||||
index d445e8f126f077d8419c52fa5436ea963a1a42a4..39483f7b453d6faedeccc1ab1eda76669395ea5a 100644
|
||||
index 7ba3f7937d9c51690b735f26fb45dc0a8f94b31f..4488de18871e412556976048a0d2982fb75d91e1 100644
|
||||
--- a/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -70,7 +70,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -97,7 +97,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
}
|
||||
|
||||
public String[] getUserList() {
|
||||
@@ -218,7 +218,7 @@ index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..5c1103ef028e5ffe6ce0eadc861dd3b2
|
||||
|
||||
public ZeroBitStorage(int size) {
|
||||
diff --git a/net/minecraft/world/entity/ConversionType.java b/net/minecraft/world/entity/ConversionType.java
|
||||
index 3eea236bd1fd401fefdf7c5cc553a3db335029c7..3739272cbc73b7c4f15a2fbe874905cf06175f64 100644
|
||||
index ba24d1b56d4923d740330fad65bbc1097df49f0f..c009fd0c03e15e86fd25cbd04f769619c53dab8b 100644
|
||||
--- a/net/minecraft/world/entity/ConversionType.java
|
||||
+++ b/net/minecraft/world/entity/ConversionType.java
|
||||
@@ -37,7 +37,7 @@ public enum ConversionType {
|
||||
@@ -231,10 +231,10 @@ index 3eea236bd1fd401fefdf7c5cc553a3db335029c7..3739272cbc73b7c4f15a2fbe874905cf
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
newMob.setItemSlot(equipmentSlot, itemBySlot.copyAndClear());
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f22af336ac2949a91a6aebde6eaf4fef8545cb59..e81774a2fbcafb5909b966f71d31379c8b5a7426 100644
|
||||
index f871c40148fdb6b0798ea2e3291fc92b886f98a7..13ffe66a5161188c253f71c6ed5264261d886b74 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -3076,7 +3076,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -3123,7 +3123,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
private boolean attemptToShearEquipment(Player player, InteractionHand hand, ItemStack stack, Mob mob) {
|
||||
@@ -289,10 +289,10 @@ index b383836c200ca9f7bd84639367aa81b57868fb25..3af4a6dcc81afaf2860325fe5852c9a9
|
||||
|
||||
private static Map<EquipmentSlot, Float> createForAllSlots(List<EquipmentSlot> equipmentSlots, float dropChance) {
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1b7d8a8838e9b75bc12ce4b9f30429110e9af913..82354cc62df5b7793ef13c6731d84457cee42092 100644
|
||||
index 6bd80817991a0f21d650c89e24193e4c4f98769e..c4bda5d975cce38a725b8590261d97fcfac3d95d 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3358,7 +3358,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3390,7 +3390,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
Map<org.bukkit.inventory.EquipmentSlot, io.papermc.paper.event.entity.EntityEquipmentChangedEvent.EquipmentChange> equipmentChanges = null;
|
||||
// Paper end - EntityEquipmentChangedEvent
|
||||
|
||||
@@ -301,7 +301,7 @@ index 1b7d8a8838e9b75bc12ce4b9f30429110e9af913..82354cc62df5b7793ef13c6731d84457
|
||||
ItemStack itemStack = this.lastEquipmentItems.get(equipmentSlot);
|
||||
ItemStack itemBySlot = this.getItemBySlot(equipmentSlot);
|
||||
if (this.equipmentHasChanged(itemStack, itemBySlot)) {
|
||||
@@ -3630,7 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3662,7 +3662,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
public boolean canGlide() {
|
||||
if (!this.onGround() && !this.isPassenger() && !this.hasEffect(MobEffects.LEVITATION)) {
|
||||
@@ -311,10 +311,10 @@ index 1b7d8a8838e9b75bc12ce4b9f30429110e9af913..82354cc62df5b7793ef13c6731d84457
|
||||
return true;
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d06503716723f326 100644
|
||||
index 925cb690e3c6dfd558aab355e33dd2505f0ec427..65a406b6684117d2379033ce09808543303ef374 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -339,7 +339,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -349,7 +349,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
if (this.xpReward > 0) {
|
||||
int i = this.xpReward;
|
||||
|
||||
@@ -323,7 +323,7 @@ index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d0650371
|
||||
if (equipmentSlot.canIncreaseExperience()) {
|
||||
ItemStack itemBySlot = this.getItemBySlot(equipmentSlot);
|
||||
if (!itemBySlot.isEmpty() && this.dropChances.byEquipment(equipmentSlot) <= 1.0F) {
|
||||
@@ -963,7 +963,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -969,7 +969,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) {
|
||||
super.dropCustomDeathLoot(level, damageSource, recentlyHit);
|
||||
|
||||
@@ -332,7 +332,7 @@ index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d0650371
|
||||
if (this.shouldSkipLoot(equipmentSlot)) continue; // Paper
|
||||
ItemStack itemBySlot = this.getItemBySlot(equipmentSlot);
|
||||
float f = this.dropChances.byEquipment(equipmentSlot);
|
||||
@@ -1007,7 +1007,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1013,7 +1013,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
public Set<EquipmentSlot> dropPreservedEquipment(ServerLevel level, Predicate<ItemStack> filter) {
|
||||
Set<EquipmentSlot> set = new HashSet<>();
|
||||
|
||||
@@ -341,7 +341,7 @@ index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d0650371
|
||||
ItemStack itemBySlot = this.getItemBySlot(equipmentSlot);
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
if (!filter.test(itemBySlot)) {
|
||||
@@ -1135,7 +1135,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1144,7 +1144,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void populateDefaultEquipmentEnchantments(ServerLevelAccessor level, RandomSource random, DifficultyInstance difficulty) {
|
||||
this.enchantSpawnedWeapon(level, random, difficulty);
|
||||
|
||||
@@ -350,7 +350,7 @@ index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d0650371
|
||||
if (equipmentSlot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR) {
|
||||
this.enchantSpawnedArmor(level, random, equipmentSlot, difficulty);
|
||||
}
|
||||
@@ -1552,7 +1552,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1571,7 +1571,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void removeAfterChangingDimensions() {
|
||||
super.removeAfterChangingDimensions();
|
||||
|
||||
@@ -360,7 +360,7 @@ index c620341e33dc1805f1c033a969d0a15e1484c176..4aec1fd4efbb3dd139542c55d0650371
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
itemBySlot.setCount(0);
|
||||
diff --git a/net/minecraft/world/entity/decoration/ArmorStand.java b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index 5ee368580d878a3845349c3d50cc0dc549c42cab..9952e84dd94b8773c5ba8fcc4526e7714ebc2136 100644
|
||||
index a82fb56e876df9cbc95b16f81021d12fcb3b146c..041126086d1f4be6ed3a54337ed1c909044fba0c 100644
|
||||
--- a/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -456,7 +456,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -382,10 +382,10 @@ index 5ee368580d878a3845349c3d50cc0dc549c42cab..9952e84dd94b8773c5ba8fcc4526e771
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index e5e08dbefead90e9fe2bb05e4f0257f7aa4c0686..5160c349f1ace36d6de11f23e0f957f37fc19165 100644
|
||||
index 1bebcdf328cb83d8a2f754eeb13936bbc4abf204..7984529672ec1cedfd69ff78ec8d5501a33870cf 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -413,7 +413,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -349,7 +349,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
}
|
||||
|
||||
private boolean isEquipped(Item item) {
|
||||
@@ -395,10 +395,10 @@ index e5e08dbefead90e9fe2bb05e4f0257f7aa4c0686..5160c349f1ace36d6de11f23e0f957f3
|
||||
Equippable equippable = itemBySlot.get(DataComponents.EQUIPPABLE);
|
||||
if (itemBySlot.is(item) && equippable != null && equippable.slot() == equipmentSlot) {
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index da16f4831c875e07c25d7ed041bed493db614658..951c86278e8cb5cd801a5db2ebfabef8c6d813ef 100644
|
||||
index 25bc90eb527547487fb5191dc135f2c6030f3a19..41aed4ca479c84337dbe368e1f752af498c5de24 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -1149,7 +1149,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@@ -1153,7 +1153,7 @@ public final class ItemStack implements DataComponentHolder {
|
||||
|
||||
private void addAttributeTooltips(Consumer<Component> tooltipAdder, TooltipDisplay tooltipDisplay, @Nullable Player player) {
|
||||
if (tooltipDisplay.shows(DataComponents.ATTRIBUTE_MODIFIERS)) {
|
||||
@@ -434,7 +434,7 @@ index 7a620eb92b1e672cedd72ec4d986c01eba337686..0460da0124d2c48b7fed45fa182537fd
|
||||
ItemStack itemBySlot = entity.getItemBySlot(equipmentSlot);
|
||||
if (!itemBySlot.isEmpty()) {
|
||||
diff --git a/net/minecraft/world/item/enchantment/EnchantmentHelper.java b/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
index 66234431b265e0596275ca468cd40f8da98c22e2..b20415b47e209aedbc60ff17238e575dfe33849a 100644
|
||||
index e59faaa4e72ef64fd7103f1844396e8b0ace161c..8d06c797c713fafba6b051a28bacd4ba79be8fd1 100644
|
||||
--- a/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
+++ b/net/minecraft/world/item/enchantment/EnchantmentHelper.java
|
||||
@@ -153,7 +153,7 @@ public class EnchantmentHelper {
|
||||
@@ -456,10 +456,10 @@ index 66234431b265e0596275ca468cd40f8da98c22e2..b20415b47e209aedbc60ff17238e575d
|
||||
if (filter.test(itemBySlot)) {
|
||||
ItemEnchantments itemEnchantments = itemBySlot.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY);
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index a0254e85fccebb66ce02bd58f9d461addd8ad73d..1f7b3db02e59c4cbc93bc0e4e42bd20e0031c4bd 100644
|
||||
index e49d7bc1b060ee3922bb171ba0e7723148c601df..bfbc3e32c6007bd5413be38227b918c6def96e4c 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1825,7 +1825,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1785,7 +1785,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) {
|
||||
ca.spottedleaf.moonrise.patches.chunk_system.level.entity.ChunkEntitySlices slices = ((ServerLevel)this).moonrise$getEntityLookup().getChunk(chunkX, chunkZ);
|
||||
if (slices == null) {
|
||||
@@ -468,7 +468,7 @@ index a0254e85fccebb66ce02bd58f9d461addd8ad73d..1f7b3db02e59c4cbc93bc0e4e42bd20e
|
||||
}
|
||||
|
||||
List<org.bukkit.entity.Entity> ret = new java.util.ArrayList<>();
|
||||
@@ -1836,7 +1836,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1796,7 +1796,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@ index a0254e85fccebb66ce02bd58f9d461addd8ad73d..1f7b3db02e59c4cbc93bc0e4e42bd20e
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/ComposterBlock.java b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
index a647d76d365a60b95a3eb7927ac426bf70d417f3..7977ecd013c55359f179b4b7f895099b7eb02294 100644
|
||||
index 5d434ebe7bb7cfea02d1a7dc05825ff59eac23d1..b845f1c02bf0efa4799255d94043f25ed2a04f07 100644
|
||||
--- a/net/minecraft/world/level/block/ComposterBlock.java
|
||||
+++ b/net/minecraft/world/level/block/ComposterBlock.java
|
||||
@@ -419,7 +419,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||
@@ -522,7 +522,7 @@ index 36a72a11d28f99bfe85868461925b778cc01478e..ca2cab797fc16f0961ce994fcb450295
|
||||
private static final int[] SLOTS_FOR_SIDES = new int[]{1};
|
||||
public static final int DATA_LIT_DURATION = 1;
|
||||
diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index c8f23011a8942a5be970c606f67142cbd202b97e..98971a07757d29d6926a0aa05f229b8020af42b6 100644
|
||||
index 0c1d4038224ba9776674ff29211b47ccab09236e..af68bdde29137b2cc8d3939f54dd4639dde29add 100644
|
||||
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -258,7 +258,7 @@ public class MapItemSavedData extends SavedData {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index e81774a2fbcafb5909b966f71d31379c8b5a7426..229daac5767e8d65b2d0c37303d3490ef97e21ff 100644
|
||||
index 13ffe66a5161188c253f71c6ed5264261d886b74..508eb961b14564d46b420f1f40ac2fd13a121884 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2087,10 +2087,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2139,10 +2139,20 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
|
||||
@Deprecated
|
||||
public float getLightLevelDependentMagicValue() {
|
||||
@@ -39,10 +39,10 @@ index e81774a2fbcafb5909b966f71d31379c8b5a7426..229daac5767e8d65b2d0c37303d3490e
|
||||
public void absSnapTo(double x, double y, double z, float yRot, float xRot) {
|
||||
this.absSnapTo(x, y, z);
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 4aec1fd4efbb3dd139542c55d06503716723f326..37c6567701fe10011a364b8def9ebf3391376592 100644
|
||||
index 65a406b6684117d2379033ce09808543303ef374..fc6c5cf5991d9d359fd9e4ebb0f71a18c52e6273 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -1513,20 +1513,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -1532,20 +1532,31 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
protected void playAttackSound() {
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index 4aec1fd4efbb3dd139542c55d06503716723f326..37c6567701fe10011a364b8def9ebf33
|
||||
+ private net.minecraft.world.phys.Vec3 cached_position;
|
||||
+ // Gale end - JettPack - optimize sun burn tick - cache eye blockpos
|
||||
public boolean isSunBurnTick() {
|
||||
if (this.level().isBrightOutside() && !this.level().isClientSide) {
|
||||
if (this.level().isBrightOutside() && !this.level().isClientSide()) {
|
||||
- float lightLevelDependentMagicValue = this.getLightLevelDependentMagicValue();
|
||||
- BlockPos blockPos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||
- boolean flag = this.isInWaterOrRain() || this.isInPowderSnow || this.wasInPowderSnow;
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java
|
||||
index d5536dd40a1e9a2e05967652f690abbbca287852..966ca1e0e828e4176e12cbcf8c4a6b16489708de 100644
|
||||
index 5b148c977efad9f312acfc0304356f70a6cb1170..3a4a208217df4dbe5056fb2619cadd65b4f5fbc4 100644
|
||||
--- a/net/minecraft/world/level/GameRules.java
|
||||
+++ b/net/minecraft/world/level/GameRules.java
|
||||
@@ -288,7 +288,7 @@ public class GameRules {
|
||||
@@ -303,7 +303,7 @@ public class GameRules {
|
||||
}
|
||||
|
||||
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules, FeatureFlagSet enabledFeatures) {
|
||||
|
||||
@@ -9,10 +9,10 @@ Gale - https://galemc.org
|
||||
The JMH benchmark of this patch can be found in SunBox's `RecordHashCode`
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java
|
||||
index be6f37f91569c659c609e5e8d38671ca86f8cd95..cc5e4e82c2339d17edf76b9212774c9dfd8e514d 100644
|
||||
index 4fd746ccfd0018f5e551490e24aa68265d609295..3b89a899a191f8b3f3d8643d11bf9468b2592897 100644
|
||||
--- a/net/minecraft/world/level/block/Block.java
|
||||
+++ b/net/minecraft/world/level/block/Block.java
|
||||
@@ -610,7 +610,20 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -649,7 +649,20 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -34,7 +34,7 @@ index be6f37f91569c659c609e5e8d38671ca86f8cd95..cc5e4e82c2339d17edf76b9212774c9d
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
return other instanceof Block.ShapePairKey shapePairKey && this.first == shapePairKey.first && this.second == shapePairKey.second;
|
||||
@@ -618,7 +631,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@@ -657,7 +670,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 82354cc62df5b7793ef13c6731d84457cee42092..55277151febdf464e0a4679336a1464d3e4069b8 100644
|
||||
index c4bda5d975cce38a725b8590261d97fcfac3d95d..39b3b17dd9cafa59393d40bf0090edeadacde428 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -535,10 +535,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -542,10 +542,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
}
|
||||
|
||||
protected void tryAddFrost() {
|
||||
@@ -28,7 +28,7 @@ index 82354cc62df5b7793ef13c6731d84457cee42092..55277151febdf464e0a4679336a1464d
|
||||
if (attribute == null) {
|
||||
return;
|
||||
}
|
||||
@@ -546,7 +545,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -553,7 +552,6 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
float f = -0.05F * this.getPercentFrozen();
|
||||
attribute.addTransientModifier(new AttributeModifier(SPEED_MODIFIER_POWDER_SNOW_ID, f, AttributeModifier.Operation.ADD_VALUE));
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
|
||||
index b3a29ce523fb5de71589c7c17598bba17622f988..afcf185c4e2c0648c96a872fbe1fbebb6012d513 100644
|
||||
index 5181a9334066a15e0d502d3522c23337e5eef2b5..dcfade2efe209b87a169738fc2ff23d8e24b53a6 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -126,6 +126,7 @@ public class Raid {
|
||||
@@ -128,6 +128,7 @@ public class Raid {
|
||||
private Raid.RaidStatus status;
|
||||
private int celebrationTicks;
|
||||
private Optional<BlockPos> waveSpawnPos = Optional.empty();
|
||||
@@ -24,7 +24,7 @@ index b3a29ce523fb5de71589c7c17598bba17622f988..afcf185c4e2c0648c96a872fbe1fbebb
|
||||
|
||||
public Raid(BlockPos center, Difficulty difficulty) {
|
||||
this.active = true;
|
||||
@@ -278,6 +279,12 @@ public class Raid {
|
||||
@@ -280,6 +281,12 @@ public class Raid {
|
||||
}
|
||||
|
||||
public void tick(ServerLevel level) {
|
||||
@@ -37,7 +37,7 @@ index b3a29ce523fb5de71589c7c17598bba17622f988..afcf185c4e2c0648c96a872fbe1fbebb
|
||||
if (!this.isStopped()) {
|
||||
if (this.status == Raid.RaidStatus.ONGOING) {
|
||||
boolean flag = this.active;
|
||||
@@ -588,6 +595,12 @@ public class Raid {
|
||||
@@ -610,6 +617,12 @@ public class Raid {
|
||||
}
|
||||
|
||||
public void updateBossbar() {
|
||||
@@ -13,10 +13,10 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d1ce2b9c1 100644
|
||||
index 508eb961b14564d46b420f1f40ac2fd13a121884..1d3cc87b5dcfa749ca3f2e10658f2696c75c18df 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -260,6 +260,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -262,6 +262,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
public float yRotO;
|
||||
public float xRotO;
|
||||
private AABB bb = INITIAL_AABB;
|
||||
@@ -24,7 +24,7 @@ index 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d
|
||||
public boolean onGround;
|
||||
public boolean horizontalCollision;
|
||||
public boolean verticalCollision;
|
||||
@@ -1086,6 +1087,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1092,6 +1093,11 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
@@ -36,7 +36,7 @@ index 229daac5767e8d65b2d0c37303d3490ef97e21ff..6a4eaccf82e4d94dad657318e307a24d
|
||||
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");
|
||||
@@ -4375,6 +4381,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4449,6 +4455,11 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
@@ -13,11 +13,11 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index edda52a8430386238be4963e8ea2406f0c2d4df3..78040fb6b6fd168e62494d3953006bfb38c2909f 100644
|
||||
index 27e892eef8d5ed029a2ccd4160bd0de679cd4330..42f5e8a1eb10525aa8466e89699cc8be1a098c11 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -132,7 +132,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public final AtomicInteger tickingGenerated = new AtomicInteger(); // Paper - public
|
||||
public final ChunkMap.DistanceManager distanceManager;
|
||||
private final String storageName;
|
||||
private final PlayerMap playerMap = new PlayerMap();
|
||||
- public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap = new Int2ObjectOpenHashMap<>();
|
||||
@@ -13,13 +13,13 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6a4eaccf82e4d94dad657318e307a24d1ce2b9c1..c845bea5d31296efa03d07e5133e988ef3c57808 100644
|
||||
index 1d3cc87b5dcfa749ca3f2e10658f2696c75c18df..faacc8b73cb0a06c797abe461fbfacfebe95648f 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -886,7 +886,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -892,7 +892,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
|
||||
this.checkBelowWorld();
|
||||
if (!this.level().isClientSide) {
|
||||
if (!this.level().isClientSide()) {
|
||||
+ // Gale start - Slice - hide flames on entities with fire resistance
|
||||
+ if (this instanceof net.minecraft.world.entity.LivingEntity livingEntity) {
|
||||
+ this.setSharedFlagOnFire(this.remainingFireTicks > 0 && (!this.level.galeConfig().gameplayMechanics.hideFlamesOnEntitiesWithFireResistance || !livingEntity.hasEffect(net.minecraft.world.effect.MobEffects.FIRE_RESISTANCE)));
|
||||
@@ -13,7 +13,7 @@ As part of: Mirai (https://github.com/etil2jz/Mirai)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/advancements/Advancement.java b/net/minecraft/advancements/Advancement.java
|
||||
index ac6a85ddf6eb326b3fd53341a4a5db7bd00b7ce2..7f7ad8492dc848e9549d1e05f6d800ebb0788dc4 100644
|
||||
index 23f448a2d2361f09f3b7099cdde73fd881fa8ee4..e23dea490bb2f0781ac327df8403538478fc484c 100644
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -61,7 +61,7 @@ public record Advancement(
|
||||
@@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe916586868a519ed 100644
|
||||
index 75d0ba4e2407b6b10c14b33fe6c50108be1dad8b..dcd508e9dfc2fd05ee1f4222b39e007abc4a0944 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1579,6 +1579,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1607,6 +1607,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
@Override
|
||||
public void destroyBlockProgress(int breakerId, BlockPos pos, int progress) {
|
||||
@@ -32,7 +32,7 @@ index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe9165868
|
||||
// CraftBukkit start
|
||||
Player breakerPlayer = null;
|
||||
Entity entity = this.getEntity(breakerId);
|
||||
@@ -1595,7 +1604,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1623,7 +1632,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
.callEvent();
|
||||
}
|
||||
// Paper end - Add BlockBreakProgressUpdateEvent
|
||||
@@ -41,7 +41,7 @@ index 617eb1b9d30d499124576c5d7cb5152571cc6b84..ad114ca013e0d09d40755acbe9165868
|
||||
if (serverPlayer != null && serverPlayer.level() == this && serverPlayer.getId() != breakerId) {
|
||||
double d = pos.getX() - serverPlayer.getX();
|
||||
double d1 = pos.getY() - serverPlayer.getY();
|
||||
@@ -1606,7 +1615,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1634,7 +1643,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (d * d + d1 * d1 + d2 * d2 < 1024.0) {
|
||||
@@ -37,26 +37,26 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index f4a73d3f56d6a10493752653bd50c8caeda63a94..366d476730923c70f6734e12b21ba3d7f9750643 100644
|
||||
index 2406f4d7debd0615ddfa40a307b29edac11451b7..b478e22321be0edd31290945fafa02caa46c1778 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -113,6 +113,7 @@ public abstract class PlayerList {
|
||||
@@ -111,6 +111,7 @@ public abstract class PlayerList {
|
||||
private final MinecraftServer server;
|
||||
public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
|
||||
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
||||
+ private final ServerPlayer[][] sendAllPlayerInfoBuckets = new ServerPlayer[SEND_PLAYER_INFO_INTERVAL][]; // Gale - Purpur - spread out sending all player info
|
||||
private final UserBanList bans = new UserBanList(USERBANLIST_FILE);
|
||||
private final IpBanList ipBans = new IpBanList(IPBANLIST_FILE);
|
||||
private final ServerOpList ops = new ServerOpList(OPLIST_FILE);
|
||||
@@ -312,6 +313,7 @@ public abstract class PlayerList {
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
// Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
player.supressTrackerForLogin = true;
|
||||
@@ -583,6 +585,7 @@ public abstract class PlayerList {
|
||||
private final UserBanList bans;
|
||||
private final IpBanList ipBans;
|
||||
private final ServerOpList ops;
|
||||
@@ -217,6 +218,7 @@ public abstract class PlayerList {
|
||||
this.players.add(player);
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
// Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
|
||||
player.suppressTrackerForLogin = true;
|
||||
@@ -499,6 +501,7 @@ public abstract class PlayerList {
|
||||
player.getAdvancements().stopListening();
|
||||
this.players.remove(player);
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
@@ -64,15 +64,15 @@ index f4a73d3f56d6a10493752653bd50c8caeda63a94..366d476730923c70f6734e12b21ba3d7
|
||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||
UUID uuid = player.getUUID();
|
||||
ServerPlayer serverPlayer = this.playersByUUID.get(uuid);
|
||||
@@ -685,6 +688,7 @@ public abstract class PlayerList {
|
||||
player.stopRiding(); // CraftBukkit
|
||||
@@ -603,6 +606,7 @@ public abstract class PlayerList {
|
||||
// TeleportTransition teleportTransition = player.findRespawnPositionAndUseSpawnBlock(!keepInventory, TeleportTransition.DO_NOTHING);
|
||||
this.players.remove(player);
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
+ this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||
player.level().removePlayerImmediately(player, reason);
|
||||
// TeleportTransition teleportTransition = player.findRespawnPositionAndUseSpawnBlock(!keepInventory, TeleportTransition.DO_NOTHING);
|
||||
// ServerLevel level = teleportTransition.newLevel();
|
||||
@@ -763,6 +767,7 @@ public abstract class PlayerList {
|
||||
// ServerPlayer serverPlayer = new ServerPlayer(this.server, level, player.getGameProfile(), player.clientInformation());
|
||||
@@ -680,6 +684,7 @@ public abstract class PlayerList {
|
||||
this.players.add(serverPlayer);
|
||||
this.playersByName.put(serverPlayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT), serverPlayer); // Spigot
|
||||
this.playersByUUID.put(serverPlayer.getUUID(), serverPlayer);
|
||||
@@ -80,7 +80,7 @@ index f4a73d3f56d6a10493752653bd50c8caeda63a94..366d476730923c70f6734e12b21ba3d7
|
||||
}
|
||||
// serverPlayer.initInventoryMenu();
|
||||
serverPlayer.setHealth(serverPlayer.getHealth());
|
||||
@@ -865,18 +870,58 @@ public abstract class PlayerList {
|
||||
@@ -782,18 +787,58 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -145,10 +145,10 @@ index f4a73d3f56d6a10493752653bd50c8caeda63a94..366d476730923c70f6734e12b21ba3d7
|
||||
public void broadcastAll(Packet packet, net.minecraft.world.entity.player.Player entityhuman) {
|
||||
for (ServerPlayer entityplayer : this.players) { // Paper - replace for i with for each for thread safety
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 5160c349f1ace36d6de11f23e0f957f37fc19165..6207ffb19f8d98ea6496e4d80495bf590b1be7ca 100644
|
||||
index 7984529672ec1cedfd69ff78ec8d5501a33870cf..3a1517771b500995d4082185a877cb6e8be21b98 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -230,9 +230,12 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -191,9 +191,12 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -156,8 +156,8 @@ index 5160c349f1ace36d6de11f23e0f957f37fc19165..6207ffb19f8d98ea6496e4d80495bf59
|
||||
+
|
||||
public Player(Level level, GameProfile gameProfile) {
|
||||
super(EntityType.PLAYER, level);
|
||||
this.setUUID(gameProfile.getId());
|
||||
this.setUUID(gameProfile.id());
|
||||
+ this.sendAllPlayerInfoBucketIndex = Math.floorMod(this.uuid.hashCode(), net.minecraft.server.players.PlayerList.SEND_PLAYER_INFO_INTERVAL); // Gale - Purpur - spread out sending all player info
|
||||
this.gameProfile = gameProfile;
|
||||
this.inventory = new Inventory(this, this.equipment);
|
||||
this.inventoryMenu = new InventoryMenu(this.inventory, !level.isClientSide, this);
|
||||
this.inventoryMenu = new InventoryMenu(this.inventory, !level.isClientSide(), this);
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index f6017445c495c65fc71b10d2a8ed4f5d3d225668..e00624a738e65ab14ec68a8d0e7861522fa32e82 100644
|
||||
index 8b7db6b8789f5c544bdb6e5d2164292ed84d9899..c8e3b6b6fe4a9047a45497575a7ab796b4072d48 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -498,6 +498,7 @@ public class Commands {
|
||||
@@ -505,6 +505,7 @@ public class Commands {
|
||||
private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<CommandSourceStack> rootCommandNode) {
|
||||
// Paper end - Perf: Async command map building
|
||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootCommandNode, true).callEvent(); // Paper - Brigadier API
|
||||
@@ -48,7 +48,7 @@ index f6017445c495c65fc71b10d2a8ed4f5d3d225668..e00624a738e65ab14ec68a8d0e786152
|
||||
org.bukkit.event.player.PlayerCommandSendEvent event = new org.bukkit.event.player.PlayerCommandSendEvent(player.getBukkitEntity(), new java.util.LinkedHashSet<>(bukkit));
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -508,6 +509,7 @@ public class Commands {
|
||||
@@ -515,6 +516,7 @@ public class Commands {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e47cc3cfb5 100644
|
||||
index 40ef10d088b21e51dd74897c9724f37dc7c2d467..ff878c13bc1b55f2d7c3ab025a50746ab782da6c 100644
|
||||
--- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -38,10 +38,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -39,10 +39,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
public final Connection connection; // Paper
|
||||
private final boolean transferred;
|
||||
//private long keepAliveTime; // Paper - improve keepalives
|
||||
@@ -53,7 +53,7 @@ index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e4
|
||||
private volatile int latency; // Paper - improve keepalives - make volatile
|
||||
private final io.papermc.paper.util.KeepAlive keepAlive; // Paper - improve keepalives
|
||||
private volatile boolean suspendFlushingOnServerThread = false;
|
||||
@@ -50,7 +51,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -51,7 +52,10 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
public boolean processedDisconnect;
|
||||
// CraftBukkit end
|
||||
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
|
||||
@@ -65,7 +65,7 @@ index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e4
|
||||
protected static final net.minecraft.resources.ResourceLocation MINECRAFT_BRAND = net.minecraft.resources.ResourceLocation.withDefaultNamespace("brand"); // Paper - Brand support
|
||||
// Paper start - retain certain values
|
||||
public @Nullable String playerBrand;
|
||||
@@ -103,6 +107,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -104,6 +108,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
// Paper start - improve keepalives
|
||||
long now = System.nanoTime();
|
||||
io.papermc.paper.util.KeepAlive.PendingKeepAlive pending = this.keepAlive.pendingKeepAlives.peek();
|
||||
@@ -84,7 +84,7 @@ index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e4
|
||||
if (pending != null && pending.challengeId() == packet.getId()) {
|
||||
this.keepAlive.pendingKeepAlives.remove(pending);
|
||||
|
||||
@@ -114,6 +130,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -115,6 +131,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
this.latency = this.keepAlive.pingCalculator5s.getAvgLatencyMS();
|
||||
return;
|
||||
}
|
||||
@@ -92,7 +92,7 @@ index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e4
|
||||
|
||||
for (java.util.Iterator<io.papermc.paper.util.KeepAlive.PendingKeepAlive> itr = this.keepAlive.pendingKeepAlives.iterator(); itr.hasNext();) {
|
||||
io.papermc.paper.util.KeepAlive.PendingKeepAlive ka = itr.next();
|
||||
@@ -261,6 +278,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -262,6 +279,23 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
protected void keepConnectionAlive() {
|
||||
long millis = Util.getMillis();
|
||||
// Paper start - improve keepalives
|
||||
@@ -116,7 +116,7 @@ index 149660c1196481275ca03830d64cf33b5ce98163..37de0c46b065851ea0f0d01e415980e4
|
||||
if (this.checkIfClosed(millis) && !this.processedDisconnect) {
|
||||
long currTime = System.nanoTime();
|
||||
|
||||
@@ -279,6 +313,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -280,6 +314,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
// Paper end - improve keepalives
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 5bac1c0ba691e516f2d603583971df7fe7ac212c..f9fad100d3e5e4b44a5b0f88e288e6fac7a250f7 100644
|
||||
index c2ce73976568bc1538ea82d70175e004943b4585..cc7f467a394413c3cc1a5975d77ff8880ad0fafa 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -105,7 +105,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -106,7 +106,10 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
public void tickTimeout() {
|
||||
// Paper end - login cookie API
|
||||
@@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index b3cfab9c82fe12694f5d2f56bd922828e51df680..77ecbcdec8e176b1a45e87d33f64b1a12c532e26 100644
|
||||
index 801a50ba4d202df0289339f26968e7f6bb9ca767..0c9c58a2f57b11f907c70440bf8bd5a513ce8243 100644
|
||||
--- a/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -52,8 +52,16 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index c845bea5d31296efa03d07e5133e988ef3c57808..515bc3de097bf9edda42584e56fa173727455b5a 100644
|
||||
index faacc8b73cb0a06c797abe461fbfacfebe95648f..a58dd6d8e69736163b7099d66b0ebcb1a4a9e527 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4873,6 +4873,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4938,6 +4938,16 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
return this.inBlockState;
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ index c845bea5d31296efa03d07e5133e988ef3c57808..515bc3de097bf9edda42584e56fa1737
|
||||
return this.chunkPosition;
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 55277151febdf464e0a4679336a1464d3e4069b8..d54c09c48edbfc999abd834b68ea5ceea13f39d2 100644
|
||||
index 39b3b17dd9cafa59393d40bf0090edeadacde428..3c972e39a66c1aa9253eaae818eab6feac94c66d 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2129,8 +2129,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -2161,8 +2161,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
public boolean onClimbableCached() {
|
||||
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
||||
@@ -51,7 +51,7 @@ index 55277151febdf464e0a4679336a1464d3e4069b8..d54c09c48edbfc999abd834b68ea5cee
|
||||
}
|
||||
|
||||
return this.cachedOnClimbable;
|
||||
@@ -2138,11 +2147,25 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -2170,11 +2179,25 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
// Gale end - Airplane - cache on climbable check
|
||||
|
||||
public boolean onClimbable() {
|
||||
@@ -13,26 +13,26 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index e4976eff4d18a1a1a752956c7e214122ddb05401..ee2671510d46a92732934cd5df0a0e42c4cae1f6 100644
|
||||
index 8f9ca82adea0c07fef37b3b800ddeebbe3d29c21..b5f666d69cf15fc81c6cc0e3f7030501567b205c 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2128,12 +2128,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2243,12 +2243,18 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
@Override
|
||||
public void crit(Entity entityHit) {
|
||||
- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
- this.level().getChunkSource().sendToTrackingPlayersAndSelf(this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
||||
+ var level = this.level();
|
||||
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
+ level.getChunkSource().sendToTrackingPlayersAndSelf(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 4));
|
||||
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critte
|
||||
}
|
||||
|
||||
@Override
|
||||
public void magicCrit(Entity entityHit) {
|
||||
- this.level().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
- this.level().getChunkSource().sendToTrackingPlayersAndSelf(this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
+ // Gale start - MultiPaper - broadcast crit animations as the entity being critted
|
||||
+ var level = this.level();
|
||||
+ level.getChunkSource().broadcastAndSend(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
+ level.getChunkSource().sendToTrackingPlayersAndSelf(level.galeConfig().gameplayMechanics.fixes.broadcastCritAnimationsAsTheEntityBeingCritted ? entityHit : this, new ClientboundAnimatePacket(entityHit, 5));
|
||||
+ // Gale end - MultiPaper - broadcast crit animations as the entity being critted
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java b/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java
|
||||
index bad57b0017c78d4d1d32c239fae5bc2ea20bc3c3..28f770d40f5ada6d547e91cd3147969702e1ae75 100644
|
||||
index ca19fc7ffc86b82fa793f330dfa73889246d23ac..f548f417ed57c18064d9bad2c26b7dc1a179a31b 100644
|
||||
--- a/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java
|
||||
@@ -49,7 +49,7 @@ public class RandomStrollGoal extends Goal {
|
||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index d3cf7176903bede5c8c7a7e3dae3f585027f8354..c5ab5079c953ce9263491b791ebe421032e8f74d 100644
|
||||
index e7226c5056a493126d28a38416ffa909304aa9be..fd2cbb708b9eaf41d6fe8c9f22003d27883ff1c3 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1094,6 +1094,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1026,6 +1026,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
private long lastTick = 0;
|
||||
private long catchupTime = 0;
|
||||
@@ -48,7 +48,7 @@ index d3cf7176903bede5c8c7a7e3dae3f585027f8354..c5ab5079c953ce9263491b791ebe4210
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -1205,6 +1206,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1137,6 +1138,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
|
||||
final long diff = currentTime - tickSection;
|
||||
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
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.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index c5ab5079c953ce9263491b791ebe421032e8f74d..1f3c675cbfe3d6d590bf16270c78e8dccd3e61fc 100644
|
||||
index fd2cbb708b9eaf41d6fe8c9f22003d27883ff1c3..b315a43370b067d060130e387f91bb84e57bc536 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1141,6 +1141,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1073,6 +1073,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final java.math.BigDecimal TPS_BASE = new java.math.BigDecimal(1E9).multiply(new java.math.BigDecimal(SAMPLE_INTERVAL));
|
||||
// Paper end
|
||||
|
||||
@@ -38,7 +38,7 @@ index c5ab5079c953ce9263491b791ebe421032e8f74d..1f3c675cbfe3d6d590bf16270c78e8dc
|
||||
protected void runServer() {
|
||||
try {
|
||||
if (!this.initServer()) {
|
||||
@@ -1227,7 +1232,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1159,7 +1164,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.nextTickTimeNanos += l;
|
||||
|
||||
this.tickFrame.start();
|
||||
@@ -48,8 +48,8 @@ index c5ab5079c953ce9263491b791ebe421032e8f74d..1f3c675cbfe3d6d590bf16270c78e8dc
|
||||
// Paper start - rewrite chunk system
|
||||
final Throwable crash = this.chunkSystemCrash;
|
||||
if (crash != null) {
|
||||
@@ -1356,11 +1363,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
protected void waitUntilNextTick() {
|
||||
@@ -1289,11 +1296,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.packetProcessor.processQueuedPackets();
|
||||
this.runAllTasks();
|
||||
this.waitingForNextTick = true;
|
||||
+ long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
|
||||
@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 515bc3de097bf9edda42584e56fa173727455b5a..9153d6d44d740e014579ebd7606fd2f3adbca844 100644
|
||||
index a58dd6d8e69736163b7099d66b0ebcb1a4a9e527..8d8f58be0214dd9ac0909415c1f0f12e7bf7874d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2231,8 +2231,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -2283,8 +2283,8 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
|
||||
public void push(Entity entity) {
|
||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 9153d6d44d740e014579ebd7606fd2f3adbca844..479cb2a3135b86bf1ae5132f8ddfbfb59c85cafc 100644
|
||||
index 8d8f58be0214dd9ac0909415c1f0f12e7bf7874d..81af1bbb579b752064fce0793afb413a935889e7 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1218,8 +1218,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1228,8 +1228,18 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://galemc.org
|
||||
|
||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java b/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java
|
||||
index 632920e04686d8a0fd0a60e87348be1fe7862a3c..ba0dd850f90564fab3a5b922bb28d24490180417 100644
|
||||
index 9a1fbd88e56f8dd01368a0a5e74cfa8c54965d7f..97f88de17bbc7df21189e9999fba1147f1380c6b 100644
|
||||
--- a/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java
|
||||
+++ b/src/main/java/ca/spottedleaf/moonrise/common/util/MoonriseCommon.java
|
||||
@@ -11,6 +11,10 @@ import java.util.function.Consumer;
|
||||
@@ -19,9 +19,9 @@ index 632920e04686d8a0fd0a60e87348be1fe7862a3c..ba0dd850f90564fab3a5b922bb28d244
|
||||
+ public static int chunkSystemWorkerThreads;
|
||||
+ // Gale end - metrics - chunk system IO threads
|
||||
|
||||
public static final PrioritisedThreadPool WORKER_POOL = new PrioritisedThreadPool(
|
||||
new Consumer<>() {
|
||||
@@ -54,6 +58,11 @@ public final class MoonriseCommon {
|
||||
public static final long WORKER_QUEUE_HOLD_TIME = (long)(20.0e6); // 20ms
|
||||
public static final BalancedPrioritisedThreadPool WORKER_POOL = new BalancedPrioritisedThreadPool(
|
||||
@@ -51,6 +55,11 @@ public final class MoonriseCommon {
|
||||
|
||||
final int ioThreads = Math.max(1, configIoThreads);
|
||||
|
||||
@@ -34,7 +34,7 @@ index 632920e04686d8a0fd0a60e87348be1fe7862a3c..ba0dd850f90564fab3a5b922bb28d244
|
||||
IO_POOL.adjustThreadCount(ioThreads);
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 6abc57669e87f7f98f3b76af3c0e50825fea6eb1..aa9dd6b75e8d3cfa1c527ef28e195b06772e5ade 100644
|
||||
index 9f4d73fd321f6f0cd19fdd1b63068d2ea6c0816b..8cafbe5c2975cbd01bb1f39a92864af91c8b79bd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
|
||||
@@ -70,10 +70,10 @@ index d0c4037c3cc60c54ea4c60ffc2c227107fecd01c..c01f3bd5022371b71f2bdc00ebf9d134
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index a972eeddbdc59e53279a7c5c704e28c2fcdf7290..c18f917171a5ba62afbeedd3638f020117394aff 100644
|
||||
index 940f60cd846107a82c1c523d73f9028b50a929d9..f6658f1b3c83e82f68ec0019bc6d40b98df6f1b8 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -341,13 +341,13 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -340,13 +340,13 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ index a972eeddbdc59e53279a7c5c704e28c2fcdf7290..c18f917171a5ba62afbeedd3638f0201
|
||||
return createWorldContextMap(level.levelStorageAccess.levelDirectory.path(), level.serverLevelData.getLevelName(), level.dimension().location(), level.spigotConfig, level.registryAccess(), level.getGameRules());
|
||||
}
|
||||
|
||||
@@ -450,17 +450,6 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -449,17 +449,6 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
return Files.exists(legacyConfig) && Files.isRegularFile(legacyConfig);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ index a972eeddbdc59e53279a7c5c704e28c2fcdf7290..c18f917171a5ba62afbeedd3638f0201
|
||||
@Deprecated
|
||||
public static YamlConfiguration loadLegacyConfigFile(File configFile) throws Exception {
|
||||
YamlConfiguration config = new YamlConfiguration();
|
||||
@@ -483,9 +472,16 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
@@ -482,9 +471,16 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
}
|
||||
|
||||
// Symlinks are not correctly checked in createDirectories
|
||||
@@ -151,18 +151,18 @@ index a8a82aca70a97e30ca680c86421c6a04ed8172f8..db23f74b4c02c43ab42cf8db15c400ee
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 32fe51b19323e3c4c56e7f9e621e6e808ee5fe38..18a087e82383d0776504293bba513e247f4bc881 100644
|
||||
index c6b82ae74bad6afe1c2ad79ca7e4271f7ca2667f..641d9ee9e2cd37592e900ae5a91f69a29fd60db3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1048,6 +1048,7 @@ public final class CraftServer implements Server {
|
||||
@@ -992,6 +992,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);
|
||||
+ this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||
@@ -2947,6 +2948,14 @@ public final class CraftServer implements Server {
|
||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && world.getGameRules().getBoolean(GameRules.RULE_SPAWN_MONSTERS)); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||
@@ -2725,6 +2726,14 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
</div>
|
||||
|
||||
> [!WARNING]
|
||||
> Leaf 是一个面向性能的分支。在迁移到 Leaf 之前,请务必**提前备份**。欢迎任何人贡献优化或报告问题来帮助我们改进。
|
||||
> 当前 Leaf 1.21.9 是一个临时分支,与 1.21.8 分支隔离。 \
|
||||
> 上游更新 Paper 将每月进行一次,并且不会从 Leaf 1.21.8 接收修复,直到 Leaf 1.21.8 再次宣布稳定。 \
|
||||
> 它仅供想要尝鲜 1.21.9 的用户使用,**请勿**在生产环境中使用!
|
||||
|
||||
[English](../../README.md) | **中文**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user