Adventure (kind of)

This commit is contained in:
Nassim Jahnke 2023-12-05 19:38:29 +01:00
parent 8e8d6aeeb0
commit 9b56221762
10 changed files with 282 additions and 367 deletions

View File

@ -174,7 +174,7 @@ index 0000000000000000000000000000000000000000..3be7f53046d821d6777481b92b3aa6e3
+} +}
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
deleted file mode 100644 deleted file mode 100644
index 2410a3cb98fc8d643043c7e3a85c880d4a9f2aa4..0000000000000000000000000000000000000000 index 6ebce22b21550442716de605149e9d9eb6bee481..0000000000000000000000000000000000000000
--- a/pom.xml --- a/pom.xml
+++ /dev/null +++ /dev/null
@@ -1,602 +0,0 @@ @@ -1,602 +0,0 @@
@ -184,7 +184,7 @@ index 2410a3cb98fc8d643043c7e3a85c880d4a9f2aa4..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId> - <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId> - <artifactId>spigot</artifactId>
- <packaging>jar</packaging> - <packaging>jar</packaging>
- <version>1.20.2-R0.1-SNAPSHOT</version> - <version>1.20.3-R0.1-SNAPSHOT</version>
- <name>Spigot</name> - <name>Spigot</name>
- <url>https://www.spigotmc.org/</url> - <url>https://www.spigotmc.org/</url>
- -
@ -200,7 +200,7 @@ index 2410a3cb98fc8d643043c7e3a85c880d4a9f2aa4..00000000000000000000000000000000
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <api.version>unknown</api.version> - <api.version>unknown</api.version>
- <bt.name>git</bt.name> - <bt.name>git</bt.name>
- <minecraft_version>1_20_R2</minecraft_version> - <minecraft_version>1_20_R3</minecraft_version>
- <maven.compiler.source>17</maven.compiler.source> - <maven.compiler.source>17</maven.compiler.source>
- <maven.compiler.target>17</maven.compiler.target> - <maven.compiler.target>17</maven.compiler.target>
- </properties> - </properties>
@ -254,13 +254,13 @@ index 2410a3cb98fc8d643043c7e3a85c880d4a9f2aa4..00000000000000000000000000000000
- <dependency> - <dependency>
- <groupId>com.mojang</groupId> - <groupId>com.mojang</groupId>
- <artifactId>authlib</artifactId> - <artifactId>authlib</artifactId>
- <version>5.0.47</version> - <version>5.0.51</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>
- <groupId>com.mojang</groupId> - <groupId>com.mojang</groupId>
- <artifactId>brigadier</artifactId> - <artifactId>brigadier</artifactId>
- <version>1.1.8</version> - <version>1.2.9</version>
- <scope>compile</scope> - <scope>compile</scope>
- </dependency> - </dependency>
- <dependency> - <dependency>

View File

@ -42,7 +42,7 @@ index ad3035da44c6af2fa7cc53926f33526a43740313..e89fa618fa20e3e843d8de81629e6dc5
} }
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
index 3ba785845a63e46a44fc48264d08c96bfc34ab8b..92bd58010e8c89e361e28aec59447349edbbc028 100644 index 1915b138ea89790ef8b7456b7fddcbd5d97e5444..ba9f6d288d8773f275e35a9513f7f59ad3f666c0 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java --- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
@@ -173,11 +173,11 @@ public class BehaviorUtils { @@ -173,11 +173,11 @@ public class BehaviorUtils {
@ -61,10 +61,10 @@ index 3ba785845a63e46a44fc48264d08c96bfc34ab8b..92bd58010e8c89e361e28aec59447349
entityliving1 = entityliving2; entityliving1 = entityliving2;
} else { } else {
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index 7918deb55e6ed2e16eba501ab380a456270d9512..a81475d0cd3c5b75b4abe0d1a01389372a4d9ab1 100644 index 17c42cfcec69385f0b65e2d42d735e8b8f6e7b04..04adc10f24f96804a5cb14e884224bb672360464 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -197,7 +197,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener { @@ -193,7 +193,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
Builder<ResourceLocation, RecipeHolder<?>> builder = ImmutableMap.builder(); Builder<ResourceLocation, RecipeHolder<?>> builder = ImmutableMap.builder();
recipes.forEach((recipeholder) -> { recipes.forEach((recipeholder) -> {

View File

@ -102,10 +102,10 @@ index 68e3d54c79924d72b22eb3bc142ff47aa1700895..d3300e43523429fdd0e61c5aa9aed2e6
private final String path; private final String path;
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 84dab998d5b91b9c5690e9e086b17a60b6dec058..2ac60ea28ce722cdef61cfdc69bbbdf391628238 100644 index 602964d92ddf9e4ec47ed3cb45787fdd061a881e..6b0a1ff870e013a83f7922021ab296bb1c716079 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -107,6 +107,17 @@ public class Main { @@ -105,6 +105,17 @@ public class Main {
*/ // CraftBukkit end */ // CraftBukkit end
try { try {
@ -124,7 +124,7 @@ index 84dab998d5b91b9c5690e9e086b17a60b6dec058..2ac60ea28ce722cdef61cfdc69bbbdf3
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java diff --git a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
index 7db49f077704f03d1815f8382523199bd6c9a0dc..4ed8f38ba9c7b075b99a0da0e213a1e9d03ac717 100644 index a2a8bce29ec5540de89095574dfdc0ca9b17bbd3..d92cd89373f8373c367ce422328b9836de09096d 100644
--- a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java --- a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
+++ b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java +++ b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
@@ -32,7 +32,7 @@ public class ServerPacksSource extends BuiltInPackSource { @@ -32,7 +32,7 @@ public class ServerPacksSource extends BuiltInPackSource {
@ -137,7 +137,7 @@ index 7db49f077704f03d1815f8382523199bd6c9a0dc..4ed8f38ba9c7b075b99a0da0e213a1e9
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index b9bb24bae5943ca922d3bcddfc55ee3612d7d16a..5456b4fa5491bed89183024aea6ef99f4fad4688 100644 index d837882f91dcc684873010ba2d93ffe035d89c57..16cee5f32f980d91a6a616a2cd47016b80f2146e 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -209,7 +209,7 @@ public class Main { @@ -209,7 +209,7 @@ public class Main {
@ -148,7 +148,7 @@ index b9bb24bae5943ca922d3bcddfc55ee3612d7d16a..5456b4fa5491bed89183024aea6ef99f
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper + Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21); deadline.add(Calendar.DAY_OF_YEAR, -3);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644 index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

View File

@ -4807,10 +4807,10 @@ index 0000000000000000000000000000000000000000..614aba60bb07946a144650fd3aedb316
+ protected abstract boolean belowZero(O value); + protected abstract boolean belowZero(O value);
+} +}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 2ac60ea28ce722cdef61cfdc69bbbdf391628238..9cfdd5d8c1650d9c9bdfbc07980239e507ff942d 100644 index 6b0a1ff870e013a83f7922021ab296bb1c716079..f3130afbfd70e39a8000b0471854f8ef892bbbf5 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -139,6 +139,10 @@ public class Main { @@ -137,6 +137,10 @@ public class Main {
dedicatedserversettings.forceSave(); dedicatedserversettings.forceSave();
Path path2 = Paths.get("eula.txt"); Path path2 = Paths.get("eula.txt");
Eula eula = new Eula(path2); Eula eula = new Eula(path2);
@ -4821,7 +4821,7 @@ index 2ac60ea28ce722cdef61cfdc69bbbdf391628238..9cfdd5d8c1650d9c9bdfbc07980239e5
if (optionset.has("initSettings")) { // CraftBukkit if (optionset.has("initSettings")) { // CraftBukkit
// CraftBukkit start - SPIGOT-5761: Create bukkit.yml and commands.yml if not present // CraftBukkit start - SPIGOT-5761: Create bukkit.yml and commands.yml if not present
@@ -173,7 +177,7 @@ public class Main { @@ -171,7 +175,7 @@ public class Main {
} }
File file = (File) optionset.valueOf("universe"); // CraftBukkit File file = (File) optionset.valueOf("universe"); // CraftBukkit
@ -4831,10 +4831,10 @@ index 2ac60ea28ce722cdef61cfdc69bbbdf391628238..9cfdd5d8c1650d9c9bdfbc07980239e5
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath()); LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0e7c2e2d796aa2f29ab9a0d44a52f833b1ee6f77..7fca1f7a7ba2a6f6238eddc134f78f9abdc1531b 100644 index 8cc3fd73eaa41b87c63cf26e299affca16f20d87..afd39623d2c2e9270510a6a83b5918392442744d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private static final int SAMPLE_INTERVAL = 100; private static final int SAMPLE_INTERVAL = 100;
public final double[] recentTps = new double[ 3 ]; public final double[] recentTps = new double[ 3 ];
// Spigot end // Spigot end
@ -4842,7 +4842,7 @@ index 0e7c2e2d796aa2f29ab9a0d44a52f833b1ee6f77..7fca1f7a7ba2a6f6238eddc134f78f9a
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) { public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference(); AtomicReference<S> atomicreference = new AtomicReference();
@@ -379,6 +380,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -388,6 +389,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end // CraftBukkit end
@ -4851,7 +4851,7 @@ index 0e7c2e2d796aa2f29ab9a0d44a52f833b1ee6f77..7fca1f7a7ba2a6f6238eddc134f78f9a
private void readScoreboard(DimensionDataStorage persistentStateManager) { private void readScoreboard(DimensionDataStorage persistentStateManager) {
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c07b09d808 100644 index 1d611538d339345df065cd9c0c582d02e1fb0cc7..92d1ad919c1b3e27af9cc74ada19f1e9c4f3471f 100644
--- a/src/main/java/net/minecraft/server/Services.java --- a/src/main/java/net/minecraft/server/Services.java
+++ b/src/main/java/net/minecraft/server/Services.java +++ b/src/main/java/net/minecraft/server/Services.java
@@ -10,14 +10,30 @@ import javax.annotation.Nullable; @@ -10,14 +10,30 @@ import javax.annotation.Nullable;
@ -4889,7 +4889,7 @@ index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c0
@Nullable @Nullable
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index e62eb92b63c027dfa431f8cc241ab968a3abf3f4..45657deb1ab3ebdfacf2a9bbb591a9a14236840c 100644 index dd16b56a478e1cd6f1b3c5563c9c02025d894802..458c04786f7b56f3c006e1e717c0ac709fddb1a0 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -4916,10 +4916,10 @@ index 37ab411817008d4e6194e177d88d50931e53b42e..ca23639f15107ccd43b874ae38fa3727
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c8e5e99d46c711efa90e446689e55267c70c7254..64522a15ecb73087222b33ffb13e29ac048b62a7 100644 index 0070f5cc0442433cf63a958748d588fbb8c5b735..659d2d5cab4b953c21f560b65b37d9586d9a1c01 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -234,7 +234,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -236,7 +236,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Holder holder = worlddimension.type(); // CraftBukkit - decompile error
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
@ -4929,10 +4929,10 @@ index c8e5e99d46c711efa90e446689e55267c70c7254..64522a15ecb73087222b33ffb13e29ac
this.convertable = convertable_conversionsession; this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 4dfb372f8c8f60b6aad18ea9b6334e1a7c9bc4ed..9f877007869ef984d2c95bd8e3d773a2b98f202c 100644 index cff78fc8d073be7541628bb40670f82d1e9917cd..50ea733f42d0f06a62b55e61b0c73995896b0d6a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -155,6 +155,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -158,6 +158,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
public boolean populating; public boolean populating;
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
@ -4945,7 +4945,7 @@ index 4dfb372f8c8f60b6aad18ea9b6334e1a7c9bc4ed..9f877007869ef984d2c95bd8e3d773a2
public final SpigotTimings.WorldTimingsHandler timings; // Spigot public final SpigotTimings.WorldTimingsHandler timings; // Spigot
public static BlockPos lastPhysicsProblem; // Spigot public static BlockPos lastPhysicsProblem; // Spigot
@@ -172,8 +178,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -175,8 +181,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public abstract ResourceKey<LevelStem> getTypeKey(); public abstract ResourceKey<LevelStem> getTypeKey();
@ -4957,10 +4957,10 @@ index 4dfb372f8c8f60b6aad18ea9b6334e1a7c9bc4ed..9f877007869ef984d2c95bd8e3d773a2
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 46dd3c8957d5247366c2873c8962b012cd1464dc..79f9e87a2f0b517b762b3843fcd2bc119ed57b8a 100644 index 95a547c980c7199aa53736c9362b7e5b35497136..3a0f31f25f4956248b708ae736b6604d0b957647 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -919,6 +919,7 @@ public final class CraftServer implements Server { @@ -914,6 +914,7 @@ public final class CraftServer implements Server {
} }
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
@ -4969,7 +4969,7 @@ index 46dd3c8957d5247366c2873c8962b012cd1464dc..79f9e87a2f0b517b762b3843fcd2bc11
world.serverLevelData.setDifficulty(config.difficulty); world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals); world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 5456b4fa5491bed89183024aea6ef99f4fad4688..3523f8851472890c97e628e22df883b91ba603fe 100644 index 16cee5f32f980d91a6a616a2cd47016b80f2146e..098b5d68cd910ae95a3512c8921b9465d9446d3b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -141,6 +141,19 @@ public class Main { @@ -141,6 +141,19 @@ public class Main {
@ -5053,13 +5053,13 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
+ } + }
+} +}
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
index c3c0dff6497ba47604c29a9ff7bcc4692e9ba757..6dd31027808cd309b6ee5ece9fe73d251c03b7cf 100644 index a1c2c702cc6b5d949df62b5ecf4cc62b8e4e8f77..381c1d681a982e28f1909bd954d21827549f7bcc 100644
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java --- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java +++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
@@ -63,6 +63,7 @@ public abstract class AbstractTestingBase { @@ -62,6 +62,7 @@ public abstract class AbstractTestingBase {
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
DummyServer.setup(); DummyServer.setup();
DummyEnchantments.setup();
+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper + io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM); CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);

View File

@ -17,10 +17,10 @@ Subject: [PATCH] CB fixes
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 64522a15ecb73087222b33ffb13e29ac048b62a7..82c9886222d49bd03b642c0d9c07d82d1d27896b 100644 index 659d2d5cab4b953c21f560b65b37d9586d9a1c01..9e2b67993ff7d263576d9579885ec1eaea6144df 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -294,7 +294,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -296,7 +296,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
long l = minecraftserver.getWorldData().worldGenOptions().seed(); long l = minecraftserver.getWorldData().worldGenOptions().seed();
@ -84,10 +84,10 @@ index 6ab2fd523b7f4e5cacef4ebb95f6812f391985d1..85133c388eff009ea1ffa391824b6556
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 79f9e87a2f0b517b762b3843fcd2bc119ed57b8a..b7d5b46fa3af1420a402addb73d6ed95f2456375 100644 index 3a0f31f25f4956248b708ae736b6604d0b957647..ead95ec10f93918215ea88d43aa5ad9e451ec3db 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2422,7 +2422,13 @@ public final class CraftServer implements Server { @@ -2454,7 +2454,13 @@ public final class CraftServer implements Server {
Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null"); Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
LootDataManager registry = this.getServer().getLootData(); LootDataManager registry = this.getServer().getLootData();
@ -103,7 +103,7 @@ index 79f9e87a2f0b517b762b3843fcd2bc119ed57b8a..b7d5b46fa3af1420a402addb73d6ed95
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 3523f8851472890c97e628e22df883b91ba603fe..b1a1caef59f3ea0fa68ca47040ad6fff9820cc5a 100644 index 098b5d68cd910ae95a3512c8921b9465d9446d3b..fc9406f5f85c1f6180dbb666129a264b2baa55a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -122,6 +122,7 @@ public class Main { @@ -122,6 +122,7 @@ public class Main {

View File

@ -5919,10 +5919,10 @@ index 0000000000000000000000000000000000000000..d603887f4d0464f4463172fd79bcd529
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 092bfedfb32c38550d1cab1b696feac6df09131f..9870eccc1dc5c2201f12f8e2affe647f6b0375f8 100644 index d3afd54f546ae81f1c6d1a3ca9ee4e8e5c786ae4..114f4017c4133042178c57d424f10079163835dd 100644
--- a/src/main/java/net/minecraft/Util.java --- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java
@@ -118,7 +118,7 @@ public class Util { @@ -125,7 +125,7 @@ public class Util {
} }
public static long getNanos() { public static long getNanos() {
@ -5952,10 +5952,10 @@ index 2bb5e51f71cbf66819d198505aa4a5ecffd246c6..1834f3efb05fd70c8c1c67733bff5148
@Override @Override
public BlockPos immutable() { public BlockPos immutable() {
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
index 666df22c8f847ef7152669540a3844566ef90d78..92095b494a0c4fb89b84f0b1c0376615d28e34ce 100644 index c77fc9b93f3213655b2cc89f4afdec893f1cd22d..c77a6bb6885ffaaa4d9e1aa9d4770d5e847a590b 100644
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java --- a/src/main/java/net/minecraft/nbt/CompoundTag.java
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
@@ -160,7 +160,7 @@ public class CompoundTag implements Tag { @@ -164,7 +164,7 @@ public class CompoundTag implements Tag {
return "TAG_Compound"; return "TAG_Compound";
} }
}; };
@ -5964,7 +5964,7 @@ index 666df22c8f847ef7152669540a3844566ef90d78..92095b494a0c4fb89b84f0b1c0376615
protected CompoundTag(Map<String, Tag> entries) { protected CompoundTag(Map<String, Tag> entries) {
this.tags = entries; this.tags = entries;
@@ -236,6 +236,10 @@ public class CompoundTag implements Tag { @@ -240,6 +240,10 @@ public class CompoundTag implements Tag {
this.tags.put(key, NbtUtils.createUUID(value)); this.tags.put(key, NbtUtils.createUUID(value));
} }
@ -6076,10 +6076,10 @@ index 44cac39893eb968aa8ea21ee571c0dcb866ce06c..5151d68ba6ec72a7124f298253c5f0af
+ +
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fdbc744e7a4843e564ffaeecdc05ef6bbd53b74a..36748baf6030028f083902459797f0719f50e456 100644 index 21e84dfd9ee3f8ce6234581ec31c64c35021d3c8..729849caf3e3cb542d5c4097a568c5fadeff0f6d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final double[] recentTps = new double[ 3 ]; public final double[] recentTps = new double[ 3 ];
// Spigot end // Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
@ -6087,7 +6087,7 @@ index fdbc744e7a4843e564ffaeecdc05ef6bbd53b74a..36748baf6030028f083902459797f071
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) { public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference(); AtomicReference<S> atomicreference = new AtomicReference();
@@ -910,6 +911,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -956,6 +957,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1); MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
} }
// Spigot start // Spigot start
@ -6097,24 +6097,24 @@ index fdbc744e7a4843e564ffaeecdc05ef6bbd53b74a..36748baf6030028f083902459797f071
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json"); MinecraftServer.LOGGER.info("Saving usercache.json");
this.getProfileCache().save(); this.getProfileCache().save();
@@ -974,6 +978,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1029,6 +1033,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastOverloadWarning = this.nextTickTime;
} }
}
// Spigot start
+ ++MinecraftServer.currentTickLong; // Paper + ++MinecraftServer.currentTickLong; // Paper
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 ) if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
{ {
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL; long curTime = Util.getMillis();
@@ -1191,7 +1196,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1264,7 +1269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.debug("Autosave finished"); MinecraftServer.LOGGER.debug("Autosave finished");
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
} }
- -
+ io.papermc.paper.util.CachedLists.reset(); // Paper + io.papermc.paper.util.CachedLists.reset(); // Paper
this.profiler.push("tallying"); this.profiler.push("tallying");
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i; long j = Util.getNanos() - i;
int k = this.tickCount % 100;
@@ -1286,6 +1291,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1388,6 +1393,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try { try {
worldserver.timings.doTick.startTiming(); // Spigot worldserver.timings.doTick.startTiming(); // Spigot
worldserver.tick(shouldKeepTicking); worldserver.tick(shouldKeepTicking);
@ -6680,10 +6680,10 @@ index 1bfa33253a154c66dc8b7e476c777b74cda8999f..d8b83c8c89143d78620f812c491a1950
while (objectiterator.hasNext()) { while (objectiterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2d1515227 100644 index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579423d03ac 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -51,6 +51,7 @@ import net.minecraft.world.level.storage.LevelStorageSource; @@ -49,6 +49,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
public class ServerChunkCache extends ChunkSource { public class ServerChunkCache extends ChunkSource {
@ -6691,7 +6691,7 @@ index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2
private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList(); private static final List<ChunkStatus> CHUNK_STATUSES = ChunkStatus.getStatusList();
private final DistanceManager distanceManager; private final DistanceManager distanceManager;
final ServerLevel level; final ServerLevel level;
@@ -69,6 +70,231 @@ public class ServerChunkCache extends ChunkSource { @@ -67,6 +68,231 @@ public class ServerChunkCache extends ChunkSource {
@Nullable @Nullable
@VisibleForDebug @VisibleForDebug
private NaturalSpawner.SpawnState lastSpawnState; private NaturalSpawner.SpawnState lastSpawnState;
@ -6923,7 +6923,7 @@ index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) { public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory) {
this.level = world; this.level = world;
@@ -121,6 +347,49 @@ public class ServerChunkCache extends ChunkSource { @@ -119,6 +345,49 @@ public class ServerChunkCache extends ChunkSource {
this.lastChunk[0] = chunk; this.lastChunk[0] = chunk;
} }
@ -6973,7 +6973,7 @@ index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2
@Nullable @Nullable
@Override @Override
public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) { public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) {
@@ -329,6 +598,12 @@ public class ServerChunkCache extends ChunkSource { @@ -327,6 +596,12 @@ public class ServerChunkCache extends ChunkSource {
} }
} }
@ -6987,10 +6987,10 @@ index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos); ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 82c9886222d49bd03b642c0d9c07d82d1d27896b..44ae05684a2fe19d3e25617a4fa133c932fd4e51 100644 index 9e2b67993ff7d263576d9579885ec1eaea6144df..0995b63953d62198c117fdc7a8c4703a986d2db2 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -176,6 +176,7 @@ import org.bukkit.event.weather.LightningStrikeEvent; @@ -178,6 +178,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
import org.bukkit.event.world.GenericGameEvent; import org.bukkit.event.world.GenericGameEvent;
import org.bukkit.event.world.TimeSkipEvent; import org.bukkit.event.world.TimeSkipEvent;
// CraftBukkit end // CraftBukkit end
@ -6998,7 +6998,7 @@ index 82c9886222d49bd03b642c0d9c07d82d1d27896b..44ae05684a2fe19d3e25617a4fa133c9
public class ServerLevel extends Level implements WorldGenLevel { public class ServerLevel extends Level implements WorldGenLevel {
@@ -228,6 +229,98 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -230,6 +231,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
return this.convertable.dimensionType; return this.convertable.dimensionType;
} }
@ -7098,10 +7098,10 @@ index 82c9886222d49bd03b642c0d9c07d82d1d27896b..44ae05684a2fe19d3e25617a4fa133c9
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error // IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2206e1846526df05636e80afbb499a867a26f1b7..a10f3b9b07692333a2d243bc5591e6e6a43fdf06 100644 index 11a5b918520043bf047d3610a9e79ecc3a7fab47..c8e016135ad80a892b48a6a338c24cfd757a5f10 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -251,6 +251,8 @@ public class ServerPlayer extends Player { @@ -259,6 +259,8 @@ public class ServerPlayer extends Player {
public boolean sentListPacket = false; public boolean sentListPacket = false;
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
// CraftBukkit end // CraftBukkit end
@ -7110,7 +7110,7 @@ index 2206e1846526df05636e80afbb499a867a26f1b7..a10f3b9b07692333a2d243bc5591e6e6
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) { public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
@@ -319,6 +321,8 @@ public class ServerPlayer extends Player { @@ -327,6 +329,8 @@ public class ServerPlayer extends Player {
this.fudgeSpawnLocation(world); this.fudgeSpawnLocation(world);
this.updateOptions(clientOptions); this.updateOptions(clientOptions);
@ -7132,7 +7132,7 @@ index 3a4f026c73cdd22d30bdadabbcf24bef969b73e4..0d536d72ac918fbd403397ff369d1014
private final String name; private final String name;
private final Comparator<T> comparator; private final Comparator<T> comparator;
diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
index a63d5ba706a5b8e430aedc045bdeb3a410bd0eef..e96a0ca47e4701ba187555bd92c968345bc85677 100644 index 43040b678206092bcb06acde919b75ecb78564df..d11741d2618976bdb51f75d823f260f32d5bafc9 100644
--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java
+++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java
@@ -160,6 +160,26 @@ public class WorldGenRegion implements WorldGenLevel { @@ -160,6 +160,26 @@ public class WorldGenRegion implements WorldGenLevel {
@ -7163,10 +7163,10 @@ index a63d5ba706a5b8e430aedc045bdeb3a410bd0eef..e96a0ca47e4701ba187555bd92c96834
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos); return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 11d3b31be43c0e57a47578caff3014a205bb3beb..4c64ab1533534a1d5757722c796771b03db6367f 100644 index 6e26ee14195493a9c4eab60a3c4cd0dd09786ec2..6e1b20bfe61339fa22d4403ed77b961cc0f0105c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -178,6 +178,7 @@ public abstract class PlayerList { @@ -177,6 +177,7 @@ public abstract class PlayerList {
} }
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) { public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
@ -7193,10 +7193,10 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
@Override @Override
public void tell(R runnable) { public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a741631a6ead201a79ffa4754fc9d6f3e188a04c..140c6befe7f5cba51904eaae0dc88e936f660a12 100644 index 06d015dd8b14008f3fe2fae5005a4d41be26346b..d0f1cd32aa71f275c9975d1cedc8895fb2e8a174 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -323,6 +323,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -328,6 +328,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
} }
// CraftBukkit end // CraftBukkit end
@ -7209,10 +7209,10 @@ index a741631a6ead201a79ffa4754fc9d6f3e188a04c..140c6befe7f5cba51904eaae0dc88e93
public Entity(EntityType<?> type, Level world) { public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.id = Entity.ENTITY_COUNTER.incrementAndGet();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index ba1c0ce4088b711897c028d62605b50719a89040..8fa96e6875b1d5dd66ef536d76648170b912c919 100644 index a2dfb248d73c8031f2f0ae55f5fa20bb95629fd9..c2c3fa92235c365f4e4a8bdffa3295e32ebd8d16 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -257,6 +257,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean collides = true; public boolean collides = true;
public Set<UUID> collidableExemptions = new HashSet<>(); public Set<UUID> collidableExemptions = new HashSet<>();
public boolean bukkitPickUpLoot; public boolean bukkitPickUpLoot;
@ -7221,10 +7221,10 @@ index ba1c0ce4088b711897c028d62605b50719a89040..8fa96e6875b1d5dd66ef536d76648170
@Override @Override
public float getBukkitYaw() { public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 6041f79ad8e2b61b438b19b5569ab02936a0be99..ec841a4d9a11f0d9047c202a31f944b340da33c8 100644 index 1152735ac2cb8b193fdfb448f24517ad902b02a8..01761d37c9e4be4e498b62c7612885648b2968a6 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -276,6 +276,7 @@ public abstract class Mob extends LivingEntity implements Targeting { @@ -277,6 +277,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
return this.target; return this.target;
} }
@ -7246,7 +7246,7 @@ index 21fa43e0c3fabf74919f7e41d074ab1f7c061967..5e9cf929674888b3a143a0691dc6936b
return this.getWalkTargetValue(pos, this.level()); return this.getWalkTargetValue(pos, this.level());
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java
index a0b5895abc88d297045e05f25bb09527991d43f0..6e0bd0eab0b06a4ac3042496bbb91292544e9f3c 100644 index 86b65d66d895a4f02da002448739c122796feb4d..036d79baf372f4900681fee366bcd91c99474e5f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Monster.java --- a/src/main/java/net/minecraft/world/entity/monster/Monster.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Monster.java +++ b/src/main/java/net/minecraft/world/entity/monster/Monster.java
@@ -27,6 +27,7 @@ import net.minecraft.world.level.ServerLevelAccessor; @@ -27,6 +27,7 @@ import net.minecraft.world.level.ServerLevelAccessor;
@ -7258,10 +7258,10 @@ index a0b5895abc88d297045e05f25bb09527991d43f0..6e0bd0eab0b06a4ac3042496bbb91292
super(type, world); super(type, world);
this.xpReward = 5; this.xpReward = 5;
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 099daefa53b930a9a94ed91ef3fcd9e1607bfd09..1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602 100644 index d75bd8ab63930454d72299c378b6fef2ccc3725d..9861cd23b07f8fbacb1d125af835dee58c2debbb 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -798,6 +798,25 @@ public final class ItemStack { @@ -823,6 +823,25 @@ public final class ItemStack {
return this.tag != null ? this.tag.getList("Enchantments", 10) : new ListTag(); return this.tag != null ? this.tag.getList("Enchantments", 10) : new ListTag();
} }
@ -7287,7 +7287,7 @@ index 099daefa53b930a9a94ed91ef3fcd9e1607bfd09..1b2c0fda262ca6d5bd2ce22bc2e93480
public void setTag(@Nullable CompoundTag nbt) { public void setTag(@Nullable CompoundTag nbt) {
this.tag = nbt; this.tag = nbt;
if (this.getItem().canBeDepleted()) { if (this.getItem().canBeDepleted()) {
@@ -1187,6 +1206,7 @@ public final class ItemStack { @@ -1212,6 +1231,7 @@ public final class ItemStack {
// CraftBukkit start // CraftBukkit start
@Deprecated @Deprecated
public void setItem(Item item) { public void setItem(Item item) {
@ -7392,10 +7392,10 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.defaultBlockState(); return Blocks.AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9f877007869ef984d2c95bd8e3d773a2b98f202c..384cb02b124dac42521767b0aff481a1b12c0eab 100644 index 50ea733f42d0f06a62b55e61b0c73995896b0d6a..915c1dfae28ccac02d5ebb97d5cf797c66d2c8e4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -90,6 +90,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.SpigotTimings; // Spigot import org.bukkit.craftbukkit.SpigotTimings; // Spigot
import org.bukkit.craftbukkit.block.CapturedBlockState; import org.bukkit.craftbukkit.block.CapturedBlockState;
@ -7403,7 +7403,7 @@ index 9f877007869ef984d2c95bd8e3d773a2b98f202c..384cb02b124dac42521767b0aff481a1
import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.craftbukkit.block.data.CraftBlockData;
import org.bukkit.craftbukkit.util.CraftSpawnCategory; import org.bukkit.craftbukkit.util.CraftSpawnCategory;
import org.bukkit.craftbukkit.util.CraftNamespacedKey; import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@@ -292,18 +293,52 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -295,18 +296,52 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return y < -20000000 || y >= 20000000; return y < -20000000 || y >= 20000000;
} }
@ -7460,7 +7460,7 @@ index 9f877007869ef984d2c95bd8e3d773a2b98f202c..384cb02b124dac42521767b0aff481a1
ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create); ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create);
if (ichunkaccess == null && create) { if (ichunkaccess == null && create) {
@@ -314,7 +349,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -317,7 +352,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
} }
@Override @Override
@ -7469,7 +7469,7 @@ index 9f877007869ef984d2c95bd8e3d773a2b98f202c..384cb02b124dac42521767b0aff481a1
return this.setBlock(pos, state, flags, 512); return this.setBlock(pos, state, flags, 512);
} }
@@ -552,7 +587,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -555,7 +590,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (this.isOutsideBuildHeight(pos)) { if (this.isOutsideBuildHeight(pos)) {
return Blocks.VOID_AIR.defaultBlockState(); return Blocks.VOID_AIR.defaultBlockState();
} else { } else {
@ -7545,10 +7545,10 @@ index 249b3ed33672a9a9529bd14de978722b62019314..0f1025495237aebe30132ace0832aa57
public WorldBorder getWorldBorder() { public WorldBorder getWorldBorder() {
return this.level.getWorldBorder(); return this.level.getWorldBorder();
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index fefeccaf347da1be9342df09fafabb6fcc3be4ae..2b8e88a75e9a974e1ecafe0360a9d69b79326d11 100644 index 171956fbe47032cfac8811ab7fbe94415560304b..07e41b936f5f229876cf9ff5cd8d6278088eee48 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -754,8 +754,8 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -821,8 +821,8 @@ public abstract class BlockBehaviour implements FeatureElement {
public abstract static class BlockStateBase extends StateHolder<Block, BlockState> { public abstract static class BlockStateBase extends StateHolder<Block, BlockState> {
@ -7559,7 +7559,7 @@ index fefeccaf347da1be9342df09fafabb6fcc3be4ae..2b8e88a75e9a974e1ecafe0360a9d69b
private final boolean isAir; private final boolean isAir;
private final boolean ignitedByLava; private final boolean ignitedByLava;
/** @deprecated */ /** @deprecated */
@@ -768,7 +768,7 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -835,7 +835,7 @@ public abstract class BlockBehaviour implements FeatureElement {
private final MapColor mapColor; private final MapColor mapColor;
public final float destroySpeed; public final float destroySpeed;
private final boolean requiresCorrectToolForDrops; private final boolean requiresCorrectToolForDrops;
@ -7568,7 +7568,7 @@ index fefeccaf347da1be9342df09fafabb6fcc3be4ae..2b8e88a75e9a974e1ecafe0360a9d69b
private final BlockBehaviour.StatePredicate isRedstoneConductor; private final BlockBehaviour.StatePredicate isRedstoneConductor;
private final BlockBehaviour.StatePredicate isSuffocating; private final BlockBehaviour.StatePredicate isSuffocating;
private final BlockBehaviour.StatePredicate isViewBlocking; private final BlockBehaviour.StatePredicate isViewBlocking;
@@ -829,12 +829,20 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -896,12 +896,20 @@ public abstract class BlockBehaviour implements FeatureElement {
} }
} }
@ -7589,7 +7589,7 @@ index fefeccaf347da1be9342df09fafabb6fcc3be4ae..2b8e88a75e9a974e1ecafe0360a9d69b
this.legacySolid = this.calculateSolid(); this.legacySolid = this.calculateSolid();
} }
@@ -881,8 +889,8 @@ public abstract class BlockBehaviour implements FeatureElement { @@ -948,8 +956,8 @@ public abstract class BlockBehaviour implements FeatureElement {
return this.getBlock().getOcclusionShape(this.asState(), world, pos); return this.getBlock().getOcclusionShape(this.asState(), world, pos);
} }
@ -7837,7 +7837,7 @@ index 51a0ddcee9a9cb1040fda643a6442d2e2e15b8a0..38ec21faaa16df5485a81a581506700a
public BlockState getBlockState(BlockPos pos) { public BlockState getBlockState(BlockPos pos) {
int i = pos.getY(); int i = pos.getY();
diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
index 25156be63f91a1c41ef41154f675d04eb97459a8..47bab513feec217d875192afef61f3af95b93d24 100644 index 98836000cbca2a21649cb8f2a466986373405ea1..bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd 100644
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
+++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
@@ -90,6 +90,18 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A @@ -90,6 +90,18 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
@ -7860,10 +7860,10 @@ index 25156be63f91a1c41ef41154f675d04eb97459a8..47bab513feec217d875192afef61f3af
return false; return false;
} else { } else {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 30277808c2206b5519477be46ec8a866dd026012..cc9636326687f9d7cd091c97032ce3e43931625d 100644 index c0c0e704f67124b333e54ac72444d6265d1fbafb..c4936130274d5e4512decea691e151dbc2c9ff54 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -245,8 +245,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -246,8 +246,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public Chunk[] getLoadedChunks() { public Chunk[] getLoadedChunks() {
@ -7874,7 +7874,7 @@ index 30277808c2206b5519477be46ec8a866dd026012..cc9636326687f9d7cd091c97032ce3e4
} }
@Override @Override
@@ -321,7 +321,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -322,7 +322,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override @Override
public boolean refreshChunk(int x, int z) { public boolean refreshChunk(int x, int z) {
@ -7883,7 +7883,7 @@ index 30277808c2206b5519477be46ec8a866dd026012..cc9636326687f9d7cd091c97032ce3e4
if (playerChunk == null) return false; if (playerChunk == null) return false;
playerChunk.getTickingChunkFuture().thenAccept(either -> { playerChunk.getTickingChunkFuture().thenAccept(either -> {
@@ -2024,4 +2024,32 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -2030,4 +2030,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.spigot; return this.spigot;
} }
// Spigot end // Spigot end
@ -7917,10 +7917,10 @@ index 30277808c2206b5519477be46ec8a866dd026012..cc9636326687f9d7cd091c97032ce3e4
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 903ff5a3dbeb4c3cfc1e45765880cc6c03819795..278c2adf102c1ec40328c3f4a966afc33586a7e4 100644 index f86da2cfe050ea60d17310c4feebc63c4bf4465f..19e2f524bdc8a705bab29a4d3b2abb3707accb4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1202,4 +1202,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -1246,4 +1246,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.spigot; return this.spigot;
} }
// Spigot end // Spigot end
@ -7959,7 +7959,7 @@ index 903ff5a3dbeb4c3cfc1e45765880cc6c03819795..278c2adf102c1ec40328c3f4a966afc3
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c6881e1d74476c2633e2c2bd3636134c844c5942..8eb170bd71c7158dcd1b90f9c8d46a13a2202509 100644 index 1938288a019cd0815bf944868ee4b9a345703b4e..7278ac809eff364e8b838d63a2ec1291493869f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -23,6 +23,16 @@ import org.bukkit.material.MaterialData; @@ -23,6 +23,16 @@ import org.bukkit.material.MaterialData;
@ -8202,10 +8202,10 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 795d2ef869f9ec229bac76bac5fefff9adc0f2a1..641b1f0444af8d4c4e878495605bc5ba97b124af 100644 index d16df4f475151558593ac637c94391899f313829..32b73cd6d65abe1cd5fd33733d8c06467382acdc 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -104,8 +104,17 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -102,8 +102,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
private static final Map<Item, Material> ITEM_MATERIAL = new HashMap<>(); private static final Map<Item, Material> ITEM_MATERIAL = new HashMap<>();
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>(); private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>(); private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
@ -8223,7 +8223,7 @@ index 795d2ef869f9ec229bac76bac5fefff9adc0f2a1..641b1f0444af8d4c4e878495605bc5ba
for (Block block : BuiltInRegistries.BLOCK) { for (Block block : BuiltInRegistries.BLOCK) {
BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT))); BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
} }
@@ -156,6 +165,14 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -154,6 +163,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
public static ResourceLocation key(Material mat) { public static ResourceLocation key(Material mat) {
return CraftNamespacedKey.toMinecraft(mat.getKey()); return CraftNamespacedKey.toMinecraft(mat.getKey());
} }
@ -8239,7 +8239,7 @@ index 795d2ef869f9ec229bac76bac5fefff9adc0f2a1..641b1f0444af8d4c4e878495605bc5ba
public static byte toLegacyData(BlockState data) { public static byte toLegacyData(BlockState data) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
index 17f8529d89aec34fe198a79ce463367c63098136..7c110a758a84c5e22f36b788dec84998e607af6c 100644 index 1cce46ecfeb93b17b81f206054a6a2a67d2aefcb..e37c2d82ed606cbfe00c152b08c3ab99ac751f69 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
@@ -59,6 +59,7 @@ import net.minecraft.world.ticks.LevelTickAccess; @@ -59,6 +59,7 @@ import net.minecraft.world.ticks.LevelTickAccess;
@ -8276,7 +8276,7 @@ index 17f8529d89aec34fe198a79ce463367c63098136..7c110a758a84c5e22f36b788dec84998
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index d2026d218405a40a6949c5f491c04704811b72b5..629178347039893fb9de710810fe8112499bb91c 100644 index fe3d8ad5de53387236d48ed3a6f2b677ed895bc3..440660dfa70d57e94ae4eef1dce783aee5034f7e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -212,7 +212,23 @@ public class DummyGeneratorAccess implements WorldGenLevel { @@ -212,7 +212,23 @@ public class DummyGeneratorAccess implements WorldGenLevel {