mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-21 18:15:54 +01:00
More patches
This commit is contained in:
parent
2cd29ddbb5
commit
2b6be6f1b3
@ -8,3 +8,5 @@
|
||||
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
|
||||
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
|
||||
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
|
||||
|
||||
minecraft net.minecraft.WorldVersion
|
||||
|
@ -5,7 +5,7 @@ plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.0" apply false
|
||||
id("io.papermc.paperweight.core") version "1.5.2"
|
||||
id("io.papermc.paperweight.core") version "1.5.3"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remap fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 954cf20fb9fbf331fe6314590a3edbe73118ceca..d4c46f44f7a998121482c2fc56d7986881d489d8 100644
|
||||
index 0612eef6d9a9cda81a8d761be2b5e9b094388270..77bf6865c6df829c5b5455d440cb2222a0d8f2af 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -274,9 +274,11 @@ public class BlockPos extends Vec3i {
|
||||
@@ -265,9 +265,11 @@ public class BlockPos extends Vec3i {
|
||||
|
||||
public static Iterable<BlockPos> withinManhattan(BlockPos center, int rangeX, int rangeY, int rangeZ) {
|
||||
int i = rangeX + rangeY + rangeZ;
|
||||
@ -23,7 +23,7 @@ index 954cf20fb9fbf331fe6314590a3edbe73118ceca..d4c46f44f7a998121482c2fc56d79868
|
||||
return () -> {
|
||||
return new AbstractIterator<BlockPos>() {
|
||||
private final BlockPos.MutableBlockPos cursor = new BlockPos.MutableBlockPos();
|
||||
@@ -291,7 +293,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -282,7 +284,7 @@ public class BlockPos extends Vec3i {
|
||||
protected BlockPos computeNext() {
|
||||
if (this.zMirror) {
|
||||
this.zMirror = false;
|
||||
@ -32,7 +32,7 @@ index 954cf20fb9fbf331fe6314590a3edbe73118ceca..d4c46f44f7a998121482c2fc56d79868
|
||||
return this.cursor;
|
||||
} else {
|
||||
BlockPos blockPos;
|
||||
@@ -317,7 +319,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -308,7 +310,7 @@ public class BlockPos extends Vec3i {
|
||||
int k = this.currentDepth - Math.abs(i) - Math.abs(j);
|
||||
if (k <= rangeZ) {
|
||||
this.zMirror = k != 0;
|
||||
@ -41,23 +41,8 @@ index 954cf20fb9fbf331fe6314590a3edbe73118ceca..d4c46f44f7a998121482c2fc56d79868
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index b1ecaf47486eaa876e2286eae894b47ecf3a0849..01438ee9ad7a64ac4fd124d97029f87b49c25d5d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1419,9 +1419,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
LevelChunk chunk1;
|
||||
|
||||
if (chunk instanceof LevelChunk) {
|
||||
- LevelChunk chunk1 = (LevelChunk) chunk;
|
||||
-
|
||||
- chunk1 = chunk1;
|
||||
+ chunk1 = (LevelChunk) chunk; // Paper - remap fix
|
||||
} else {
|
||||
chunk1 = this.level.getChunk(chunkcoordintpair.x, chunkcoordintpair.z);
|
||||
}
|
||||
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 8f0a2f8d3a34c6b97bc7a933272ccf2689576c76..b9fcff8862e624644fdb73afcb3ef2106b0a76fc 100644
|
||||
index 1206ca32cadb98573938328f611b67162c700d84..d81f7eecb8204a974da14a75d1a7a23a6c071112 100644
|
||||
--- a/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 {
|
||||
@ -76,7 +61,7 @@ index 8f0a2f8d3a34c6b97bc7a933272ccf2689576c76..b9fcff8862e624644fdb73afcb3ef210
|
||||
entityliving1 = entityliving2;
|
||||
} 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
|
||||
index 0b76584d85194f0b60ed51f577353bfead0489f5..d025df087e7b87fbc89a722226f2f2263c54ac47 100644
|
||||
index b402543da876e6d14b263443b2d692f33eb08863..4d2d23ff118e9307d50ca2a5194b83450c91a752 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -192,7 +192,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index c9950851db38df64fd82a3a549072d240e37d64d..ce176ef04e211b82020fa082b9cb1bdc4769a526 100644
|
||||
index 6aed6ea708639e43aea6ed467792a55b747fdad7..e9c8ba234bdf28a6f8709b4966367d92a4ac9037 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,10 +9,9 @@ plugins {
|
||||
@ -20,7 +20,7 @@ index c9950851db38df64fd82a3a549072d240e37d64d..ce176ef04e211b82020fa082b9cb1bdc
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
||||
@@ -23,6 +22,8 @@ dependencies {
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
@ -29,7 +29,7 @@ index c9950851db38df64fd82a3a549072d240e37d64d..ce176ef04e211b82020fa082b9cb1bdc
|
||||
+ implementation("io.netty:netty-all:4.1.87.Final"); // Paper - Bump netty
|
||||
}
|
||||
|
||||
val craftbukkitPackageVersion = "1_19_R2" // Paper
|
||||
val craftbukkitPackageVersion = "1_19_R3" // Paper
|
||||
@@ -34,6 +35,7 @@ tasks.jar {
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
@ -67,10 +67,10 @@ index c9950851db38df64fd82a3a549072d240e37d64d..ce176ef04e211b82020fa082b9cb1bdc
|
||||
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 2e216027fc38fabf3e3e49dbc310ecb648ab63d6..2ae4dbd8cc49efb93ecceeb9a7a08e1a8af1d84a 100644
|
||||
index 575329e6fb95a003452592a3e55fa014dd29070c..ad6d25b26454c3ec8c11f54e921df8914c3c62d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -192,7 +192,7 @@ public class Main {
|
||||
@@ -202,7 +202,7 @@ public class Main {
|
||||
}
|
||||
|
||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
@ -78,7 +78,7 @@ index 2e216027fc38fabf3e3e49dbc310ecb648ab63d6..2ae4dbd8cc49efb93ecceeb9a7a08e1a
|
||||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
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
|
||||
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
@ -5,7 +5,7 @@ Subject: [PATCH] Test changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index ce176ef04e211b82020fa082b9cb1bdc4769a526..15456e54d8a392e702a30dfb3d06a3f74156dce7 100644
|
||||
index e9c8ba234bdf28a6f8709b4966367d92a4ac9037..eb5464230b52072eaa7a0e1e47c57a673bab6f53 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -12,6 +12,7 @@ dependencies {
|
||||
@ -15,7 +15,7 @@ index ce176ef04e211b82020fa082b9cb1bdc4769a526..15456e54d8a392e702a30dfb3d06a3f7
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/DummyServer.java b/src/test/java/io/papermc/paper/testing/DummyServer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c6503ff76f56bab5f383f0ca17d137155e9be447
|
||||
@ -119,7 +119,7 @@ index 0000000000000000000000000000000000000000..8dd0df8c2cc25d37a2590a0787268223
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 492c1ec28a9f1facb117d05245b32231554385ad..8013cc99c063d2ca0c578c093e3112676f5361b7 100644
|
||||
index 5b8a8f79776fe4c070b13f3c79df96ecea619df8..883b2061578032affd9cd5629948054ecf52e40d 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.support;
|
@ -14,7 +14,7 @@ public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/Str
|
||||
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 15456e54d8a392e702a30dfb3d06a3f74156dce7..4294f230f91f03db2181d355d3be84bf032eeffb 100644
|
||||
index eb5464230b52072eaa7a0e1e47c57a673bab6f53..ae5c87ed6bde0ef4ad1d5f8164b371d8dd517c67 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,6 +13,7 @@ dependencies {
|
||||
@ -24,7 +24,7 @@ index 15456e54d8a392e702a30dfb3d06a3f74156dce7..4294f230f91f03db2181d355d3be84bf
|
||||
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
||||
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ef41cf3a7d1e6f2bfe81e0fb865d2f969bbc77c1
|
||||
@ -4413,22 +4413,21 @@ index 0000000000000000000000000000000000000000..70cc7b45e7355f6c8476a74a070f1266
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index c1da75eb656d17bac41c1d5c7f57eac217c9996c..b7399e29094c66c88a6f4c0e996a906bcaa3b4ca 100644
|
||||
index 9b93b953f0747078d25289f129f82755089f94c9..aa054369cef3da4f90ce17788dcb9ca80dc98010 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -117,6 +117,11 @@ public class Main {
|
||||
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support
|
||||
|
||||
@@ -131,6 +131,10 @@ public class Main {
|
||||
dedicatedserversettings.forceSave();
|
||||
Path path2 = Paths.get("eula.txt");
|
||||
Eula eula = new Eula(path2);
|
||||
+ // Paper start - load config files for access below if needed
|
||||
+ org.bukkit.configuration.file.YamlConfiguration bukkitConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("bukkit-settings"));
|
||||
+ org.bukkit.configuration.file.YamlConfiguration spigotConfiguration = io.papermc.paper.configuration.PaperConfigurations.loadLegacyConfigFile((File) optionset.valueOf("spigot-settings"));
|
||||
+ // Paper end
|
||||
+
|
||||
Path path1 = Paths.get("eula.txt");
|
||||
Eula eula = new Eula(path1);
|
||||
|
||||
@@ -153,7 +158,7 @@ public class Main {
|
||||
if (optionset.has("initSettings")) { // CraftBukkit
|
||||
// CraftBukkit start - SPIGOT-5761: Create bukkit.yml and commands.yml if not present
|
||||
@@ -165,7 +169,7 @@ public class Main {
|
||||
}
|
||||
|
||||
File file = (File) optionset.valueOf("universe"); // CraftBukkit
|
||||
@ -4438,10 +4437,10 @@ index c1da75eb656d17bac41c1d5c7f57eac217c9996c..b7399e29094c66c88a6f4c0e996a906b
|
||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||
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
|
||||
index 84c1c6c433bad1c786bc7400d65d19cfcaa999e4..870db0028becd6b76af76190fae908d0031ed94d 100644
|
||||
index 3e1460b8331652c2f2e174ee41e3c728b2dbc753..2ed954f1fab3235a1d3fff2dd0d24c3b398b4d67 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -292,6 +292,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;
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
@ -4449,7 +4448,7 @@ index 84c1c6c433bad1c786bc7400d65d19cfcaa999e4..870db0028becd6b76af76190fae908d0
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -383,6 +384,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -385,6 +386,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
@ -4523,23 +4522,23 @@ index 7c35fb22df0bca2c2ca885a872ee42d6073d852f..26fc8127024d7b81ffe5c1c81b8ef8a6
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 16a2efb7dcbcafca867fd75972a0bd80937b95a8..ae219be37c5fcec3dd3f8b08819551003e66d351 100644
|
||||
index 37b2696e69719e44490116e4c4f6ab86c38043ed..ad011c4f328129e2e5eb6b1b1f5e1d282d1ec04a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -230,7 +230,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
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, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
|
||||
+ super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper
|
||||
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
|
||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper
|
||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||
this.convertable = convertable_conversionsession;
|
||||
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
|
||||
index bf6f50cfe5225804ae2cab4f50bcc7ee2ddfe36e..ca5cbd7c43d7e263f76d8719a259514c0748a430 100644
|
||||
index 9a86fedb7ea4932590b86ef96785141489b03528..40deaa2463876659c0579b5273b5249760e8f8c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -152,6 +152,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -156,6 +156,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 boolean populating;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
@ -4552,22 +4551,22 @@ index bf6f50cfe5225804ae2cab4f50bcc7ee2ddfe36e..ca5cbd7c43d7e263f76d8719a259514c
|
||||
|
||||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
@@ -169,8 +175,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -173,8 +179,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator) { // Paper
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
+ this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||
this.generator = gen;
|
||||
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
|
||||
index 9afc0881f6891ef2696b6f2b37c0826f3beb0666..8873bf84c71c48297a360df9c99e511fa0af5b40 100644
|
||||
index ca2d2f44d722d2bf14f50670ac6192830b72c7f0..2cd8fc55056596731b34731a5fdf975f9a9f43ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -885,6 +885,7 @@ public final class CraftServer implements Server {
|
||||
@@ -880,6 +880,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -4576,10 +4575,10 @@ index 9afc0881f6891ef2696b6f2b37c0826f3beb0666..8873bf84c71c48297a360df9c99e511f
|
||||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
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
|
||||
index 2ae4dbd8cc49efb93ecceeb9a7a08e1a8af1d84a..fd213200dcc5fe08f4b28e94ce2a0cf5b3c7ad5b 100644
|
||||
index ad6d25b26454c3ec8c11f54e921df8914c3c62d9..7fc066ee281662192aad826840573e4181f5ceff 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -131,6 +131,19 @@ public class Main {
|
||||
@@ -141,6 +141,19 @@ public class Main {
|
||||
.defaultsTo(new File("spigot.yml"))
|
||||
.describedAs("Yml file");
|
||||
// Spigot End
|
||||
@ -4660,7 +4659,7 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 8013cc99c063d2ca0c578c093e3112676f5361b7..1caa4ce02cd396160f0d9d5461de8290e7c078bb 100644
|
||||
index 883b2061578032affd9cd5629948054ecf52e40d..5226604f2a88e08d94c59d7eb052edea3621c857 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -57,6 +57,7 @@ public abstract class AbstractTestingBase {
|
@ -5,10 +5,10 @@ Subject: [PATCH] MC Dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index d33cce0265a85a23d726742e7752331b63449144..dc7a805d3058244ba13c2268666f274e7ec069dc 100644
|
||||
index c400121d4956014a376760360180e5141013d702..b3e0495e0f242c96d4348438c0257c2045b801e5 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -370,7 +370,7 @@ public class Util {
|
||||
@@ -357,7 +357,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static <K> Hash.Strategy<K> identityStrategy() {
|
||||
@ -18,10 +18,10 @@ index d33cce0265a85a23d726742e7752331b63449144..dc7a805d3058244ba13c2268666f274e
|
||||
|
||||
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index d4c46f44f7a998121482c2fc56d7986881d489d8..6801a3aa5f2f1e9a7a72ff81c09b4944ecb8349d 100644
|
||||
index 77bf6865c6df829c5b5455d440cb2222a0d8f2af..819562d2c938fa05b8e8a00d1ae1f7c1fc9b00d5 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -379,12 +379,12 @@ public class BlockPos extends Vec3i {
|
||||
@@ -370,12 +370,12 @@ public class BlockPos extends Vec3i {
|
||||
if (this.index == l) {
|
||||
return this.endOfData();
|
||||
} else {
|
||||
@ -40,10 +40,10 @@ index d4c46f44f7a998121482c2fc56d7986881d489d8..6801a3aa5f2f1e9a7a72ff81c09b4944
|
||||
}
|
||||
};
|
||||
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
index 3233f69345838af653b4259d2142169930533a69..5b8ecf5b0165ed2cd4397cdee958e97c2e8f18d5 100644
|
||||
index 396d065805853318b0fed98b64b2e1ab0a022e51..a969cd46694ce3094b4a65cf188677d38ae72198 100644
|
||||
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
@@ -305,7 +305,7 @@ public class BuiltInRegistries {
|
||||
@@ -307,7 +307,7 @@ public class BuiltInRegistries {
|
||||
LOADERS.put(resourceLocation, () -> {
|
||||
return initializer.run(registry);
|
||||
});
|
||||
@ -52,38 +52,26 @@ index 3233f69345838af653b4259d2142169930533a69..5b8ecf5b0165ed2cd4397cdee958e97c
|
||||
return registry;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
index 24e864d1cd376e9f94cfa68fd06f96b239eed888..c0fe7c576f2361e599bc23003da7c49bb7cb62b2 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||
@@ -505,7 +505,7 @@ public final class NbtUtils {
|
||||
}
|
||||
|
||||
public static CompoundTag update(DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion) {
|
||||
- return fixer.update(fixTypes.getType(), new Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue();
|
||||
+ return (CompoundTag) fixer.update(fixTypes.getType(), new Dynamic<>(NbtOps.INSTANCE, compound), oldVersion, targetVersion).getValue(); // Paper - decompile fix
|
||||
}
|
||||
|
||||
public static Component toPrettyComponent(Tag element) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
index 2df8fa1ae2dc58291add80fae0599ee4ff5066ee..ed7e1a6fc745df745d5bc79623948bb1015c9252 100644
|
||||
index 9ff8afe750bc469c11c70b2f44c8a78887a8cd00..ea30dad0134644a8ad292a892450404203f3535e 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
@@ -138,8 +138,7 @@ public class ComponentUtils {
|
||||
@@ -138,9 +138,8 @@ public class ComponentUtils {
|
||||
ComponentContents string = text.getContents();
|
||||
if (string instanceof TranslatableContents) {
|
||||
TranslatableContents translatableContents = (TranslatableContents)string;
|
||||
- String string = translatableContents.getKey();
|
||||
- return Language.getInstance().has(string);
|
||||
+ return Language.getInstance().has(translatableContents.getKey()); // Paper - decompile fix
|
||||
String string2 = translatableContents.getFallback();
|
||||
- return string2 != null || Language.getInstance().has(string);
|
||||
+ return string2 != null || Language.getInstance().has(translatableContents.getKey()); // Paper - decompile fix
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/resources/RegistryDataLoader.java b/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
index bc7c6b40ec160d7d449546265b9808e15e587247..178215878c4bbf4ddb24002fcd6d1156a44494ff 100644
|
||||
index 41d6569c00db3d467f6e90d33ebd261529b89f4c..5f051cb22ae77f4d8994b07ac5b963bd0ff05673 100644
|
||||
--- a/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
+++ b/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
@@ -87,7 +87,7 @@ public class RegistryDataLoader {
|
||||
@@ -91,7 +91,7 @@ public class RegistryDataLoader {
|
||||
return new RegistryOps.RegistryInfoLookup() {
|
||||
@Override
|
||||
public <T> Optional<RegistryOps.RegistryInfo<T>> lookup(ResourceKey<? extends Registry<? extends T>> registryRef) {
|
||||
@ -93,10 +81,10 @@ index bc7c6b40ec160d7d449546265b9808e15e587247..178215878c4bbf4ddb24002fcd6d1156
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 870db0028becd6b76af76190fae908d0031ed94d..06b1da8b559f9d545f1593d81de7b25e0a12f176 100644
|
||||
index 2ed954f1fab3235a1d3fff2dd0d24c3b398b4d67..41a6756144a3b826d32ecb85a71d26761e25ec11 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1747,7 +1747,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1775,7 +1775,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
PackRepository resourcepackrepository = this.packRepository;
|
||||
|
||||
Objects.requireNonNull(this.packRepository);
|
||||
@ -132,10 +120,10 @@ index 2dc801061025888192c3bf2c4c38b928c16a0165..ca788f0dcec4a117b410fe8348969e05
|
||||
|
||||
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 02c10fcdad18f7194e804d94449f291d636163a2..2222a8be261142dd7a42170ad3fe314eeea1deb5 100644
|
||||
index 37a01cd6f616cac741d50066aaba21911a1ed3bb..36222d2140aa1151c30e095afc557ea7db91911f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -147,7 +147,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@@ -150,7 +150,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@Override
|
||||
protected void customServerAiStep() {
|
||||
this.level.getProfiler().push("camelBrain");
|
||||
@ -145,10 +133,10 @@ index 02c10fcdad18f7194e804d94449f291d636163a2..2222a8be261142dd7a42170ad3fe314e
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("camelActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index 471b9258320ba0002d741267144c80c149f5f34c..8852cc6253c8bc1a9f7591cd2b0beb95bb4f4d33 100644
|
||||
index 872243700e982c97c8ef491684a447afc7a24bdf..c12b8831deb54deb191908ba8a769d4c78825d5b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -106,7 +106,7 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -104,7 +104,7 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
|
||||
@Override
|
||||
public Brain<Frog> getBrain() {
|
||||
@ -171,7 +159,7 @@ index 64314cf4dc53a1a0a5f676fa00503858e0120dfa..45741410a13cffe3419e34b5607b048b
|
||||
|
||||
@Override
|
||||
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 d025df087e7b87fbc89a722226f2f2263c54ac47..2f712bfc1f717ba410bf34669d7b0a919ca218cc 100644
|
||||
index 4d2d23ff118e9307d50ca2a5194b83450c91a752..ab6dc3449a1d3b7acf1d7bf5ac1c24224cc252c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||
@@ -78,7 +78,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
||||
@ -184,7 +172,7 @@ index d025df087e7b87fbc89a722226f2f2263c54ac47..2f712bfc1f717ba410bf34669d7b0a91
|
||||
this.byName = Maps.newHashMap(builder.build()); // CraftBukkit
|
||||
RecipeManager.LOGGER.info("Loaded {} recipes", map1.size());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 7798cbbae6b72d64e6129cebf1f66696f21e15f9..240c19f4a7552a01b3c48f1f6413119e4cfc2b67 100644
|
||||
index b445f90b70d5a74f5bdc1b081500da4742e1c093..afba733824d84d650e669eda028bf4d28cf006b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -56,7 +56,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
@ -17,7 +17,7 @@ Subject: [PATCH] CB fixes
|
||||
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
|
||||
index ae219be37c5fcec3dd3f8b08819551003e66d351..8309eb14140ebcf62ae7be1dfa0177ac7fcf83d7 100644
|
||||
index ad011c4f328129e2e5eb6b1b1f5e1d282d1ec04a..3bcbdf37ad9d76ec97ad3f20e7a683e267441ed9 100644
|
||||
--- a/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 {
|
||||
@ -30,25 +30,25 @@ index ae219be37c5fcec3dd3f8b08819551003e66d351..8309eb14140ebcf62ae7be1dfa0177ac
|
||||
if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
|
||||
this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Marker.java b/src/main/java/net/minecraft/world/entity/Marker.java
|
||||
index d9f07a311ec5a253bdfb681414e1f8033a576a23..6f110ece5686d1fc73b93fb9e0a73f2c1bcf4586 100644
|
||||
index 15ec0d085d09d9a70eb6cdd47f9e4587dd1402b5..9cd0f0628a3f533229d25d9ccd0d381364f4957c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Marker.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Marker.java
|
||||
@@ -39,8 +39,9 @@ public class Marker extends Entity {
|
||||
@@ -49,8 +49,8 @@ public class Marker extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
- protected void addPassenger(Entity passenger) {
|
||||
+ protected boolean addPassenger(Entity passenger) { // Paper - fix upstream
|
||||
passenger.stopRiding();
|
||||
+ return false; // Paper - fix upstream
|
||||
- throw new IllegalStateException("Should never addPassenger without checking couldAcceptPassenger()");
|
||||
+ protected boolean addPassenger(Entity passenger) { // Paper - fix return type
|
||||
+ return false; // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 2222a8be261142dd7a42170ad3fe314eeea1deb5..136da73e372b59f37665743c70833e815cd0070b 100644
|
||||
index 36222d2140aa1151c30e095afc557ea7db91911f..9d4a3041ecae2adda40134710eb1edb8571228aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -421,9 +421,9 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
@@ -441,9 +441,9 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,10 +61,10 @@ index 2222a8be261142dd7a42170ad3fe314eeea1deb5..136da73e372b59f37665743c70833e81
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
index 99af167b02c1291f9f5fd1a195a3eb65de87002b..874f7ea643d27eec47d51a10ad472af7e8ec402e 100644
|
||||
index 161ad6ab1443b2ce33a2d7d91d189c855db0453b..15a9736a870055d639d03063c7cf67fd769fff36 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
@@ -44,7 +44,7 @@ public class StructureCheck {
|
||||
@@ -43,7 +43,7 @@ public class StructureCheck {
|
||||
private final Registry<Biome> biomes;
|
||||
private final Registry<Structure> structureConfigs;
|
||||
private final StructureTemplateManager structureTemplateManager;
|
||||
@ -73,7 +73,7 @@ index 99af167b02c1291f9f5fd1a195a3eb65de87002b..874f7ea643d27eec47d51a10ad472af7
|
||||
private final ChunkGenerator chunkGenerator;
|
||||
private final RandomState randomState;
|
||||
private final LevelHeightAccessor heightAccessor;
|
||||
@@ -54,7 +54,7 @@ public class StructureCheck {
|
||||
@@ -53,7 +53,7 @@ public class StructureCheck {
|
||||
private final Long2ObjectMap<Object2IntMap<Structure>> loadedChunks = new Long2ObjectOpenHashMap<>();
|
||||
private final Map<Structure, Long2BooleanMap> featureChecks = new HashMap<>();
|
||||
|
||||
@ -83,10 +83,10 @@ index 99af167b02c1291f9f5fd1a195a3eb65de87002b..874f7ea643d27eec47d51a10ad472af7
|
||||
this.registryAccess = registryManager;
|
||||
this.structureTemplateManager = structureTemplateManager;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8873bf84c71c48297a360df9c99e511fa0af5b40..f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0 100644
|
||||
index 2cd8fc55056596731b34731a5fdf975f9a9f43ce..059ba63319f6ca04750a7d6b095e6179cae68b4f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2305,7 +2305,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2303,7 +2303,13 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(key, "NamespacedKey cannot be null");
|
||||
|
||||
LootTables registry = this.getServer().getLootTables();
|
@ -5434,7 +5434,7 @@ index 0000000000000000000000000000000000000000..808d1449ac44ae86a650932365081fba
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index dc7a805d3058244ba13c2268666f274e7ec069dc..4423140df56e64527db470ada17a117656b93114 100644
|
||||
index b3e0495e0f242c96d4348438c0257c2045b801e5..c5fb6adb353538360ef420faee41565626eea1dc 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -116,7 +116,7 @@ public class Util {
|
||||
@ -5446,11 +5446,27 @@ index dc7a805d3058244ba13c2268666f274e7ec069dc..4423140df56e64527db470ada17a1176
|
||||
}
|
||||
|
||||
public static long getEpochMillis() {
|
||||
diff --git a/src/main/java/net/minecraft/WorldVersion.java b/src/main/java/net/minecraft/WorldVersion.java
|
||||
index 1357d732b0ee6ef923e537aad28d4ef6af18ab50..a3c526b6478508e3faa759c2e03e14c13a98e15b 100644
|
||||
--- a/src/main/java/net/minecraft/WorldVersion.java
|
||||
+++ b/src/main/java/net/minecraft/WorldVersion.java
|
||||
@@ -6,6 +6,11 @@ import net.minecraft.world.level.storage.DataVersion;
|
||||
|
||||
public interface WorldVersion {
|
||||
DataVersion getDataVersion();
|
||||
+ // Paper start
|
||||
+ default int getWorldVersion() {
|
||||
+ return this.getDataVersion().getVersion();
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
String getId();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 6801a3aa5f2f1e9a7a72ff81c09b4944ecb8349d..a72dfbfa2aa636ac8bac07a62777126cf2696241 100644
|
||||
index 819562d2c938fa05b8e8a00d1ae1f7c1fc9b00d5..4dffce4dc3434ef6adef7dc3cfac867ad89d9a5d 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -535,6 +535,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -521,6 +521,7 @@ public class BlockPos extends Vec3i {
|
||||
}
|
||||
}
|
||||
|
||||
@ -5458,7 +5474,7 @@ index 6801a3aa5f2f1e9a7a72ff81c09b4944ecb8349d..a72dfbfa2aa636ac8bac07a62777126c
|
||||
@Override
|
||||
public BlockPos.MutableBlockPos setX(int i) {
|
||||
super.setX(i);
|
||||
@@ -552,6 +553,7 @@ public class BlockPos extends Vec3i {
|
||||
@@ -538,6 +539,7 @@ public class BlockPos extends Vec3i {
|
||||
super.setZ(i);
|
||||
return this;
|
||||
}
|
||||
@ -5467,10 +5483,10 @@ index 6801a3aa5f2f1e9a7a72ff81c09b4944ecb8349d..a72dfbfa2aa636ac8bac07a62777126c
|
||||
@Override
|
||||
public BlockPos immutable() {
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 5b111f4543c327169d1c327c873d728009fe3a11..ca7d1d33cfd448673365b615b8609083dcb11da4 100644
|
||||
index 29664f7f44ad7dec9cbccd276a14937ca1c4a3bb..64765dab6fed87ffdf4af197d8d5f28a04544db0 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -121,7 +121,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -123,7 +123,7 @@ public class CompoundTag implements Tag {
|
||||
return "TAG_Compound";
|
||||
}
|
||||
};
|
||||
@ -5479,7 +5495,7 @@ index 5b111f4543c327169d1c327c873d728009fe3a11..ca7d1d33cfd448673365b615b8609083
|
||||
|
||||
protected CompoundTag(Map<String, Tag> entries) {
|
||||
this.tags = entries;
|
||||
@@ -197,6 +197,10 @@ public class CompoundTag implements Tag {
|
||||
@@ -199,6 +199,10 @@ public class CompoundTag implements Tag {
|
||||
this.tags.put(key, NbtUtils.createUUID(value));
|
||||
}
|
||||
|
||||
@ -5491,23 +5507,23 @@ index 5b111f4543c327169d1c327c873d728009fe3a11..ca7d1d33cfd448673365b615b8609083
|
||||
return NbtUtils.loadUUID(this.get(key));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index 207f1c1fc9d4451d27047bb8362bded8cd53e32f..021a26a6b1c258deffc26c035ab52a4ea027d9a1 100644
|
||||
index e6c4379b0fd7c1338e1713281cd9515cb54acecb..a63e7ee5c42bd51312155feab31c6ec4232e1bc7 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -45,7 +45,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
JvmProfiler.INSTANCE.onPacketSent(k, integer, channelHandlerContext.channel().remoteAddress(), j);
|
||||
JvmProfiler.INSTANCE.onPacketSent(l, i, channelHandlerContext.channel().remoteAddress(), k);
|
||||
}
|
||||
} catch (Throwable var10) {
|
||||
- LOGGER.error("Error receiving packet {}", integer, var10);
|
||||
+ LOGGER.error("Packet encoding of packet ID {} threw (skippable? {})", integer, packet.isSkippable(), var10); // Paper - Give proper error message
|
||||
- LOGGER.error("Error receiving packet {}", i, var10);
|
||||
+ LOGGER.error("Packet encoding of packet ID {} threw (skippable? {})", i, packet.isSkippable(), var10); // Paper - Give proper error message
|
||||
if (packet.isSkippable()) {
|
||||
throw new SkipPacketException(var10);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 06b1da8b559f9d545f1593d81de7b25e0a12f176..0f7dd33d51281b383be0fb47d4e6b133f123ce1f 100644
|
||||
index 41a6756144a3b826d32ecb85a71d26761e25ec11..5725631835ea68802c75934cd85d5c1b1a78d358 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -293,6 +293,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 ];
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@ -5515,7 +5531,7 @@ index 06b1da8b559f9d545f1593d81de7b25e0a12f176..0f7dd33d51281b383be0fb47d4e6b133
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@@ -929,6 +930,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -931,6 +932,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
||||
}
|
||||
// Spigot start
|
||||
@ -5533,16 +5549,16 @@ index 06b1da8b559f9d545f1593d81de7b25e0a12f176..0f7dd33d51281b383be0fb47d4e6b133
|
||||
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
|
||||
{
|
||||
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
|
||||
@@ -1230,7 +1235,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1212,7 +1217,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.debug("Autosave finished");
|
||||
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
|
||||
}
|
||||
-
|
||||
+ io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1292,6 +1297,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1302,6 +1307,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
worldserver.timings.doTick.startTiming(); // Spigot
|
||||
worldserver.tick(shouldKeepTicking);
|
||||
@ -5555,7 +5571,7 @@ index 06b1da8b559f9d545f1593d81de7b25e0a12f176..0f7dd33d51281b383be0fb47d4e6b133
|
||||
} catch (Throwable throwable) {
|
||||
// Spigot Start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index f902b1f7062fc2c81e0ce43e8b8599192469e57c..74d1ae0104e8d0795df50f00317fd860de4f112e 100644
|
||||
index 68583e2f293e6e4d2f9f3345b6cf1ea050a210b6..941ca1b44c7cac656bdd76c7095887b1c3570aec 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -52,9 +52,9 @@ public class ChunkHolder {
|
||||
@ -5798,10 +5814,10 @@ index f902b1f7062fc2c81e0ce43e8b8599192469e57c..74d1ae0104e8d0795df50f00317fd860
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899a7505a60 100644
|
||||
index 9fe2d44fbfb648c342daf0b8f0820090785b8bf7..714b36e4942fda9d6c8a202b9e7a34ef67d3d13c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -65,6 +65,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
@@ -68,6 +68,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket;
|
||||
import net.minecraft.network.protocol.game.DebugPackets;
|
||||
@ -5809,7 +5825,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||
import net.minecraft.server.network.ServerPlayerConnection;
|
||||
import net.minecraft.util.CsvOutput;
|
||||
@@ -173,6 +174,56 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -176,6 +177,56 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
};
|
||||
// CraftBukkit end
|
||||
|
||||
@ -5866,7 +5882,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
|
||||
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||
this.visibleChunkMap = this.updatingChunkMap.clone();
|
||||
@@ -226,6 +277,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -229,6 +280,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.overworldDataStorage = persistentStateManagerFactory;
|
||||
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
|
||||
this.setViewDistance(viewDistance);
|
||||
@ -5877,7 +5893,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
protected ChunkGenerator generator() {
|
||||
@@ -323,6 +378,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -326,6 +381,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
@ -5892,7 +5908,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkPos centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
|
||||
List<CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>>> list = new ArrayList();
|
||||
List<ChunkHolder> list1 = new ArrayList();
|
||||
@@ -410,9 +473,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -413,9 +476,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
};
|
||||
|
||||
stringbuilder.append("Updating:").append(System.lineSeparator());
|
||||
@ -5904,7 +5920,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading");
|
||||
|
||||
@@ -454,8 +517,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -457,8 +520,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
holder.setTicketLevel(level);
|
||||
} else {
|
||||
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
|
||||
@ -5919,7 +5935,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
this.updatingChunkMap.put(pos, holder);
|
||||
this.modified = true;
|
||||
}
|
||||
@@ -477,7 +546,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -480,7 +549,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
protected void saveAllChunks(boolean flush) {
|
||||
if (flush) {
|
||||
@ -5928,7 +5944,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
MutableBoolean mutableboolean = new MutableBoolean();
|
||||
|
||||
do {
|
||||
@@ -506,7 +575,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -509,7 +578,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
});
|
||||
this.flushWorker();
|
||||
} else {
|
||||
@ -5937,7 +5953,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
}
|
||||
@@ -525,7 +594,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -528,7 +597,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public boolean hasWork() {
|
||||
@ -5946,7 +5962,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
private void processUnloads(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -536,6 +605,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -539,6 +608,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
|
||||
|
||||
if (playerchunk != null) {
|
||||
@ -5954,7 +5970,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
this.pendingUnloads.put(j, playerchunk);
|
||||
this.modified = true;
|
||||
++i;
|
||||
@@ -553,7 +623,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -556,7 +626,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
int l = 0;
|
||||
@ -5963,7 +5979,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
|
||||
while (l < 20 && shouldKeepTicking.getAsBoolean() && objectiterator.hasNext()) {
|
||||
if (this.saveChunkIfNeeded((ChunkHolder) objectiterator.next())) {
|
||||
@@ -571,7 +641,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -574,7 +644,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (completablefuture1 != completablefuture) {
|
||||
this.scheduleUnload(pos, holder);
|
||||
} else {
|
||||
@ -5976,7 +5992,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
if (ichunkaccess instanceof LevelChunk) {
|
||||
((LevelChunk) ichunkaccess).setLoaded(false);
|
||||
}
|
||||
@@ -587,7 +661,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -590,7 +664,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.lightEngine.tryScheduleUpdate();
|
||||
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
|
||||
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
|
||||
@ -5987,7 +6003,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
|
||||
}
|
||||
};
|
||||
@@ -968,7 +1044,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -971,7 +1047,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
this.viewDistance = j;
|
||||
this.distanceManager.updatePlayerTickets(this.viewDistance + 1);
|
||||
@ -5996,7 +6012,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
ChunkHolder playerchunk = (ChunkHolder) objectiterator.next();
|
||||
@@ -1011,7 +1087,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1014,7 +1090,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public int size() {
|
||||
@ -6005,7 +6021,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
public DistanceManager getDistanceManager() {
|
||||
@@ -1019,19 +1095,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1022,19 +1098,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
protected Iterable<ChunkHolder> getChunks() {
|
||||
@ -6030,7 +6046,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
Optional<ChunkAccess> optional = Optional.ofNullable(playerchunk.getLastAvailable());
|
||||
Optional<LevelChunk> optional1 = optional.flatMap((ichunkaccess) -> {
|
||||
return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
|
||||
@@ -1157,6 +1233,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1160,6 +1236,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (!flag1) {
|
||||
this.distanceManager.addPlayer(SectionPos.of((EntityAccess) player), player);
|
||||
}
|
||||
@ -6038,7 +6054,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
} else {
|
||||
SectionPos sectionposition = player.getLastSectionPos();
|
||||
|
||||
@@ -1164,6 +1241,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1167,6 +1244,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
if (!flag2) {
|
||||
this.distanceManager.removePlayer(sectionposition, player);
|
||||
}
|
||||
@ -6046,7 +6062,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
for (int k = i - this.viewDistance - 1; k <= i + this.viewDistance + 1; ++k) {
|
||||
@@ -1276,6 +1354,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1279,6 +1357,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
@ -6055,7 +6071,7 @@ index 01438ee9ad7a64ac4fd124d97029f87b49c25d5d..ae69c14943bd93ca948789ad4d4da899
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1502,7 +1582,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1515,7 +1595,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private class ChunkDistanceManager extends DistanceManager {
|
||||
|
||||
protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
|
||||
@ -6417,10 +6433,10 @@ index b323b8329f534b7020dd595b8b15197c29939590..794ad2dbaea2555d4557124e9d942d3e
|
||||
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
|
||||
index 8309eb14140ebcf62ae7be1dfa0177ac7fcf83d7..8784b0702f10eb7582c309c15f18fe13eebd9c8e 100644
|
||||
index 3bcbdf37ad9d76ec97ad3f20e7a683e267441ed9..aa164a81d072d9390fa1400120e801979e5d74d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -171,6 +171,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
@@ -173,6 +173,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
import org.bukkit.event.world.GenericGameEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
// CraftBukkit end
|
||||
@ -6428,7 +6444,7 @@ index 8309eb14140ebcf62ae7be1dfa0177ac7fcf83d7..8784b0702f10eb7582c309c15f18fe13
|
||||
|
||||
public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@@ -226,6 +227,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -224,6 +225,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return convertable.dimensionType;
|
||||
}
|
||||
|
||||
@ -6526,12 +6542,12 @@ index 8309eb14140ebcf62ae7be1dfa0177ac7fcf83d7..8784b0702f10eb7582c309c15f18fe13
|
||||
+
|
||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||
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, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
// Holder holder = worlddimension.type(); // 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
|
||||
index 33fb63cbb0b115d41a1f9c24a1df328a86d5cb7d..39f60f3878b57feeb6c2645a8ed4432fb53a0269 100644
|
||||
index 16ad728a5fd201875c56b27dcedeb19e06d2ea7a..7efd4be91e6ff0abf087bf4d322fd6ac694b7010 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -247,6 +247,8 @@ public class ServerPlayer extends Player {
|
||||
@@ -252,6 +252,8 @@ public class ServerPlayer extends Player {
|
||||
public Integer clientViewDistance;
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
@ -6540,8 +6556,8 @@ index 33fb63cbb0b115d41a1f9c24a1df328a86d5cb7d..39f60f3878b57feeb6c2645a8ed4432f
|
||||
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
|
||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||
@@ -312,6 +314,8 @@ public class ServerPlayer extends Player {
|
||||
this.maxUpStep = 1.0F;
|
||||
@@ -317,6 +319,8 @@ public class ServerPlayer extends Player {
|
||||
this.setMaxUpStep(1.0F);
|
||||
this.fudgeSpawnLocation(world);
|
||||
|
||||
+ this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
|
||||
@ -6593,10 +6609,10 @@ index a63d5ba706a5b8e430aedc045bdeb3a410bd0eef..e96a0ca47e4701ba187555bd92c96834
|
||||
public BlockState getBlockState(BlockPos 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
|
||||
index 029d0197863a6975a7b42132bd0b734025299a8f..25227822aa0e1dd7fbbe98a0925ccd023af8d0dc 100644
|
||||
index b001044f221b04d185522932b8e3b7591afac3db..6529064505dc3de875be1764f88897736b85975d 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -181,6 +181,7 @@ public abstract class PlayerList {
|
||||
@@ -182,6 +182,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player) {
|
||||
@ -6623,10 +6639,10 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
|
||||
@Override
|
||||
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
|
||||
index df88a36981524654fb2905782b4b1337ea261a03..742897a534dac2bbbacaca0f6c8196e8d2bc03dd 100644
|
||||
index 78ab0d82e3b425ae561e838d7827ed0ae14fa1d2..35125c029abbdab4c7043842b6042ea44b00a2c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -315,6 +315,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -318,6 +318,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -6639,10 +6655,10 @@ index df88a36981524654fb2905782b4b1337ea261a03..742897a534dac2bbbacaca0f6c8196e8
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
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
|
||||
index 087cd12b08732a4c62ac4be417b17b1db830097a..f29b109fdef494927f5f894ac962c50c33b1f0b6 100644
|
||||
index c0859f1ded9679e59b19313352fa474742653255..592e41884ffda0075ec16e5538d5004efeb80f78 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -256,6 +256,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
public boolean collides = true;
|
||||
public Set<UUID> collidableExemptions = new HashSet<>();
|
||||
public boolean bukkitPickUpLoot;
|
||||
@ -6651,10 +6667,10 @@ index 087cd12b08732a4c62ac4be417b17b1db830097a..f29b109fdef494927f5f894ac962c50c
|
||||
@Override
|
||||
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
|
||||
index ffac9a8678989decc276b0fa42e87da1d97d3666..10949455cc92ed6cb537fd7f148714c7ade4e360 100644
|
||||
index 1afd00e39bc5423d8bcce37a2caa4d6401c5b5e7..a290487b153a66a3e936ed1183f3c2ce343e59b1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -242,6 +242,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -272,6 +272,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
@ -6688,10 +6704,10 @@ index a0b5895abc88d297045e05f25bb09527991d43f0..6e0bd0eab0b06a4ac3042496bbb91292
|
||||
super(type, world);
|
||||
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
|
||||
index 6439fcbbd31158ce7a8ccf191b47d95911c8c3c2..cf810a1d645dd63595702a5f07456cd48393ee79 100644
|
||||
index 4a63213a3131af3381769c4adc2735def311a681..83af6f1af55ab9b0b7ad6f635e24b7c4d1d1829b 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -759,6 +759,25 @@ public final class ItemStack {
|
||||
@@ -773,6 +773,25 @@ public final class ItemStack {
|
||||
return this.tag != null ? this.tag.getList("Enchantments", 10) : new ListTag();
|
||||
}
|
||||
|
||||
@ -6717,7 +6733,7 @@ index 6439fcbbd31158ce7a8ccf191b47d95911c8c3c2..cf810a1d645dd63595702a5f07456cd4
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
@@ -1145,6 +1164,7 @@ public final class ItemStack {
|
||||
@@ -1163,6 +1182,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void setItem(Item item) {
|
||||
@ -6726,7 +6742,7 @@ index 6439fcbbd31158ce7a8ccf191b47d95911c8c3c2..cf810a1d645dd63595702a5f07456cd4
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
index 76251b5adf41f8e5bf2c07145abe3108fcde8669..8a979600b49e8a11982577fb6dd79503e2521a0f 100644
|
||||
index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..42e05380a875c52cd6e1cb337958b431a751698b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
@@ -9,10 +9,12 @@ import javax.annotation.Nullable;
|
||||
@ -6831,10 +6847,10 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
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
|
||||
index ca5cbd7c43d7e263f76d8719a259514c0748a430..a0bd6c4df76fac867e1862273ce31dbe067de624 100644
|
||||
index 40deaa2463876659c0579b5273b5249760e8f8c0..e4ebdf81b7907e1054c356091ebcd35264b015f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -88,6 +88,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
@@ -90,6 +90,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||
@ -6842,7 +6858,7 @@ index ca5cbd7c43d7e263f76d8719a259514c0748a430..a0bd6c4df76fac867e1862273ce31dbe
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.util.CraftSpawnCategory;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
@@ -287,18 +288,52 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -293,18 +294,52 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return y < -20000000 || y >= 20000000;
|
||||
}
|
||||
|
||||
@ -6899,7 +6915,7 @@ index ca5cbd7c43d7e263f76d8719a259514c0748a430..a0bd6c4df76fac867e1862273ce31dbe
|
||||
ChunkAccess ichunkaccess = this.getChunkSource().getChunk(chunkX, chunkZ, leastStatus, create);
|
||||
|
||||
if (ichunkaccess == null && create) {
|
||||
@@ -309,7 +344,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -315,7 +350,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -6908,7 +6924,7 @@ index ca5cbd7c43d7e263f76d8719a259514c0748a430..a0bd6c4df76fac867e1862273ce31dbe
|
||||
return this.setBlock(pos, state, flags, 512);
|
||||
}
|
||||
|
||||
@@ -553,7 +588,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -559,7 +594,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
if (this.isOutsideBuildHeight(pos)) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
} else {
|
||||
@ -6982,10 +6998,10 @@ index 249b3ed33672a9a9529bd14de978722b62019314..0f1025495237aebe30132ace0832aa57
|
||||
public WorldBorder 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
|
||||
index ec86c786f793da00fdcee7b72f989068cbd750e4..aa2f76ff47699f23474f2e409ef9b773e48d50b8 100644
|
||||
index 9d753d0cf25150ea0e5972c657320ac8af864c57..2cb3463f3d77a32ada67a6251707d741d18910ca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -686,14 +686,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -711,14 +711,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
|
||||
public abstract static class BlockStateBase extends StateHolder<Block, BlockState> {
|
||||
|
||||
@ -7003,7 +7019,7 @@ index ec86c786f793da00fdcee7b72f989068cbd750e4..aa2f76ff47699f23474f2e409ef9b773
|
||||
private final BlockBehaviour.StatePredicate isRedstoneConductor;
|
||||
private final BlockBehaviour.StatePredicate isSuffocating;
|
||||
private final BlockBehaviour.StatePredicate isViewBlocking;
|
||||
@@ -728,12 +728,20 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -753,12 +753,20 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
|
||||
}
|
||||
|
||||
@ -7024,7 +7040,7 @@ index ec86c786f793da00fdcee7b72f989068cbd750e4..aa2f76ff47699f23474f2e409ef9b773
|
||||
|
||||
}
|
||||
|
||||
@@ -769,8 +777,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -794,8 +802,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return this.getBlock().getOcclusionShape(this.asState(), world, pos);
|
||||
}
|
||||
|
||||
@ -7059,7 +7075,7 @@ index db6a64ae4437b76c39e7ddb02adbea27c95fde78..3fdbb777d4722596cc4df79b2d4d7b9c
|
||||
this.levelHeightAccessor = heightLimitView;
|
||||
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 51032b7ba79693882b64ef0fea095a7e94d215c1..272203f71dc9bb525a91f835fd73ca1d03aa982e 100644
|
||||
index 802a927de07b5ebcdd41bf3dc75c53eca582f1df..0307083079c0a257ecb82b8cb4fb8f91af3816bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.nbt.CompoundTag;
|
||||
@ -7303,7 +7319,7 @@ index f66369ddaeab5c5ac643c0979dac3ed21337ff71..038abf2ac104ceecaab11b10d466ea69
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index dc8f094dea2fd46fe4d860536908a42e4b5806a1..57ed87689c7cb709d54e611bfbdbb70890021df2 100644
|
||||
index b685b6064a32884e5617f2debb7ea10159d9ce0d..3b9e42adb657d0feb99de4b55dc0c628e9cd5afd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -233,8 +233,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -7360,10 +7376,10 @@ index dc8f094dea2fd46fe4d860536908a42e4b5806a1..57ed87689c7cb709d54e611bfbdbb708
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index c3cad46ce064c9581e68db17495dabe2dc2ca161..5f6d4f553cab8f20c2049c706e69de3d79701dfd 100644
|
||||
index e24609bb51369c08a68120830ead33706b17dafa..f4cdda9fabb3a13f7cc8b6056815bdbae704db9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1147,4 +1147,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1182,4 +1182,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -7624,7 +7640,7 @@ 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
|
||||
index 7f71bac4667235910ecbd8954514a95e92603594..21ca79fa628d9cc970942bcd5368d971d800753a 100644
|
||||
index 1d41e9d1682df8fa000a36eab5196dcca810c769..eff182a54cbb84693d6cad96b51f743b08049b43 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -102,8 +102,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -1538,10 +1538,10 @@ index ca5d08eb4115817f846b312fe35f4ab28a099401..f25b9330e068c7d9e12cb57a7761cfef
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
index 19edd15fb0aef1597692888cd7649d6aed356dd9..e5ef4acbc74f3ef50ed8e162d3b2a7ae881a4b7a 100644
|
||||
index 5fb11741ca75b06322de00624353687c28df81a2..9020bc6d9ff6bc0c9b3f00470813f3258554cf45 100644
|
||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
@@ -17,6 +17,7 @@ import io.netty.handler.codec.EncoderException;
|
||||
@@ -22,6 +22,7 @@ import io.netty.handler.codec.EncoderException;
|
||||
import io.netty.util.ByteProcessor;
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList;
|
||||
import it.unimi.dsi.fastutil.ints.IntList;
|
||||
@ -1549,7 +1549,7 @@ index 19edd15fb0aef1597692888cd7649d6aed356dd9..e5ef4acbc74f3ef50ed8e162d3b2a7ae
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -81,6 +82,7 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
@@ -89,6 +90,7 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
private static final int MAX_VARLONG_SIZE = 10;
|
||||
public static final int DEFAULT_NBT_QUOTA = 2097152;
|
||||
private final ByteBuf source;
|
||||
@ -1557,7 +1557,7 @@ index 19edd15fb0aef1597692888cd7649d6aed356dd9..e5ef4acbc74f3ef50ed8e162d3b2a7ae
|
||||
public static final short MAX_STRING_LENGTH = 32767;
|
||||
public static final int MAX_COMPONENT_STRING_LENGTH = 262144;
|
||||
private static final int PUBLIC_KEY_SIZE = 256;
|
||||
@@ -495,8 +497,15 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
@@ -542,8 +544,15 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1575,7 +1575,7 @@ index 19edd15fb0aef1597692888cd7649d6aed356dd9..e5ef4acbc74f3ef50ed8e162d3b2a7ae
|
||||
|
||||
public <T extends Enum<T>> T readEnum(Class<T> enumClass) {
|
||||
diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
index 021a26a6b1c258deffc26c035ab52a4ea027d9a1..00d432bd395e7f7fb6ee24e371818d13892b2f0c 100644
|
||||
index a63e7ee5c42bd51312155feab31c6ec4232e1bc7..42828edf81bd475b673a9d143f79c0d0711f14f5 100644
|
||||
--- a/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/network/PacketEncoder.java
|
||||
@@ -4,6 +4,7 @@ import com.mojang.logging.LogUtils;
|
||||
@ -1589,11 +1589,11 @@ index 021a26a6b1c258deffc26c035ab52a4ea027d9a1..00d432bd395e7f7fb6ee24e371818d13
|
||||
@@ -33,6 +34,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
} else {
|
||||
FriendlyByteBuf friendlyByteBuf = new FriendlyByteBuf(byteBuf);
|
||||
friendlyByteBuf.writeVarInt(integer);
|
||||
friendlyByteBuf.writeVarInt(i);
|
||||
+ friendlyByteBuf.adventure$locale = channelHandlerContext.channel().attr(PaperAdventure.LOCALE_ATTRIBUTE).get(); // Paper
|
||||
|
||||
try {
|
||||
int i = friendlyByteBuf.writerIndex();
|
||||
int j = friendlyByteBuf.writerIndex();
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/ChatDecorator.java b/src/main/java/net/minecraft/network/chat/ChatDecorator.java
|
||||
index 825ab7534f1ad9787ae2a6c2bf9a300f52cbfc95..53be8a43d784db5e8450c242adeb06f3fab2717a 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/ChatDecorator.java
|
||||
@ -1664,7 +1664,7 @@ index 825ab7534f1ad9787ae2a6c2bf9a300f52cbfc95..53be8a43d784db5e8450c242adeb06f3
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/Component.java b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
index 7391724921b1eed6fc773b64764a29a949fcb07e..3ca733528acb40354b308019a84436ea67e05751 100644
|
||||
index 8f5e07047f88138422ae82143a80427be869a760..37fc353c3e59dd5af2fd6c58ac084fb0e6e155d7 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/Component.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/Component.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -1675,7 +1675,7 @@ index 7391724921b1eed6fc773b64764a29a949fcb07e..3ca733528acb40354b308019a84436ea
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
@@ -216,6 +217,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
@@ -224,6 +225,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
GsonBuilder gsonbuilder = new GsonBuilder();
|
||||
|
||||
gsonbuilder.disableHtmlEscaping();
|
||||
@ -1683,7 +1683,7 @@ index 7391724921b1eed6fc773b64764a29a949fcb07e..3ca733528acb40354b308019a84436ea
|
||||
gsonbuilder.registerTypeHierarchyAdapter(Component.class, new Component.Serializer());
|
||||
gsonbuilder.registerTypeHierarchyAdapter(Style.class, new Style.Serializer());
|
||||
gsonbuilder.registerTypeAdapterFactory(new LowerCaseEnumTypeAdapterFactory());
|
||||
@@ -391,6 +393,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
@@ -401,6 +403,7 @@ public interface Component extends Message, FormattedText, Iterable<Component> {
|
||||
}
|
||||
|
||||
public JsonElement serialize(Component ichatbasecomponent, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
@ -1692,7 +1692,7 @@ index 7391724921b1eed6fc773b64764a29a949fcb07e..3ca733528acb40354b308019a84436ea
|
||||
|
||||
if (!ichatbasecomponent.getStyle().isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/ComponentUtils.java b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
index ed7e1a6fc745df745d5bc79623948bb1015c9252..9d0d5a44c5948bde037165147d18aaabe21ce50a 100644
|
||||
index ea30dad0134644a8ad292a892450404203f3535e..584a58659fae6ba3d8b53858890bc6ec509ffb0e 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/ComponentUtils.java
|
||||
@@ -42,6 +42,11 @@ public class ComponentUtils {
|
||||
@ -1991,10 +1991,10 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
|
||||
buf.writeComponent(this.footer);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/resources/RegistryDataLoader.java b/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
index 178215878c4bbf4ddb24002fcd6d1156a44494ff..f6cfb0033da9ff9430e1a67a791fb822ac62b224 100644
|
||||
index 5f051cb22ae77f4d8994b07ac5b963bd0ff05673..7952635a963e28cb670c8f4869664103c7ebfefb 100644
|
||||
--- a/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
+++ b/src/main/java/net/minecraft/resources/RegistryDataLoader.java
|
||||
@@ -57,6 +57,11 @@ public class RegistryDataLoader {
|
||||
@@ -61,6 +61,11 @@ public class RegistryDataLoader {
|
||||
RegistryOps.RegistryInfoLookup registryInfoLookup = createContext(baseRegistryManager, list);
|
||||
list.forEach((loader) -> {
|
||||
loader.getSecond().load(resourceManager, registryInfoLookup);
|
||||
@ -2007,10 +2007,10 @@ index 178215878c4bbf4ddb24002fcd6d1156a44494ff..f6cfb0033da9ff9430e1a67a791fb822
|
||||
list.forEach((loader) -> {
|
||||
Registry<?> registry = loader.getFirst();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c654d42a4 100644
|
||||
index 5725631835ea68802c75934cd85d5c1b1a78d358..47ec7832579c2f5d473301e7127cae47da630c03 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -241,6 +241,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -244,6 +244,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private boolean allowFlight;
|
||||
@Nullable
|
||||
private String motd;
|
||||
@ -2018,7 +2018,7 @@ index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c
|
||||
private int playerIdleTimeout;
|
||||
public final long[] tickTimes;
|
||||
@Nullable
|
||||
@@ -1604,8 +1605,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1631,8 +1632,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.motd;
|
||||
}
|
||||
|
||||
@ -2037,7 +2037,7 @@ index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c
|
||||
}
|
||||
|
||||
public boolean isStopped() {
|
||||
@@ -2335,27 +2346,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2363,27 +2374,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public final java.util.concurrent.ExecutorService chatExecutor = java.util.concurrent.Executors.newCachedThreadPool(
|
||||
@ -2073,10 +2073,10 @@ index 0f7dd33d51281b383be0fb47d4e6b133f123ce1f..011c3d2dbd34dd0c2afba477202c937c
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac518790fd83 100644
|
||||
index 7efd4be91e6ff0abf087bf4d322fd6ac694b7010..531d0b0dcd499adf0d973bf336272aa1966069f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -156,6 +156,7 @@ import net.minecraft.world.scores.Score;
|
||||
@@ -161,6 +161,7 @@ import net.minecraft.world.scores.Score;
|
||||
import net.minecraft.world.scores.Scoreboard;
|
||||
import net.minecraft.world.scores.Team;
|
||||
import net.minecraft.world.scores.criteria.ObjectiveCriteria;
|
||||
@ -2084,7 +2084,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.WeatherType;
|
||||
@@ -235,6 +236,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -240,6 +241,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@ -2092,7 +2092,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
public Component listName;
|
||||
public org.bukkit.Location compassTarget;
|
||||
public int newExp = 0;
|
||||
@@ -318,6 +320,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -323,6 +325,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
// CraftBukkit start
|
||||
this.displayName = this.getScoreboardName();
|
||||
@ -2100,7 +2100,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
this.bukkitPickUpLoot = true;
|
||||
this.maxHealthCache = this.getMaxHealth();
|
||||
}
|
||||
@@ -811,22 +814,17 @@ public class ServerPlayer extends Player {
|
||||
@@ -816,22 +819,17 @@ public class ServerPlayer extends Player {
|
||||
|
||||
String deathmessage = defaultMessage.getString();
|
||||
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
|
||||
@ -2127,7 +2127,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
|
||||
this.connection.send(new ClientboundPlayerCombatKillPacket(this.getCombatTracker(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
|
||||
boolean flag1 = true;
|
||||
@@ -1754,13 +1752,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1758,13 +1756,13 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public void sendSystemMessage(Component message, boolean overlay) {
|
||||
if (this.acceptsSystemMessages(overlay)) {
|
||||
@ -2143,7 +2143,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -1769,8 +1767,13 @@ public class ServerPlayer extends Player {
|
||||
@@ -1773,8 +1771,13 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
|
||||
public void sendChatMessage(OutgoingChatMessage message, boolean filterMaskEnabled, ChatType.Bound params) {
|
||||
@ -2158,7 +2158,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1784,6 +1787,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1792,6 +1795,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
|
||||
public String locale = "en_us"; // CraftBukkit - add, lowercase
|
||||
@ -2166,7 +2166,7 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
public void updateOptions(ServerboundClientInformationPacket packet) {
|
||||
// CraftBukkit start
|
||||
if (getMainArm() != packet.mainHand()) {
|
||||
@@ -1795,6 +1799,10 @@ public class ServerPlayer extends Player {
|
||||
@@ -1803,6 +1807,10 @@ public class ServerPlayer extends Player {
|
||||
this.server.server.getPluginManager().callEvent(event);
|
||||
}
|
||||
this.locale = packet.language;
|
||||
@ -2178,10 +2178,10 @@ index 39f60f3878b57feeb6c2645a8ed4432fb53a0269..650d28ce34239d3ae9caa3852e1bac51
|
||||
// CraftBukkit end
|
||||
this.chatVisibility = packet.chatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3f5d3680b 100644
|
||||
index 000fd11480d783eab80a93fedde48f66e6b1298b..35f4ccc9d9f5798785c039354bd4e1e946f8c92f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -185,6 +185,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
@@ -187,6 +187,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
@ -2190,7 +2190,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
@@ -436,14 +438,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -438,14 +440,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return this.server.isSingleplayerOwner(this.player.getGameProfile());
|
||||
}
|
||||
|
||||
@ -2214,7 +2214,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
// CraftBukkit start - fire PlayerKickEvent
|
||||
if (this.processedDisconnect) {
|
||||
return;
|
||||
@@ -452,7 +457,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -454,7 +459,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
Waitable waitable = new Waitable() {
|
||||
@Override
|
||||
protected Object evaluate() {
|
||||
@ -2223,7 +2223,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -469,9 +474,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -471,9 +476,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2235,7 +2235,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
|
||||
if (this.cserver.getServer().isRunning()) {
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
@@ -483,7 +488,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -485,7 +490,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// Send the possibly modified leave message
|
||||
@ -2244,7 +2244,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
// CraftBukkit end
|
||||
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
|
||||
@@ -1790,9 +1795,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1782,9 +1787,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
*/
|
||||
|
||||
this.player.disconnect();
|
||||
@ -2259,7 +2259,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.player.getTextFilter().leave();
|
||||
@@ -1889,11 +1896,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1881,11 +1888,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent());
|
||||
@ -2273,16 +2273,16 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
|
||||
this.broadcastChatMessage(playerchatmessage1);
|
||||
}, this.server.chatExecutor); // CraftBukkit - async chat
|
||||
@@ -1990,7 +1997,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"));
|
||||
return Optional.empty();
|
||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||
- this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
+ this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure
|
||||
return Optional.empty();
|
||||
} else {
|
||||
@@ -1985,7 +1992,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
|
||||
@@ -2049,7 +2056,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||
- this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
||||
+ this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure
|
||||
return Optional.empty();
|
||||
} else {
|
||||
this.player.resetLastActionTime();
|
||||
@@ -2043,7 +2050,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.handleCommand(s);
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
@ -2296,7 +2296,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
Player player = this.getCraftPlayer();
|
||||
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
|
||||
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
|
||||
@@ -2179,7 +2191,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2173,7 +2185,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
});
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
|
||||
@ -2305,7 +2305,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
} else {
|
||||
this.chat(s, message, true);
|
||||
}
|
||||
@@ -2986,30 +2998,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2995,30 +3007,30 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2344,7 +2344,7 @@ index 1cf586f485fcfb4e10bc239200367177b5f0da94..e5407a092c602cfec4bcc80198d2a9f3
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 51422faffe8f129d46d7207c3bc42127057dd148..a6e90e70730e106d1cac01abf7a41df8df787d89 100644
|
||||
index 1aae5c4c85efbaab626fa3776252b046618ae1cc..7983033160b77e28eb8135f8709dacd6b806ebe3 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -323,7 +323,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@ -2372,20 +2372,20 @@ index 51422faffe8f129d46d7207c3bc42127057dd148..a6e90e70730e106d1cac01abf7a41df8
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
index be097f13dba5d408f58d6fada893bed2638d4219..3d7d1ba148dbc3591d8c76b99a2ee7d965d12eef 100644
|
||||
index 1cb95db25a20d38faacd99a5805630c1598e9db3..d99b2235038eb1aba8cda474c4aa51e207149ef4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
@@ -54,7 +54,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||
@@ -57,7 +57,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||
CraftIconCache icon = server.server.getServerIcon();
|
||||
|
||||
ServerListPingEvent() {
|
||||
- super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), ServerStatusPacketListenerImpl.this.server.getMotd(), ServerStatusPacketListenerImpl.this.server.getPlayerList().getMaxPlayers());
|
||||
+ super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), ServerStatusPacketListenerImpl.this.server.server.motd(), ServerStatusPacketListenerImpl.this.server.getPlayerList().getMaxPlayers()); // Paper - Adventure
|
||||
- super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.getMotd(), server.getPlayerList().getMaxPlayers());
|
||||
+ super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.server.motd(), server.getPlayerList().getMaxPlayers()); // Paper - Adventure
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff9e7b1b7a 100644
|
||||
index 6529064505dc3de875be1764f88897736b85975d..d19d1f1595a226ce0472be5e2efafbc0e3e1729f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -8,6 +8,7 @@ import com.mojang.logging.LogUtils;
|
||||
@ -2396,7 +2396,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
import java.io.File;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.file.Path;
|
||||
@@ -272,7 +273,7 @@ public abstract class PlayerList {
|
||||
@@ -273,7 +274,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit start
|
||||
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
|
||||
@ -2404,8 +2404,8 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
+ Component joinMessage = ichatmutablecomponent; // Paper - Adventure
|
||||
|
||||
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
|
||||
player.sendServerStatus(this.server.getStatus());
|
||||
@@ -288,19 +289,18 @@ public abstract class PlayerList {
|
||||
ServerStatus serverping = this.server.getStatus();
|
||||
@@ -294,19 +295,18 @@ public abstract class PlayerList {
|
||||
// Ensure that player inventory is populated with its viewer
|
||||
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
|
||||
|
||||
@ -2413,7 +2413,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
+ PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(bukkitPlayer, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
|
||||
this.cserver.getPluginManager().callEvent(playerJoinEvent);
|
||||
|
||||
if (!player.connection.connection.isConnected()) {
|
||||
if (!player.connection.isAcceptingMessages()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2430,7 +2430,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -496,7 +496,7 @@ public abstract class PlayerList {
|
||||
@@ -503,7 +503,7 @@ public abstract class PlayerList {
|
||||
|
||||
}
|
||||
|
||||
@ -2439,7 +2439,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
ServerLevel worldserver = entityplayer.getLevel();
|
||||
|
||||
entityplayer.awardStat(Stats.LEAVE_GAME);
|
||||
@@ -507,7 +507,7 @@ public abstract class PlayerList {
|
||||
@@ -514,7 +514,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer();
|
||||
}
|
||||
|
||||
@ -2448,7 +2448,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
@@ -560,7 +560,7 @@ public abstract class PlayerList {
|
||||
@@ -567,7 +567,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
||||
// CraftBukkit end
|
||||
|
||||
@ -2457,7 +2457,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
}
|
||||
|
||||
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
||||
@@ -606,10 +606,10 @@ public abstract class PlayerList {
|
||||
@@ -613,10 +613,10 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
// return chatmessage;
|
||||
@ -2470,7 +2470,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
|
||||
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
|
||||
|
||||
@@ -619,17 +619,17 @@ public abstract class PlayerList {
|
||||
@@ -626,17 +626,17 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
// return chatmessage;
|
||||
@ -2491,7 +2491,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
return null;
|
||||
}
|
||||
return entity;
|
||||
@@ -1140,7 +1140,7 @@ public abstract class PlayerList {
|
||||
@@ -1147,7 +1147,7 @@ public abstract class PlayerList {
|
||||
public void removeAll() {
|
||||
// CraftBukkit start - disconnect safely
|
||||
for (ServerPlayer player : this.players) {
|
||||
@ -2500,7 +2500,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1181,24 +1181,43 @@ public abstract class PlayerList {
|
||||
@@ -1188,24 +1188,43 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
|
||||
@ -2547,7 +2547,7 @@ index 25227822aa0e1dd7fbbe98a0925ccd023af8d0dc..dfd2f3ba256edc64e0016e7816ccefff
|
||||
}
|
||||
|
||||
if (flag1 && sender != null) {
|
||||
@@ -1207,7 +1226,7 @@ public abstract class PlayerList {
|
||||
@@ -1214,7 +1233,7 @@ public abstract class PlayerList {
|
||||
|
||||
}
|
||||
|
||||
@ -2645,7 +2645,7 @@ index 4c62df5a3781ec9df4a5c5f1b528649e6e8a62d1..affd1b8c7589ba59330dc0b6fc803cce
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index 7ff9abc0d8fae40c425c9b5151cb36a3b8c2eee7..1fd305ccedfd311dc5238810003889b2c1897089 100644
|
||||
index 3800205f28a00572b4ab757cc56e24eefa61e6fe..fe14c0d03a0bbd5cbf0608ea88d499984b54d2ed 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -33,6 +33,7 @@ import net.minecraft.world.level.saveddata.SavedData;
|
||||
@ -2666,10 +2666,10 @@ index 7ff9abc0d8fae40c425c9b5151cb36a3b8c2eee7..1fd305ccedfd311dc5238810003889b2
|
||||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffbe86bb581 100644
|
||||
index 059ba63319f6ca04750a7d6b095e6179cae68b4f..cb2dc6db887856c5f60d127f5999a0785702f2f4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -605,8 +605,10 @@ public final class CraftServer implements Server {
|
||||
@@ -600,8 +600,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2680,7 +2680,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1440,7 +1442,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1439,7 +1441,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -2696,7 +2696,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1608,7 +1618,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1607,7 +1617,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2717,7 +2717,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1616,14 +1639,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1615,14 +1638,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -2734,7 +2734,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -1874,6 +1897,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1873,6 +1896,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -2749,7 +2749,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type);
|
||||
@@ -1886,13 +1917,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1885,13 +1916,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -2778,7 +2778,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -1957,6 +2003,12 @@ public final class CraftServer implements Server {
|
||||
@@ -1956,6 +2002,12 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -2791,7 +2791,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2384,4 +2436,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2382,4 +2434,15 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -2808,7 +2808,7 @@ index f29395b6bf9eebd4830bbcda7d96085fb8e3d8b0..877a104e3899debd387544b740896ffb
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 57ed87689c7cb709d54e611bfbdbb70890021df2..fd1da8431578832bcd1f3ca7890dd2150b916ebd 100644
|
||||
index 3b9e42adb657d0feb99de4b55dc0c628e9cd5afd..253f965e52cd488af88d55cdd09f1bad0ddbeb56 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -149,6 +149,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -2839,10 +2839,10 @@ index 57ed87689c7cb709d54e611bfbdbb70890021df2..fd1da8431578832bcd1f3ca7890dd215
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index fd213200dcc5fe08f4b28e94ce2a0cf5b3c7ad5b..481c1f853bbe81da123cfb3f79ed4509cf127db8 100644
|
||||
index 7fc066ee281662192aad826840573e4181f5ceff..6569c9db3fa026ee4fbfaceac0e4f6a15c1fbe16 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -19,6 +19,12 @@ public class Main {
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
public static boolean useConsole = true;
|
||||
|
||||
public static void main(String[] args) {
|
||||
@ -3206,10 +3206,10 @@ index f6c614bb1184f9c79121f64a2a030bf3f094b671..e8334e2264510f5101e80b4f130e7ae1
|
||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||
return this.target;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 5f6d4f553cab8f20c2049c706e69de3d79701dfd..55bf95017d58bb61f9c6af27335c88421c74c4aa 100644
|
||||
index f4cdda9fabb3a13f7cc8b6056815bdbae704db9d..17c914088b467007aada17e3b2238a9c76fb532b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -199,6 +199,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -202,6 +202,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
protected Entity entity;
|
||||
private EntityDamageEvent lastDamageEvent;
|
||||
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
|
||||
@ -3217,7 +3217,7 @@ index 5f6d4f553cab8f20c2049c706e69de3d79701dfd..55bf95017d58bb61f9c6af27335c8842
|
||||
|
||||
public CraftEntity(final CraftServer server, final Entity entity) {
|
||||
this.server = server;
|
||||
@@ -849,6 +850,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -860,6 +861,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return this.getHandle().getVehicle().getBukkitEntity();
|
||||
}
|
||||
|
||||
@ -3250,7 +3250,7 @@ index 5f6d4f553cab8f20c2049c706e69de3d79701dfd..55bf95017d58bb61f9c6af27335c8842
|
||||
@Override
|
||||
public void setCustomName(String name) {
|
||||
// sane limit for name length
|
||||
@@ -904,6 +931,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -939,6 +966,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public String getName() {
|
||||
return CraftChatMessage.fromComponent(this.getHandle().getName());
|
||||
}
|
||||
@ -3321,10 +3321,10 @@ index 446fdca49a5a6999626a7ee3a1d5c168b15a09dd..f9863e138994f6c7a7975a852f106faa
|
||||
public boolean isOp() {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab48a10a16 100644
|
||||
index 4d341db0daecb5f6ff1f0a1a9238f9dedb4b50d1..27cf140f8a7715caec5637d7b487720c2cc5742e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -277,14 +277,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -278,14 +278,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
@ -3364,7 +3364,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
@Override
|
||||
public String getPlayerListName() {
|
||||
return this.getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
|
||||
@@ -303,42 +328,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -304,42 +329,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3416,7 +3416,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
this.getHandle().connection.send(packet);
|
||||
}
|
||||
|
||||
@@ -370,6 +395,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -371,6 +396,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().connection.disconnect(message == null ? "" : message);
|
||||
}
|
||||
|
||||
@ -3440,7 +3440,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
@Override
|
||||
public void setCompassTarget(Location loc) {
|
||||
if (this.getHandle().connection == null) return;
|
||||
@@ -683,6 +725,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -684,6 +726,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().connection.send(packet);
|
||||
}
|
||||
|
||||
@ -3476,7 +3476,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
@Override
|
||||
public void sendSignChange(Location loc, String[] lines) {
|
||||
this.sendSignChange(loc, lines, DyeColor.BLACK);
|
||||
@@ -710,14 +781,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -711,14 +782,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
Component[] components = CraftSign.sanitizeLines(lines);
|
||||
@ -3494,7 +3494,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1502,7 +1574,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1576,7 +1648,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setResourcePack(String url) {
|
||||
@ -3503,7 +3503,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1517,7 +1589,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1591,7 +1663,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setResourcePack(String url, byte[] hash, boolean force) {
|
||||
@ -3512,7 +3512,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1533,6 +1605,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1607,6 +1679,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3534,7 +3534,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
public void addChannel(String channel) {
|
||||
Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
|
||||
channel = StandardMessenger.validateAndCorrectChannel(channel);
|
||||
@@ -1937,6 +2024,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2011,6 +2098,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return (this.getHandle().clientViewDistance == null) ? Bukkit.getViewDistance() : this.getHandle().clientViewDistance;
|
||||
}
|
||||
|
||||
@ -3547,7 +3547,7 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
@Override
|
||||
public int getPing() {
|
||||
return this.getHandle().latency;
|
||||
@@ -1982,6 +2075,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2056,6 +2149,254 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.getHandle().allowsListing();
|
||||
}
|
||||
|
||||
@ -3803,10 +3803,10 @@ index 2864661527c55752bb43de3430ca29151a7502ab..ec27b75c4cf292ffc95ebad63617ffab
|
||||
private final Player.Spigot spigot = new Player.Spigot()
|
||||
{
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 92ce3bae7116157b66ed657fe3dc9d4f709bab11..3b520b1301eb0225cdcbb271c8032726c59d3990 100644
|
||||
index 09ce43bf982f2da83fc9b10039109f8b76bd6ad3..7bcbd1aac8826c76b74ef0e517b9d94e615df347 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -821,9 +821,9 @@ public class CraftEventFactory {
|
||||
@@ -820,9 +820,9 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
@ -3818,7 +3818,7 @@ index 92ce3bae7116157b66ed657fe3dc9d4f709bab11..3b520b1301eb0225cdcbb271c8032726
|
||||
event.setKeepInventory(keepInventory);
|
||||
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
||||
org.bukkit.World world = entity.getWorld();
|
||||
@@ -848,7 +848,7 @@ public class CraftEventFactory {
|
||||
@@ -847,7 +847,7 @@ public class CraftEventFactory {
|
||||
* Server methods
|
||||
*/
|
||||
public static ServerListPingEvent callServerListPingEvent(Server craftServer, InetAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||
@ -3828,7 +3828,7 @@ index 92ce3bae7116157b66ed657fe3dc9d4f709bab11..3b520b1301eb0225cdcbb271c8032726
|
||||
return event;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index 9750f789a9179c78f91361dcd4a4afdcc0885cc5..0cbb702641348500bf8f8ab3b3c206f70aea9738 100644
|
||||
index a94bfca34ba87976a51c5572250059d393041f38..7d0d2cd4d34d6652eb45aa13442e1081a3a6bd56 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -68,6 +68,13 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
@ -3950,10 +3950,10 @@ index 6a64fbb8b4937f39d5fdc2e2cbec26c83c74c486..7d6b5fdb00a5c1614849735634262a36
|
||||
public String getTitle() {
|
||||
return CraftChatMessage.fromComponent(this.container.getTitle());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index 9c5be190328a2bf79d7c02d8d3f38eea3771a534..102e3572424478375a2d175e4d5b6aacba8412a8 100644
|
||||
index a7ef4a04358df3f848ace0e6e8b6f2d0a18dbc29..4c76692e222d8505558aade9c03b3686612f7c0c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -410,4 +410,17 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -417,4 +417,17 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException {
|
||||
return ((CraftMetaItem) meta).updateMaterial(material);
|
||||
}
|
||||
@ -4298,10 +4298,10 @@ index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2
|
||||
return new CraftInventoryCustom(owner, size, title);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||
index 4e705b7367b78c2da98d0b174807ecbce75f3a59..4972ce5d876d74e04a4fbfeb860f1d44e25b3470 100644
|
||||
index e69d5635d1c81a3bed54d2cb1b0316efb522ab5d..d09fc01a20e8426f4094899060c70e011ff65887 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||
@@ -43,6 +43,12 @@ public final class CraftInventoryCreator {
|
||||
@@ -44,6 +44,12 @@ public final class CraftInventoryCreator {
|
||||
return this.converterMap.get(type).createInventory(holder, type);
|
||||
}
|
||||
|
||||
@ -4314,7 +4314,7 @@ index 4e705b7367b78c2da98d0b174807ecbce75f3a59..4972ce5d876d74e04a4fbfeb860f1d44
|
||||
public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) {
|
||||
return this.converterMap.get(type).createInventory(holder, type, title);
|
||||
}
|
||||
@@ -51,6 +57,12 @@ public final class CraftInventoryCreator {
|
||||
@@ -52,6 +58,12 @@ public final class CraftInventoryCreator {
|
||||
return this.DEFAULT_CONVERTER.createInventory(holder, size);
|
||||
}
|
||||
|
||||
@ -4327,7 +4327,7 @@ index 4e705b7367b78c2da98d0b174807ecbce75f3a59..4972ce5d876d74e04a4fbfeb860f1d44
|
||||
public Inventory createInventory(InventoryHolder holder, int size, String title) {
|
||||
return this.DEFAULT_CONVERTER.createInventory(holder, size, title);
|
||||
}
|
||||
@@ -59,6 +71,10 @@ public final class CraftInventoryCreator {
|
||||
@@ -60,6 +72,10 @@ public final class CraftInventoryCreator {
|
||||
|
||||
Inventory createInventory(InventoryHolder holder, InventoryType type);
|
||||
|
||||
@ -4573,7 +4573,7 @@ index 78ea79b66cc9e90402ef5cdc2e5e04e0c74b1c26..4fede2161792ba3e7cdf0cc5a1f53318
|
||||
|
||||
boolean hadFormat = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 21ca79fa628d9cc970942bcd5368d971d800753a..0bf46f90333d79e2cada286b493c5fc2b6903970 100644
|
||||
index eff182a54cbb84693d6cad96b51f743b08049b43..91cf7e26de7d3595e151f7c52683ef82715420ad 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -72,6 +72,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -572,10 +572,10 @@ index 1fe07773cf9664164b29164caba22800e5a6bdae..cb6f192c11cda6230ec365e6cefb44a3
|
||||
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 877a104e3899debd387544b740896ffbe86bb581..26ca07b5e302cc4cc02e06f5d07f6d9eb541275e 100644
|
||||
index cb2dc6db887856c5f60d127f5999a0785702f2f4..52998bb6b10421283c2b374d2abff5d1253b4e4f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -909,6 +909,7 @@ public final class CraftServer implements Server {
|
||||
@@ -904,6 +904,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.clearCommands();
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
@ -583,7 +583,7 @@ index 877a104e3899debd387544b740896ffbe86bb581..26ca07b5e302cc4cc02e06f5d07f6d9e
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2438,6 +2439,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2436,6 +2437,34 @@ public final class CraftServer implements Server {
|
||||
// Spigot end
|
||||
|
||||
// Paper start
|
@ -6497,10 +6497,10 @@ index f7114d5b8f2f93f62883e24da29afaf9f74ee1a6..8bf0630c0e06950cd99b7ae9898137f7
|
||||
|
||||
return foundFrame.orElse(null);
|
||||
diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
index 5b8ecf5b0165ed2cd4397cdee958e97c2e8f18d5..ad802eb211f05f646159d7fc53f8a9427b46cb89 100644
|
||||
index a969cd46694ce3094b4a65cf188677d38ae72198..35c9af90dfcb99fac58577174115b59b0d1262ca 100644
|
||||
--- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
+++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java
|
||||
@@ -310,7 +310,13 @@ public class BuiltInRegistries {
|
||||
@@ -312,7 +312,13 @@ public class BuiltInRegistries {
|
||||
}
|
||||
|
||||
public static void bootStrap() {
|
||||
@ -6532,10 +6532,10 @@ index b5aa358638b9d0638dfe47f7ebac04cca1dd80b9..e43096e69a00f9ea96badd7c966443cf
|
||||
}
|
||||
// CraftBukkit start - easier than fixing the decompile
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index b7399e29094c66c88a6f4c0e996a906bcaa3b4ca..cef3b053d79e71eb66eb6bddf9365ed4d7042bae 100644
|
||||
index aa054369cef3da4f90ce17788dcb9ca80dc98010..d9f2518a08bc4ae978051be51e467597f9325ecb 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -110,6 +110,7 @@ public class Main {
|
||||
@@ -122,6 +122,7 @@ public class Main {
|
||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||
}
|
||||
|
||||
@ -6544,10 +6544,10 @@ index b7399e29094c66c88a6f4c0e996a906bcaa3b4ca..cef3b053d79e71eb66eb6bddf9365ed4
|
||||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 26ca07b5e302cc4cc02e06f5d07f6d9eb541275e..976e8b1ff947aa1c0e680ff1b31d26d3be0894d7 100644
|
||||
index 52998bb6b10421283c2b374d2abff5d1253b4e4f..63e1ad046051ef60df339e3b9c14f73db0e0de21 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -268,7 +268,8 @@ public final class CraftServer implements Server {
|
||||
@@ -263,7 +263,8 @@ public final class CraftServer implements Server {
|
||||
private final CraftCommandMap commandMap = new CraftCommandMap(this);
|
||||
private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
|
||||
private final StandardMessenger messenger = new StandardMessenger();
|
||||
@ -6557,7 +6557,7 @@ index 26ca07b5e302cc4cc02e06f5d07f6d9eb541275e..976e8b1ff947aa1c0e680ff1b31d26d3
|
||||
private final StructureManager structureManager;
|
||||
protected final DedicatedServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
@@ -416,24 +417,7 @@ public final class CraftServer implements Server {
|
||||
@@ -411,24 +412,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
@ -6583,7 +6583,7 @@ index 26ca07b5e302cc4cc02e06f5d07f6d9eb541275e..976e8b1ff947aa1c0e680ff1b31d26d3
|
||||
}
|
||||
|
||||
public void enablePlugins(PluginLoadOrder type) {
|
||||
@@ -522,15 +506,17 @@ public final class CraftServer implements Server {
|
||||
@@ -517,15 +501,17 @@ public final class CraftServer implements Server {
|
||||
private void enablePlugin(Plugin plugin) {
|
||||
try {
|
||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||
@ -6607,7 +6607,7 @@ index 26ca07b5e302cc4cc02e06f5d07f6d9eb541275e..976e8b1ff947aa1c0e680ff1b31d26d3
|
||||
|
||||
this.pluginManager.enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -933,6 +919,7 @@ public final class CraftServer implements Server {
|
||||
@@ -928,6 +914,7 @@ public final class CraftServer implements Server {
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
}
|
||||
@ -6633,7 +6633,7 @@ index 909b2c98e7a9117d2f737245e4661792ffafb744..d96399e9bf1a58db5a4a22e58abb99e7
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 0bf46f90333d79e2cada286b493c5fc2b6903970..59f0c09f657416c723fa69b71bd31e0e5922c073 100644
|
||||
index 91cf7e26de7d3595e151f7c52683ef82715420ad..ec9877840fafa14adcfc04eacae1786111990a27 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -437,6 +437,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -715,13 +715,13 @@ index 3ceeddf4c2898172d24db9ee1bab8d6b17e36128..8273ee1c5e513f02c9743ee38c9b7cf7
|
||||
public CommandFunction(ResourceLocation id, CommandFunction.Entry[] elements) {
|
||||
this.id = id;
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c44f999dd 100644
|
||||
index fc4dcd801480fe6d89a985de411baa9a3a66f6ef..4a1148a76020089caf01f888f87afdbb35788dc0 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||
@@ -26,7 +26,8 @@ public class PacketUtils {
|
||||
engine.executeIfPossible(() -> {
|
||||
if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
|
||||
if (listener.getConnection().isConnected()) {
|
||||
if (listener.isAcceptingMessages()) {
|
||||
- try {
|
||||
+ co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
|
||||
+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
|
||||
@ -729,7 +729,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
|
||||
} catch (Exception exception) {
|
||||
if (listener.shouldPropagateHandlingExceptions()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c6920decab90 100644
|
||||
index 47ec7832579c2f5d473301e7127cae47da630c03..013556d54894dc2914b8cda7a70b9ea142b6668f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -189,7 +189,7 @@ import org.bukkit.event.player.AsyncPlayerChatPreviewEvent;
|
||||
@ -741,7 +741,7 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
|
||||
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
|
||||
|
||||
@@ -862,6 +862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -864,6 +864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
@ -783,7 +783,7 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1200,9 +1213,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1199,9 +1212,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public void onServerExit() {}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@ -802,7 +802,7 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
++this.tickCount;
|
||||
this.tickChildren(shouldKeepTicking);
|
||||
if (i - this.lastServerStatus >= 5000000000L) {
|
||||
@@ -1228,15 +1249,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1210,15 +1231,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
|
||||
@ -821,10 +821,10 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
+ }
|
||||
+ // Paper end
|
||||
this.profiler.push("tallying");
|
||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||
|
||||
@@ -1246,30 +1270,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.frameTimer.logFrameDuration(i1 - i);
|
||||
@@ -1228,8 +1252,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.frameTimer.logFrameDuration(k - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
|
||||
@ -832,6 +832,10 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||
}
|
||||
|
||||
private ServerStatus buildServerStatus() {
|
||||
@@ -1261,25 +1284,25 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickChildren(BooleanSupplier shouldKeepTicking) {
|
||||
- SpigotTimings.schedulerTimer.startTiming(); // Spigot
|
||||
+ MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
||||
@ -862,7 +866,7 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.tickCount % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -1277,7 +1300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1287,7 +1310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
@ -871,7 +875,7 @@ index 011c3d2dbd34dd0c2afba477202c937c654d42a4..2737dfbf4d978f2bb118cb996ea5c692
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@@ -1323,24 +1346,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1333,24 +1356,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
@ -997,7 +1001,7 @@ index 11006df8797334da69801cdb9aa34b0f941cf90d..5e5c4de89784db702256ee765091e929
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index ae69c14943bd93ca948789ad4d4da899a7505a60..cb1387a18f4306829c75b07a73195b54dbe63ad0 100644
|
||||
index 714b36e4942fda9d6c8a202b9e7a34ef67d3d13c..091c9e9bdbe4e956386df011ddf01cba42c30da1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1,8 +1,10 @@
|
||||
@ -1011,7 +1015,7 @@ index ae69c14943bd93ca948789ad4d4da899a7505a60..cb1387a18f4306829c75b07a73195b54
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -864,6 +866,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -867,6 +869,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
|
||||
|
||||
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
|
||||
@ -1019,7 +1023,7 @@ index ae69c14943bd93ca948789ad4d4da899a7505a60..cb1387a18f4306829c75b07a73195b54
|
||||
ChunkPos chunkcoordintpair = chunkHolder.getPos();
|
||||
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
|
||||
LevelChunk chunk;
|
||||
@@ -888,6 +891,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -891,6 +894,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
return chunk;
|
||||
@ -1027,7 +1031,7 @@ index ae69c14943bd93ca948789ad4d4da899a7505a60..cb1387a18f4306829c75b07a73195b54
|
||||
});
|
||||
}, (runnable) -> {
|
||||
ProcessorHandle mailbox = this.mainThreadMailbox;
|
||||
@@ -1440,6 +1444,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1443,6 +1447,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
List<ServerPlayer> list = Lists.newArrayList();
|
||||
List<ServerPlayer> list1 = this.level.players();
|
||||
ObjectIterator objectiterator = this.entityMap.values().iterator();
|
||||
@ -1035,7 +1039,7 @@ index ae69c14943bd93ca948789ad4d4da899a7505a60..cb1387a18f4306829c75b07a73195b54
|
||||
|
||||
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
|
||||
|
||||
@@ -1464,14 +1469,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1467,14 +1472,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
playerchunkmap_entitytracker.serverEntity.sendChanges();
|
||||
}
|
||||
}
|
||||
@ -1146,7 +1150,7 @@ index 794ad2dbaea2555d4557124e9d942d3e6919ea09..28c8a3ba1caddf0ea334a6ef43cae25f
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400 100644
|
||||
index aa164a81d072d9390fa1400120e801979e5d74d0..f2798373e7d07cc0e46c39297c29e7be364a8dff 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -1158,7 +1162,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -160,7 +162,6 @@ import org.slf4j.Logger;
|
||||
@@ -162,7 +164,6 @@ import org.slf4j.Logger;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.WeatherType;
|
||||
@ -1193,7 +1197,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
gameprofilerfiller.popPush("blockEvents");
|
||||
timings.doSounds.startTiming(); // Spigot
|
||||
this.runBlockEvents();
|
||||
@@ -650,6 +655,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -649,6 +654,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
@ -1201,7 +1205,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] achunksection = chunk.getSections();
|
||||
int j1 = achunksection.length;
|
||||
@@ -682,6 +688,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -681,6 +687,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1209,7 +1213,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
|
||||
@@ -916,14 +923,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -915,14 +922,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void tickNonPassenger(Entity entity) {
|
||||
@ -1233,7 +1237,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
entity.setOldPosAndRot();
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
@@ -942,7 +957,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -941,7 +956,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@ -1242,7 +1246,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
|
||||
}
|
||||
|
||||
@@ -984,6 +999,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -983,6 +998,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
@ -1250,7 +1254,7 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
}
|
||||
@@ -993,7 +1009,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -992,7 +1008,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||
}
|
||||
|
||||
@ -1262,10 +1266,10 @@ index 8784b0702f10eb7582c309c15f18fe13eebd9c8e..6f81aa6b0a835bf10e0d5f2b32fe9fb2
|
||||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fdf529b755 100644
|
||||
index 35f4ccc9d9f5798785c039354bd4e1e946f8c92f..c1980d00c622c32e7fdbd2a6fa487ba61020e7b5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -335,7 +335,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -337,7 +337,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1273,7 +1277,7 @@ index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fd
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -416,7 +415,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -418,7 +417,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
|
||||
}
|
||||
@ -1281,7 +1285,7 @@ index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fd
|
||||
|
||||
}
|
||||
|
||||
@@ -2143,7 +2141,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2137,7 +2135,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
private void handleCommand(String s) {
|
||||
@ -1290,7 +1294,7 @@ index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fd
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
|
||||
@@ -2153,7 +2151,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2147,7 +2145,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.cserver.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@ -1299,7 +1303,7 @@ index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fd
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2166,7 +2164,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2160,7 +2158,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
@ -1309,7 +1313,7 @@ index e5407a092c602cfec4bcc80198d2a9f3f5d3680b..526a8ffa7761a013e4db24e983d716fd
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index dfd2f3ba256edc64e0016e7816ccefff9e7b1b7a..5f8498ac372a34549519264f612e7554addb41d9 100644
|
||||
index d19d1f1595a226ce0472be5e2efafbc0e3e1729f..470e752234813d1031721be95d0bf1178e423a59 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1319,7 +1323,7 @@ index dfd2f3ba256edc64e0016e7816ccefff9e7b1b7a..5f8498ac372a34549519264f612e7554
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1029,10 +1030,11 @@ public abstract class PlayerList {
|
||||
@@ -1036,10 +1037,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
||||
@ -1333,10 +1337,10 @@ index dfd2f3ba256edc64e0016e7816ccefff9e7b1b7a..5f8498ac372a34549519264f612e7554
|
||||
|
||||
public UserWhiteList getWhiteList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e0124636b32fce 100644
|
||||
index 35125c029abbdab4c7043842b6042ea44b00a2c3..f215204e1dd6fb3b805a60a268dae10f786b5171 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -132,7 +132,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
@@ -134,7 +134,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
|
||||
import org.bukkit.entity.Hanging;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Vehicle;
|
||||
@ -1344,7 +1348,7 @@ index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e01246
|
||||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -299,7 +298,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -302,7 +301,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
public boolean persistentInvisibility = false;
|
||||
public BlockPos lastLavaContact;
|
||||
@ -1352,7 +1356,7 @@ index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e01246
|
||||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -749,7 +747,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -752,7 +750,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void move(MoverType movementType, Vec3 movement) {
|
||||
@ -1360,7 +1364,7 @@ index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e01246
|
||||
if (this.noPhysics) {
|
||||
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
||||
} else {
|
||||
@@ -913,7 +910,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -916,7 +913,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
}
|
||||
@ -1369,10 +1373,10 @@ index 742897a534dac2bbbacaca0f6c8196e8d2bc03dd..23b22543c3d164e3fdf2f262f3e01246
|
||||
|
||||
protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 092d563dd1fa8577818aaaa8e81db92c67a77587..a2c4267f0001b276d848377e4dbcc407ee8d1ff9 100644
|
||||
index ac3a8a4460175985e0d580f7926cce14f804562c..bb0f57be7ecb6a36f447294cc04edc74708427af 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -315,6 +315,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -322,6 +322,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
}
|
||||
|
||||
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, FeatureFlagSet requiredFeatures) {
|
||||
@ -1388,7 +1392,7 @@ index 092d563dd1fa8577818aaaa8e81db92c67a77587..a2c4267f0001b276d848377e4dbcc407
|
||||
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
|
||||
this.factory = factory;
|
||||
this.category = spawnGroup;
|
||||
@@ -635,6 +644,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -643,6 +652,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
return this.updateInterval;
|
||||
}
|
||||
|
||||
@ -1401,7 +1405,7 @@ index 092d563dd1fa8577818aaaa8e81db92c67a77587..a2c4267f0001b276d848377e4dbcc407
|
||||
public boolean trackDeltas() {
|
||||
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
|
||||
}
|
||||
@@ -740,7 +755,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -748,7 +763,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
Util.fetchChoiceType(References.ENTITY_TREE, id);
|
||||
}
|
||||
|
||||
@ -1411,19 +1415,19 @@ index 092d563dd1fa8577818aaaa8e81db92c67a77587..a2c4267f0001b276d848377e4dbcc407
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c29dc3ea53 100644
|
||||
index 592e41884ffda0075ec16e5538d5004efeb80f78..aa34f59f7ffaa40fb43b6784361c0f7edb0461c5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -141,7 +141,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -139,7 +139,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||
|
||||
public abstract class LivingEntity extends Entity {
|
||||
public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@@ -2837,7 +2837,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2805,7 +2805,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1431,7 +1435,7 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
super.tick();
|
||||
this.updatingUsingItem();
|
||||
this.updateSwimAmount();
|
||||
@@ -2879,9 +2878,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2847,9 +2846,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
if (!this.isRemoved()) {
|
||||
@ -1441,7 +1445,7 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
}
|
||||
|
||||
double d0 = this.getX() - this.xo;
|
||||
@@ -2963,8 +2960,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -2931,8 +2928,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
if (this.isSleeping()) {
|
||||
this.setXRot(0.0F);
|
||||
}
|
||||
@ -1450,7 +1454,7 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
}
|
||||
|
||||
public void detectEquipmentUpdates() {
|
||||
@@ -3150,7 +3145,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3110,7 +3105,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.setDeltaMovement(d4, d5, d6);
|
||||
this.level.getProfiler().push("ai");
|
||||
@ -1458,7 +1462,7 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
if (this.isImmobile()) {
|
||||
this.jumping = false;
|
||||
this.xxa = 0.0F;
|
||||
@@ -3160,7 +3154,6 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3120,7 +3114,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.serverAiStep();
|
||||
this.level.getProfiler().pop();
|
||||
}
|
||||
@ -1466,19 +1470,23 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("jump");
|
||||
@@ -3195,9 +3188,9 @@ public abstract class LivingEntity extends Entity {
|
||||
this.updateFallFlying();
|
||||
AABB axisalignedbb = this.getBoundingBox();
|
||||
@@ -3157,13 +3150,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
LivingEntity entityliving = this.getControllingPassenger();
|
||||
Vec3 vec3d1 = new Vec3((double) this.xxa, (double) this.yya, (double) this.zza);
|
||||
|
||||
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
||||
+ // SpigotTimings.timerEntityAIMove.startTiming(); // Spigot // Paper
|
||||
this.travel(new Vec3((double) this.xxa, (double) this.yya, (double) this.zza));
|
||||
+ //SpigotTimings.timerEntityAIMove.startTiming(); // Spigot // Paper
|
||||
if (entityliving != null && this.isAlive()) {
|
||||
this.travelRidden(entityliving, vec3d1);
|
||||
} else {
|
||||
this.travel(vec3d1);
|
||||
}
|
||||
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
||||
+ // SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot // Paper
|
||||
+ //SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot // Paper
|
||||
|
||||
this.level.getProfiler().pop();
|
||||
this.level.getProfiler().push("freezing");
|
||||
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
||||
@@ -3226,9 +3219,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3190,9 +3183,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
@ -1487,12 +1495,12 @@ index f29b109fdef494927f5f894ac962c50c33b1f0b6..c6ce813f7ea6c4dcbd45e9d8c55f56c2
|
||||
- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
|
||||
this.level.getProfiler().pop();
|
||||
if (!this.level.isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
|
||||
this.hurt(DamageSource.DROWN, 1.0F);
|
||||
this.hurt(this.damageSources().drown(), 1.0F);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index a0bd6c4df76fac867e1862273ce31dbe067de624..ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a 100644
|
||||
index e4ebdf81b7907e1054c356091ebcd35264b015f4..69f55f7207b8c03ca886947c57c9d13a8e8eb576 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -86,7 +86,6 @@ import org.bukkit.Bukkit;
|
||||
@@ -88,7 +88,6 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
@ -1500,7 +1508,7 @@ index a0bd6c4df76fac867e1862273ce31dbe067de624..ddb876d9494fa72ba2cb49dbfb8d5e61
|
||||
import org.bukkit.craftbukkit.block.CapturedBlockState;
|
||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
@@ -160,7 +159,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -164,7 +163,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -1509,7 +1517,7 @@ index a0bd6c4df76fac867e1862273ce31dbe067de624..ddb876d9494fa72ba2cb49dbfb8d5e61
|
||||
public static BlockPos lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
@@ -256,7 +255,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -262,7 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
|
||||
});
|
||||
// CraftBukkit end
|
||||
@ -1518,7 +1526,7 @@ index a0bd6c4df76fac867e1862273ce31dbe067de624..ddb876d9494fa72ba2cb49dbfb8d5e61
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
@@ -715,15 +714,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -721,15 +720,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
timings.tileEntityTick.stopTiming(); // Spigot
|
||||
this.tickingBlockEntities = false;
|
||||
@ -1536,7 +1544,7 @@ index a0bd6c4df76fac867e1862273ce31dbe067de624..ddb876d9494fa72ba2cb49dbfb8d5e61
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
index 5c54e38f75e0e2d84c06fccc14641254d6fd5678..6b22de4b22aeec101076199f1e20376dd4b31f4d 100644
|
||||
index 24eda8fa698d480e0295c84a5e4be8916223e69f..6603be2c0906c8d78e7de5c3dbed56f9552ff9c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||
@@ -89,6 +89,15 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
@ -1574,7 +1582,7 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 272203f71dc9bb525a91f835fd73ca1d03aa982e..49f091183111958ebd3fb56964fc5d728c16755c 100644
|
||||
index 0307083079c0a257ecb82b8cb4fb8f91af3816bc..8e11ca5e8cc43a27482a1794d843359d7428bdde 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -680,6 +680,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -1594,10 +1602,10 @@ index 272203f71dc9bb525a91f835fd73ca1d03aa982e..49f091183111958ebd3fb56964fc5d72
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index cf496b430bf3d7aab0b8e86c11e015583c1411a7..6fdd5c92ab069896e3921faa042cbdb3c29d0538 100644
|
||||
index 9c3ce492051199acb8d38ade121ec8a0cbc50f54..aa4f2dc63dd79e6c3d7594d2fd63fa0091df5f53 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -513,13 +513,10 @@ public class ChunkSerializer {
|
||||
@@ -512,13 +512,10 @@ public class ChunkSerializer {
|
||||
ListTag nbttaglist1 = ChunkSerializer.getListOfCompoundsOrNull(nbt, "block_entities");
|
||||
|
||||
return nbttaglist == null && nbttaglist1 == null ? null : (chunk) -> {
|
||||
@ -1611,7 +1619,7 @@ index cf496b430bf3d7aab0b8e86c11e015583c1411a7..6fdd5c92ab069896e3921faa042cbdb3
|
||||
if (nbttaglist1 != null) {
|
||||
for (int i = 0; i < nbttaglist1.size(); ++i) {
|
||||
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
|
||||
@@ -537,7 +534,6 @@ public class ChunkSerializer {
|
||||
@@ -536,7 +533,6 @@ public class ChunkSerializer {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1620,10 +1628,10 @@ index cf496b430bf3d7aab0b8e86c11e015583c1411a7..6fdd5c92ab069896e3921faa042cbdb3
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 976e8b1ff947aa1c0e680ff1b31d26d3be0894d7..4c99b64945068ec335228301b4ebdb7b933879fb 100644
|
||||
index 63e1ad046051ef60df339e3b9c14f73db0e0de21..36c1fd2987843d74b6f8f5711e77d67565f25c5b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2393,12 +2393,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2391,12 +2391,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
@ -1825,10 +1833,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ec27b75c4cf292ffc95ebad63617ffab48a10a16..ef1a0db17276178717b83a6d081a9e111d34e4e5 100644
|
||||
index 27cf140f8a7715caec5637d7b487720c2cc5742e..12e7a0a24fe2aa6e7af97ad7d50d81e5c7b26663 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2409,6 +2409,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2482,6 +2482,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
||||
}
|
||||
@ -2009,19 +2017,18 @@ index b89846e0f645c79afec018dae1d64a1bda043ed9..3f45bab0e9f7b3697e6d9d1092a1e6e5
|
||||
- // Spigot end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||
index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae0027da2e 100644
|
||||
index f97eccb6a17c7876e1e002d798eb67bbe80571a0..1d4b39b92c1ca028c98bce50ca154b4b192c0add 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
|
||||
public class CraftIconCache implements CachedServerIcon {
|
||||
public final String value;
|
||||
|
||||
+ public String getData() { return value; } // Paper
|
||||
public CraftIconCache(final String value) {
|
||||
@@ -8,4 +8,6 @@ public class CraftIconCache implements CachedServerIcon {
|
||||
public CraftIconCache(final byte[] value) {
|
||||
this.value = value;
|
||||
}
|
||||
+
|
||||
+ public String getData() { return "data:image/png;base64," + new String(java.util.Base64.getEncoder().encode(value), java.nio.charset.StandardCharsets.UTF_8); } // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 59f0c09f657416c723fa69b71bd31e0e5922c073..d22210c6aaeed8ac6df296f47a699f2e5b67abf4 100644
|
||||
index ec9877840fafa14adcfc04eacae1786111990a27..98083486bddf60074fc8e47e63e780703a792a7c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -222,6 +222,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -22825,7 +22825,7 @@ index 0000000000000000000000000000000000000000..967ad1186cbc81a76a4958ea99d4eff3
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
index 6902a90ebee993a972404d83ec8c781438351639..aa6d4996e1b9fce21ebf184eefb9d7a92d2a340b 100644
|
||||
index 61b00355b01fb5fb41ff1c02df7724b1af9a5441..4a298c0dc29e31bce79ca845883da1bc23da410d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
@@ -78,7 +78,7 @@ public class ChunkStorage implements AutoCloseable {
|
||||
@ -22841,7 +22841,7 @@ index 6902a90ebee993a972404d83ec8c781438351639..aa6d4996e1b9fce21ebf184eefb9d7a9
|
||||
// CraftBukkit end
|
||||
|
||||
if (i < 1493) {
|
||||
- nbttagcompound = NbtUtils.update(this.fixerUpper, DataFixTypes.CHUNK, nbttagcompound, i, 1493);
|
||||
- nbttagcompound = DataFixTypes.CHUNK.update(this.fixerUpper, nbttagcompound, i, 1493);
|
||||
+ ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, nbttagcompound, i, 1493); // Paper - replace chunk converter
|
||||
if (nbttagcompound.getCompound("Level").getBoolean("hasLegacyStructureData")) {
|
||||
LegacyStructureDataHandler persistentstructurelegacy = this.getLegacyStructureHandler(resourcekey, supplier);
|
||||
@ -22850,66 +22850,66 @@ index 6902a90ebee993a972404d83ec8c781438351639..aa6d4996e1b9fce21ebf184eefb9d7a9
|
||||
// Spigot end
|
||||
|
||||
ChunkStorage.injectDatafixingContext(nbttagcompound, resourcekey, optional);
|
||||
- nbttagcompound = NbtUtils.update(this.fixerUpper, DataFixTypes.CHUNK, nbttagcompound, Math.max(1493, i));
|
||||
- nbttagcompound = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, nbttagcompound, Math.max(1493, i));
|
||||
+ nbttagcompound = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, nbttagcompound, Math.max(1493, i), SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - replace chunk converter
|
||||
if (i < SharedConstants.getCurrentVersion().getWorldVersion()) {
|
||||
nbttagcompound.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
|
||||
if (i < SharedConstants.getCurrentVersion().getDataVersion().getVersion()) {
|
||||
NbtUtils.addCurrentDataVersion(nbttagcompound);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
index dae66dd5dbebc7fd8fc331b1f5f06ec461667830..0ede151943109e81f66875340261d77f67f63c95 100644
|
||||
index d80580574a9e5d1c850270d93807f3a66a9c76f8..2e9519726e5628a13a09f79dff2f5069fe5f2aa9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
@@ -117,7 +117,7 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
@@ -115,7 +115,7 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
|
||||
private CompoundTag upgradeChunkTag(CompoundTag chunkNbt) {
|
||||
int i = getVersion(chunkNbt);
|
||||
- return NbtUtils.update(this.fixerUpper, DataFixTypes.ENTITY_CHUNK, chunkNbt, i);
|
||||
+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - route to new converter system
|
||||
int i = NbtUtils.getDataVersion(chunkNbt, -1);
|
||||
- return DataFixTypes.ENTITY_CHUNK.updateToCurrentVersion(this.fixerUpper, chunkNbt, i);
|
||||
+ return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, net.minecraft.SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - route to new converter system
|
||||
}
|
||||
|
||||
public static int getVersion(CompoundTag chunkNbt) {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
index 6701d07886325e33f45ac894bfaa1c5b91afad9d..5631345dee84001be1053fbf92def683be7a97f5 100644
|
||||
index 08961b2a9684ac54c455002affc6174b0e64b6a5..c6bbf2e695a6b572271c4fde3bea3bddc1dda339 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
@@ -142,7 +142,14 @@ public class SectionStorage<R> implements AutoCloseable {
|
||||
int j = getVersion(dynamic);
|
||||
int k = SharedConstants.getCurrentVersion().getWorldVersion();
|
||||
int k = SharedConstants.getCurrentVersion().getDataVersion().getVersion();
|
||||
boolean bl = j != k;
|
||||
- Dynamic<T> dynamic2 = this.fixerUpper.update(this.type.getType(), dynamic, j, k);
|
||||
- Dynamic<T> dynamic2 = this.type.update(this.fixerUpper, dynamic, j, k);
|
||||
+ // Paper start - route to new converter system
|
||||
+ Dynamic<T> dynamic2;
|
||||
+ if (this.type.getType() == net.minecraft.util.datafix.fixes.References.POI_CHUNK) {
|
||||
+ dynamic2 = new Dynamic<>(dynamic.getOps(), (T)ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.POI_CHUNK, (CompoundTag)dynamic.getValue(), j, k));
|
||||
+ } else {
|
||||
+ dynamic2 = this.fixerUpper.update(this.type.getType(), dynamic, j, k);
|
||||
+ dynamic2 = this.type.update(this.fixerUpper, dynamic, j, k);
|
||||
+ }
|
||||
+ // Paper end - route to new converter system
|
||||
OptionalDynamic<T> optionalDynamic = dynamic2.get("Sections");
|
||||
|
||||
for(int l = this.levelHeightAccessor.getMinSection(); l < this.levelHeightAccessor.getMaxSection(); ++l) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
index 874f7ea643d27eec47d51a10ad472af7e8ec402e..4761aa772bc34dd66547dd4dd561c2e04c3229ad 100644
|
||||
index 15a9736a870055d639d03063c7cf67fd769fff36..ce2393c71dd405cb29509632119a945ade1c1038 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
||||
@@ -116,7 +116,7 @@ public class StructureCheck {
|
||||
@@ -115,7 +115,7 @@ public class StructureCheck {
|
||||
|
||||
CompoundTag compoundTag2;
|
||||
try {
|
||||
- compoundTag2 = NbtUtils.update(this.fixerUpper, DataFixTypes.CHUNK, compoundTag, i);
|
||||
- compoundTag2 = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, compoundTag, i);
|
||||
+ compoundTag2 = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.CHUNK, compoundTag, i, net.minecraft.SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - replace chunk converter
|
||||
} catch (Exception var12) {
|
||||
LOGGER.warn("Failed to partially datafix chunk {}", pos, var12);
|
||||
return StructureCheckResult.CHUNK_LOAD_NEEDED;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 86fb11e9e197357871d603c4f8ce778660d507cf..bf4c895794c2bc2ad65faa128c6fa92cb0656841 100644
|
||||
index a5c67686f7c1be10d31601903e27d24e41cff83e..e0bb30446757045e89b227ff2f0136b371ca64cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -93,7 +93,7 @@ public class PlayerDataStorage {
|
||||
// CraftBukkit end
|
||||
int i = nbttagcompound.contains("DataVersion", 3) ? nbttagcompound.getInt("DataVersion") : -1;
|
||||
int i = NbtUtils.getDataVersion(nbttagcompound, -1);
|
||||
|
||||
- player.load(NbtUtils.update(this.fixerUpper, DataFixTypes.PLAYER, nbttagcompound, i));
|
||||
- player.load(DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, nbttagcompound, i));
|
||||
+ player.load(ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, nbttagcompound, i, net.minecraft.SharedConstants.getCurrentVersion().getWorldVersion())); // Paper - replace player converter
|
||||
}
|
||||
|
@ -4472,7 +4472,7 @@ index 0000000000000000000000000000000000000000..7784d72ddd6db00c674e22759c00c430
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 74d1ae0104e8d0795df50f00317fd860de4f112e..a7feddc31da0870faa3d32a7108282e9e9143180 100644
|
||||
index 941ca1b44c7cac656bdd76c7095887b1c3570aec..30e330cc3a2f51e4ec9555671e3eeb7bb14bdfa3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -55,7 +55,7 @@ public class ChunkHolder {
|
||||
@ -4485,10 +4485,10 @@ index 74d1ae0104e8d0795df50f00317fd860de4f112e..a7feddc31da0870faa3d32a7108282e9
|
||||
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
|
||||
public int oldTicketLevel;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index cb1387a18f4306829c75b07a73195b54dbe63ad0..a07c413f1ee1a1689ca8ca87137cf4992d85c7aa 100644
|
||||
index 091c9e9bdbe4e956386df011ddf01cba42c30da1..578849f64de38dc75cdefeb243422c4c89a5c69c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -131,7 +131,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -134,7 +134,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final LongSet entitiesInLevel;
|
||||
public final ServerLevel level;
|
||||
private final ThreadedLevelLightEngine lightEngine;
|
||||
@ -4820,18 +4820,18 @@ index 0d536d72ac918fbd403397ff369d10143ee9c204..6051e5f272838ef23276a90e21c2fc82
|
||||
public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
|
||||
return new TicketType<>(name, argumentComparator, 0L);
|
||||
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 aa2f76ff47699f23474f2e409ef9b773e48d50b8..5bba39a066ede470cebc92724735c86ecfd4239d 100644
|
||||
index 2cb3463f3d77a32ada67a6251707d741d18910ca..0eb877c80c6492d03681c70f7866ad705a62454e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -726,6 +726,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -751,6 +751,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.emissiveRendering = blockbase_info.emissiveRendering;
|
||||
this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState());
|
||||
this.offsetFunction = blockbase_info.offsetFunction;
|
||||
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
|
||||
+ this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -734,6 +735,18 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -759,6 +760,18 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
return this.shapeExceedsCube;
|
||||
}
|
||||
// Paper end
|
||||
@ -4850,7 +4850,7 @@ index aa2f76ff47699f23474f2e409ef9b773e48d50b8..5bba39a066ede470cebc92724735c86e
|
||||
|
||||
public void initCache() {
|
||||
this.fluidState = ((Block) this.owner).getFluidState(this.asState());
|
||||
@@ -742,6 +755,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@@ -767,6 +780,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState());
|
||||
}
|
||||
this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here
|
||||
@ -5031,7 +5031,7 @@ index 80b98e6667f1a0c21d019c58a8a0d4cc5b0f48e1..8033c8741a0f73919a357893652592b3
|
||||
super(wrapped.getPos(), UpgradeData.EMPTY, wrapped.levelHeightAccessor, wrapped.getLevel().registryAccess().registryOrThrow(Registries.BIOME), wrapped.getBlendingData());
|
||||
this.wrapped = wrapped;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 49f091183111958ebd3fb56964fc5d728c16755c..be181106a223f6bb824ddf58690674617c6dacb5 100644
|
||||
index 8e11ca5e8cc43a27482a1794d843359d7428bdde..2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -93,6 +93,10 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -5059,7 +5059,7 @@ index 49f091183111958ebd3fb56964fc5d728c16755c..be181106a223f6bb824ddf5869067461
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index 240c19f4a7552a01b3c48f1f6413119e4cfc2b67..4843bd864deba357e0a4b2fd844324218af9774f 100644
|
||||
index afba733824d84d650e669eda028bf4d28cf006b4..cd82985b0aa821dccc0484f328407381d58ec81f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -142,7 +142,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
@ -5089,7 +5089,7 @@ index 92a64c49b1c7227a5b34488ea15d3d8adb0f9c80..0b67858f8d6689b34816f9556f3424af
|
||||
this.fluidTicks = fluidTickScheduler;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c02065a485d3b 100644
|
||||
index aa4f2dc63dd79e6c3d7594d2fd63fa0091df5f53..bca8084f7e76d036378705aa802217cc1bfdbc7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -84,6 +84,14 @@ public class ChunkSerializer {
|
||||
@ -5215,9 +5215,9 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c0206
|
||||
+ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = chunk.getSkyNibbles();
|
||||
+ // Paper end - rewrite light impl
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
CompoundTag nbttagcompound = new CompoundTag();
|
||||
CompoundTag nbttagcompound = NbtUtils.addCurrentDataVersion(new CompoundTag());
|
||||
|
||||
@@ -392,11 +437,14 @@ public class ChunkSerializer {
|
||||
@@ -391,11 +436,14 @@ public class ChunkSerializer {
|
||||
for (int i = lightenginethreaded.getMinLightSection(); i < lightenginethreaded.getMaxLightSection(); ++i) {
|
||||
int j = chunk.getSectionIndexFromSectionY(i);
|
||||
boolean flag1 = j >= 0 && j < achunksection.length;
|
||||
@ -5236,7 +5236,7 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c0206
|
||||
|
||||
if (flag1) {
|
||||
LevelChunkSection chunksection = achunksection[j];
|
||||
@@ -411,13 +459,27 @@ public class ChunkSerializer {
|
||||
@@ -410,13 +458,27 @@ public class ChunkSerializer {
|
||||
nbttagcompound1.put("biomes", (Tag) dataresult1.getOrThrow(false, logger1::error));
|
||||
}
|
||||
|
||||
@ -5268,7 +5268,7 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c0206
|
||||
|
||||
if (!nbttagcompound1.isEmpty()) {
|
||||
nbttagcompound1.putByte("Y", (byte) i);
|
||||
@@ -428,7 +490,8 @@ public class ChunkSerializer {
|
||||
@@ -427,7 +489,8 @@ public class ChunkSerializer {
|
||||
|
||||
nbttagcompound.put("sections", nbttaglist);
|
||||
if (flag) {
|
||||
@ -5278,7 +5278,7 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c0206
|
||||
}
|
||||
|
||||
ListTag nbttaglist1 = new ListTag();
|
||||
@@ -503,6 +566,17 @@ public class ChunkSerializer {
|
||||
@@ -502,6 +565,17 @@ public class ChunkSerializer {
|
||||
}));
|
||||
}
|
||||
|
@ -12651,10 +12651,10 @@ index 0000000000000000000000000000000000000000..f597d65d56964297eeeed6c7e7770376
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 2dbaf078e99e3663bd2dbdd3548468192382fae5..463d54c6c808808d3d7fe6d5303be48844bb4444 100644
|
||||
index 95bc21fdb97d41dc1adddfaf3303d41740df9ed6..da13fd2cde9b54ab5bf87fbb4e90b5da47b6b8f2 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -90,6 +90,28 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -92,6 +92,28 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
private int tickCount;
|
||||
private boolean handlingFault;
|
||||
public String hostname = ""; // CraftBukkit - add field
|
||||
@ -12683,7 +12683,7 @@ index 2dbaf078e99e3663bd2dbdd3548468192382fae5..463d54c6c808808d3d7fe6d5303be488
|
||||
|
||||
public Connection(PacketFlow side) {
|
||||
this.receiving = side;
|
||||
@@ -248,6 +270,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -255,6 +277,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
}
|
||||
|
||||
private void flushQueue() {
|
||||
@ -12691,7 +12691,7 @@ index 2dbaf078e99e3663bd2dbdd3548468192382fae5..463d54c6c808808d3d7fe6d5303be488
|
||||
if (this.channel != null && this.channel.isOpen()) {
|
||||
Queue queue = this.queue;
|
||||
|
||||
@@ -260,6 +283,12 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -267,6 +290,12 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
||||
}
|
||||
}
|
||||
@ -12718,10 +12718,10 @@ index a5e438a834826161c52ca9db57d234d9ff80a591..b8bc1b9b8e8a33df90a963f9f9769292
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index cef3b053d79e71eb66eb6bddf9365ed4d7042bae..b04f7240ba96d06ab51199059d29b0faa554b09a 100644
|
||||
index d9f2518a08bc4ae978051be51e467597f9325ecb..26fa789a44a1d934944e78eae21f489213f50ae3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -260,6 +260,7 @@ public class Main {
|
||||
@@ -271,6 +271,7 @@ public class Main {
|
||||
|
||||
convertable_conversionsession.saveDataTag(iregistrycustom_dimension, savedata);
|
||||
*/
|
||||
@ -12730,10 +12730,10 @@ index cef3b053d79e71eb66eb6bddf9365ed4d7042bae..b04f7240ba96d06ab51199059d29b0fa
|
||||
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a8d97786d 100644
|
||||
index 013556d54894dc2914b8cda7a70b9ea142b6668f..d03b0060377cec15de8bf6246a7bf75ce600e879 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -301,7 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
@ -12742,7 +12742,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
((MinecraftServer) atomicreference.get()).runServer();
|
||||
}, "Server thread");
|
||||
|
||||
@@ -582,7 +582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -584,7 +584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.forceDifficulty();
|
||||
for (ServerLevel worldserver : this.getAllLevels()) {
|
||||
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
||||
@ -12751,7 +12751,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
|
||||
@@ -784,6 +784,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -786,6 +786,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public abstract boolean shouldRconBroadcast();
|
||||
|
||||
public boolean saveAllChunks(boolean suppressLogs, boolean flush, boolean force) {
|
||||
@ -12764,7 +12764,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
boolean flag3 = false;
|
||||
|
||||
for (Iterator iterator = this.getAllLevels().iterator(); iterator.hasNext(); flag3 = true) {
|
||||
@@ -792,8 +798,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -794,8 +800,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (!suppressLogs) {
|
||||
MinecraftServer.LOGGER.info("Saving chunks for level '{}'/{}", worldserver, worldserver.dimension().location());
|
||||
}
|
||||
@ -12779,7 +12779,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
}
|
||||
|
||||
// CraftBukkit start - moved to WorldServer.save
|
||||
@@ -812,7 +822,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -814,7 +824,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator1.hasNext()) {
|
||||
ServerLevel worldserver2 = (ServerLevel) iterator1.next();
|
||||
|
||||
@ -12788,7 +12788,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("ThreadedAnvilChunkStorage: All dimensions are saved");
|
||||
@@ -892,36 +902,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -894,36 +904,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -12826,7 +12826,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
|
||||
this.isSaving = false;
|
||||
this.resources.close();
|
||||
@@ -940,7 +921,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -942,7 +923,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getProfileCache().save();
|
||||
}
|
||||
// Spigot end
|
||||
@ -12835,7 +12835,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
}
|
||||
|
||||
public String getLocalIp() {
|
||||
@@ -974,6 +955,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -976,6 +957,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -12869,7 +12869,7 @@ index 2737dfbf4d978f2bb118cb996ea5c6920decab90..e9f4ffec4b659f3300daa0138f6e955a
|
||||
// CraftBukkit start
|
||||
if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken
|
||||
return this.forceTicks || this.runningTask() || Util.getMillis() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTime : this.nextTickTime);
|
||||
@@ -2228,7 +2222,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2256,7 +2250,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isSameThread() {
|
||||
@ -12918,7 +12918,7 @@ index 5e5c4de89784db702256ee765091e929066116e4..8318af4db5fa7242b5cb2ae50fd08174
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index a7feddc31da0870faa3d32a7108282e9e9143180..2ba3bb4e5670ece798a8882801a856d82851c00a 100644
|
||||
index 30e330cc3a2f51e4ec9555671e3eeb7bb14bdfa3..214e0657035f82e5266de06e31975d6b45405019 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -50,17 +50,12 @@ public class ChunkHolder {
|
||||
@ -13471,7 +13471,7 @@ index a7feddc31da0870faa3d32a7108282e9e9143180..2ba3bb4e5670ece798a8882801a856d8
|
||||
public static ChunkStatus getStatus(int level) {
|
||||
return level < 33 ? ChunkStatus.FULL : ChunkStatus.getStatusAroundFullChunk(level - 33);
|
||||
@@ -617,38 +351,14 @@ public class ChunkHolder {
|
||||
return ChunkHolder.FULL_CHUNK_STATUSES[Mth.clamp(33 - distance + 1, (int) 0, ChunkHolder.FULL_CHUNK_STATUSES.length - 1)];
|
||||
return ChunkHolder.FULL_CHUNK_STATUSES[Mth.clamp(33 - distance + 1, 0, ChunkHolder.FULL_CHUNK_STATUSES.length - 1)];
|
||||
}
|
||||
|
||||
- public boolean wasAccessibleSinceLastSave() {
|
||||
@ -13532,10 +13532,10 @@ index a7feddc31da0870faa3d32a7108282e9e9143180..2ba3bb4e5670ece798a8882801a856d8
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed638fb03a9 100644
|
||||
index 578849f64de38dc75cdefeb243422c4c89a5c69c..9246ce9f654ad4db6155b026778a83d4ee79624d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -125,10 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -128,10 +128,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public static final int MAX_VIEW_DISTANCE = 33;
|
||||
public static final int MAX_CHUNK_DISTANCE = 33 + ChunkStatus.maxDistance();
|
||||
public static final int FORCED_TICKET_LEVEL = 31;
|
||||
@ -13547,7 +13547,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
public final ServerLevel level;
|
||||
private final ThreadedLevelLightEngine lightEngine;
|
||||
public final BlockableEventLoop<Runnable> mainThreadExecutor; // Paper - public
|
||||
@@ -137,16 +134,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -140,16 +137,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final ChunkGeneratorStructureState chunkGeneratorState;
|
||||
public final Supplier<DimensionDataStorage> overworldDataStorage;
|
||||
private final PoiManager poiManager;
|
||||
@ -13567,7 +13567,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
private final String storageName;
|
||||
private final PlayerMap playerMap;
|
||||
public final Int2ObjectMap<ChunkMap.TrackedEntity> entityMap;
|
||||
@@ -155,37 +150,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -158,37 +153,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final Queue<Runnable> unloadQueue;
|
||||
int viewDistance;
|
||||
|
||||
@ -13609,7 +13609,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
|
||||
}
|
||||
|
||||
@@ -193,6 +172,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -196,6 +175,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int chunkX = MCUtil.getChunkCoordinate(player.getX());
|
||||
int chunkZ = MCUtil.getChunkCoordinate(player.getZ());
|
||||
// Note: players need to be explicitly added to distance maps before they can be updated
|
||||
@ -13617,7 +13617,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
// Paper end
|
||||
// Paper start
|
||||
@@ -222,16 +202,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -225,16 +205,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) {
|
||||
@ -13636,7 +13636,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
this.tickingGenerated = new AtomicInteger();
|
||||
this.playerMap = new PlayerMap();
|
||||
this.entityMap = new Int2ObjectOpenHashMap();
|
||||
@@ -262,19 +239,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -265,19 +242,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j, world.spigotConfig); // Spigot
|
||||
this.mainThreadExecutor = mainThreadExecutor;
|
||||
@ -13661,7 +13661,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
this.distanceManager = new ChunkMap.ChunkDistanceManager(executor, mainThreadExecutor);
|
||||
this.overworldDataStorage = persistentStateManagerFactory;
|
||||
this.poiManager = new PoiManager(path.resolve("poi"), dataFixer, dsync, iregistrycustom, world);
|
||||
@@ -339,20 +314,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -342,20 +317,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
@Nullable
|
||||
protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
|
||||
@ -13691,7 +13691,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
public String getChunkDebugData(ChunkPos chunkPos) {
|
||||
@@ -389,75 +366,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -392,75 +369,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// Paper end
|
||||
|
||||
private CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> getChunkRangeFuture(ChunkPos centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
|
||||
@ -13768,7 +13768,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
public ReportedException debugFuturesAndCreateReportedException(IllegalStateException exception, String details) {
|
||||
@@ -487,261 +396,72 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -490,261 +399,72 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareEntityTickingChunk(ChunkPos pos) {
|
||||
@ -14050,7 +14050,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
return nbt.contains("Status", 8);
|
||||
}
|
||||
|
||||
@@ -777,45 +497,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -780,45 +500,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkGeneration(ChunkHolder holder, ChunkStatus requiredStatus) {
|
||||
@ -14097,7 +14097,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
protected void releaseLightTicket(ChunkPos pos) {
|
||||
@@ -826,7 +508,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -829,7 +511,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}));
|
||||
}
|
||||
|
||||
@ -14106,7 +14106,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
ChunkStatus chunkstatus1;
|
||||
|
||||
if (distance == 0) {
|
||||
@@ -838,7 +520,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -841,7 +523,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
return chunkstatus1;
|
||||
}
|
||||
|
||||
@ -14115,7 +14115,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
if (!nbt.isEmpty()) {
|
||||
// CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
|
||||
world.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(nbt, world).filter((entity) -> {
|
||||
@@ -860,91 +542,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -863,91 +545,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> protoChunkToFullChunk(ChunkHolder chunkHolder) {
|
||||
@ -14210,7 +14210,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
public int getTickingGenerated() {
|
||||
@@ -952,94 +558,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -955,94 +561,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
private boolean saveChunkIfNeeded(ChunkHolder chunkHolder) {
|
||||
@ -14311,9 +14311,9 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
+ }
|
||||
+ // Paper end - replace player loader system
|
||||
public void setViewDistance(int watchDistance) {
|
||||
int j = Mth.clamp(watchDistance + 1, (int) 3, (int) 33);
|
||||
int j = Mth.clamp(watchDistance + 1, 3, 33);
|
||||
|
||||
@@ -1047,33 +581,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1050,33 +584,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int k = this.viewDistance;
|
||||
|
||||
this.viewDistance = j;
|
||||
@ -14350,7 +14350,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
|
||||
if (chunk != null) {
|
||||
this.playerLoadedChunk(player, packet, chunk);
|
||||
@@ -1103,30 +622,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1106,30 +625,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
void dumpChunks(Writer writer) throws IOException {
|
||||
@ -14382,7 +14382,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
private static String printFuture(CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> future) {
|
||||
@@ -1145,6 +641,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1148,6 +644,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
}
|
||||
|
||||
@ -14418,7 +14418,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
|
||||
return this.read(chunkPos).thenApplyAsync((optional) -> {
|
||||
return optional.map((nbttagcompound) -> this.upgradeChunkTag(nbttagcompound, chunkPos)); // CraftBukkit
|
||||
@@ -1248,15 +773,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1251,15 +776,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
this.removePlayerFromDistanceMaps(player); // Paper - distance maps
|
||||
}
|
||||
|
||||
@ -14435,7 +14435,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
|
||||
}
|
||||
|
||||
@@ -1264,7 +781,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1267,7 +784,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
SectionPos sectionposition = SectionPos.of((EntityAccess) player);
|
||||
|
||||
player.setLastSectionPos(sectionposition);
|
||||
@ -14444,7 +14444,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
return sectionposition;
|
||||
}
|
||||
|
||||
@@ -1319,65 +836,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1322,65 +839,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
int k1;
|
||||
int l1;
|
||||
|
||||
@ -14530,7 +14530,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
public void addEntity(Entity entity) {
|
||||
@@ -1595,7 +1085,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1608,7 +1098,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
|
||||
@Override
|
||||
protected boolean isChunkToRemove(long pos) {
|
||||
@ -14539,7 +14539,7 @@ index a07c413f1ee1a1689ca8ca87137cf4992d85c7aa..3c5b6231dc6f3dcc275e032d03989ed6
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1676,7 +1166,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1689,7 +1179,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
|
||||
if (player != this.entity) {
|
||||
Vec3 vec3d = player.position().subtract(this.entity.position());
|
||||
@ -15327,10 +15327,10 @@ index 28c8a3ba1caddf0ea334a6ef43cae25f982743e4..80d108ae7faf3fdcb024931e93032215
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2bc046948 100644
|
||||
index f2798373e7d07cc0e46c39297c29e7be364a8dff..fb7930009db2c219347e6601ca2cde0c8601e2b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -193,7 +193,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -191,7 +191,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private final MinecraftServer server;
|
||||
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
||||
final EntityTickList entityTickList;
|
||||
@ -15339,7 +15339,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
private final GameEventDispatcher gameEventDispatcher;
|
||||
public boolean noSave;
|
||||
private final SleepStatus sleepStatus;
|
||||
@@ -318,7 +318,108 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -316,7 +316,108 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -15509,7 +15509,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
}
|
||||
|
||||
protected void tickTime() {
|
||||
@@ -995,6 +1102,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -994,6 +1101,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void save(@Nullable ProgressListener progressListener, boolean flush, boolean savingDisabled) {
|
||||
@ -15521,7 +15521,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
ServerChunkCache chunkproviderserver = this.getChunkSource();
|
||||
|
||||
if (!savingDisabled) {
|
||||
@@ -1010,16 +1122,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1009,16 +1121,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
timings.worldSaveChunks.startTiming(); // Paper
|
||||
@ -15542,7 +15542,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
ServerLevel worldserver1 = this;
|
||||
@@ -1155,7 +1264,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1154,7 +1263,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.removePlayerImmediately((ServerPlayer) entity, Entity.RemovalReason.DISCARDED);
|
||||
}
|
||||
|
||||
@ -15551,7 +15551,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1171,7 +1280,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1170,7 +1279,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -15560,7 +15560,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1183,10 +1292,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1182,10 +1291,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public boolean tryAddFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
||||
// CraftBukkit end
|
||||
Stream<UUID> stream = entity.getSelfAndPassengers().map(Entity::getUUID); // CraftBukkit - decompile error
|
||||
@ -15574,7 +15574,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
return false;
|
||||
} else {
|
||||
this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit
|
||||
@@ -1706,7 +1815,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1705,7 +1814,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -15583,7 +15583,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "block_entity_tickers: %d\n", this.blockEntityTickers.size()));
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count()));
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count()));
|
||||
@@ -1755,7 +1864,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1754,7 +1863,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BufferedWriter bufferedwriter2 = Files.newBufferedWriter(path1);
|
||||
|
||||
try {
|
||||
@ -15592,7 +15592,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
} catch (Throwable throwable4) {
|
||||
if (bufferedwriter2 != null) {
|
||||
try {
|
||||
@@ -1776,7 +1885,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1775,7 +1884,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BufferedWriter bufferedwriter3 = Files.newBufferedWriter(path2);
|
||||
|
||||
try {
|
||||
@ -15601,7 +15601,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
} catch (Throwable throwable6) {
|
||||
if (bufferedwriter3 != null) {
|
||||
try {
|
||||
@@ -1918,7 +2027,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1917,7 +2026,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@VisibleForTesting
|
||||
public String getWatchdogStats() {
|
||||
@ -15610,7 +15610,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
||||
}), this.blockEntityTickers.size(), ServerLevel.getTypeCount(this.blockEntityTickers, TickingBlockEntity::getType), this.getBlockTicks().count(), this.getFluidTicks().count(), this.gatherChunkSourceStats());
|
||||
}
|
||||
@@ -1978,15 +2087,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1977,15 +2086,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Override
|
||||
public LevelEntityGetter<Entity> getEntities() {
|
||||
org.spigotmc.AsyncCatcher.catchOp("Chunk getEntities call"); // Spigot
|
||||
@ -15629,7 +15629,7 @@ index 6f81aa6b0a835bf10e0d5f2b32fe9fb2dbb60400..3fce997cc390136a16c941f0461b20d2
|
||||
}
|
||||
|
||||
public void startTickingChunk(LevelChunk chunk) {
|
||||
@@ -2002,34 +2111,49 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2001,34 +2110,49 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
super.close();
|
||||
@ -15922,10 +15922,10 @@ index e96a0ca47e4701ba187555bd92c968345bc85677..73b96f804079288e9c5fcc11da54e61e
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 526a8ffa7761a013e4db24e983d716fdf529b755..fe315458cead06c3f01473e84b050dadb5ad2726 100644
|
||||
index c1980d00c622c32e7fdbd2a6fa487ba61020e7b5..504f3ddca160797a13a39bc813eb12322359ce50 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -776,6 +776,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -778,6 +778,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.disconnect(Component.translatable("disconnect.spam"));
|
||||
return;
|
||||
}
|
||||
@ -15940,10 +15940,10 @@ index 526a8ffa7761a013e4db24e983d716fdf529b755..fe315458cead06c3f01473e84b050dad
|
||||
StringReader stringreader = new StringReader(packet.getCommand());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 5f8498ac372a34549519264f612e7554addb41d9..8a75650f1e1b8a223723ece379beab0eb8f17ce9 100644
|
||||
index 470e752234813d1031721be95d0bf1178e423a59..23edaa206ef8f9ca9ecea0fdd7f0b58ed9fa3a12 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -251,7 +251,7 @@ public abstract class PlayerList {
|
||||
@@ -252,7 +252,7 @@ public abstract class PlayerList {
|
||||
boolean flag1 = gamerules.getBoolean(GameRules.RULE_REDUCEDDEBUGINFO);
|
||||
|
||||
// Spigot - view distance
|
||||
@ -15952,7 +15952,7 @@ index 5f8498ac372a34549519264f612e7554addb41d9..8a75650f1e1b8a223723ece379beab0e
|
||||
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
|
||||
playerconnection.send(new ClientboundUpdateEnabledFeaturesPacket(FeatureFlags.REGISTRY.toNames(worldserver1.enabledFeatures())));
|
||||
playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName())));
|
||||
@@ -783,8 +783,8 @@ public abstract class PlayerList {
|
||||
@@ -790,8 +790,8 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
LevelData worlddata = worldserver1.getLevelData();
|
||||
entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), (byte) i, entityplayer1.getLastDeathLocation()));
|
||||
@ -15963,7 +15963,7 @@ index 5f8498ac372a34549519264f612e7554addb41d9..8a75650f1e1b8a223723ece379beab0e
|
||||
entityplayer1.spawnIn(worldserver1);
|
||||
entityplayer1.unsetRemoved();
|
||||
entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot()));
|
||||
@@ -1281,7 +1281,7 @@ public abstract class PlayerList {
|
||||
@@ -1287,7 +1287,7 @@ public abstract class PlayerList {
|
||||
|
||||
public void setViewDistance(int viewDistance) {
|
||||
this.viewDistance = viewDistance;
|
||||
@ -15972,7 +15972,7 @@ index 5f8498ac372a34549519264f612e7554addb41d9..8a75650f1e1b8a223723ece379beab0e
|
||||
Iterator iterator = this.server.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1296,7 +1296,7 @@ public abstract class PlayerList {
|
||||
@@ -1302,7 +1302,7 @@ public abstract class PlayerList {
|
||||
|
||||
public void setSimulationDistance(int simulationDistance) {
|
||||
this.simulationDistance = simulationDistance;
|
||||
@ -16060,7 +16060,7 @@ index ca788f0dcec4a117b410fe8348969e056b138b1e..4f5f2c25e12ee6d977bc98d9118650cf
|
||||
public boolean remove(Object object) {
|
||||
int i = this.findIndex((T)object);
|
||||
diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
index 7de38549f08b9639f1e76256f12e10e8fa658c16..759b125cc1251b9b4f1f443c9f70c482ef5b32f8 100644
|
||||
index 12e72ad737b1219fcdf88d344d41621d9fd5feec..e0bfeebeaac1aaea64bc07cdfdf7790e3e43ca7b 100644
|
||||
--- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
+++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
@@ -186,7 +186,11 @@ public class WorldUpgrader {
|
||||
@ -16076,10 +16076,10 @@ index 7de38549f08b9639f1e76256f12e10e8fa658c16..759b125cc1251b9b4f1f443c9f70c482
|
||||
if (flag1) {
|
||||
++this.converted;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad425ab64d 100644
|
||||
index f215204e1dd6fb3b805a60a268dae10f786b5171..969fbf3959733200b1dfb98a8520465e358018c5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -319,6 +319,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -322,6 +322,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -16138,7 +16138,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
this.passengers = ImmutableList.of();
|
||||
@@ -2121,11 +2173,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2136,11 +2188,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
@ -16152,7 +16152,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3389,6 +3441,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3436,6 +3488,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
};
|
||||
}
|
||||
|
||||
@ -16169,7 +16169,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
public boolean hasExactlyOnePlayerPassenger() {
|
||||
return this.getIndirectPassengersStream().filter((entity) -> {
|
||||
return entity instanceof Player;
|
||||
@@ -3697,6 +3759,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3763,6 +3825,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public final void setPosRaw(double x, double y, double z) {
|
||||
@ -16182,7 +16182,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||
this.position = new Vec3(x, y, z);
|
||||
int i = Mth.floor(x);
|
||||
@@ -3792,6 +3860,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3870,6 +3938,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
@Override
|
||||
public final void setRemoved(Entity.RemovalReason reason) {
|
||||
@ -16196,7 +16196,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
if (this.removalReason == null) {
|
||||
this.removalReason = reason;
|
||||
}
|
||||
@@ -3800,7 +3875,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3878,7 +3953,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.stopRiding();
|
||||
}
|
||||
|
||||
@ -16205,7 +16205,7 @@ index 23b22543c3d164e3fdf2f262f3e0124636b32fce..0cd735648314872e98e310627247b9ad
|
||||
this.levelCallback.onRemove(reason);
|
||||
}
|
||||
|
||||
@@ -3815,7 +3890,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3893,7 +3968,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
|
||||
@Override
|
||||
public boolean shouldBeSaved() {
|
||||
@ -16477,10 +16477,10 @@ index 127c4ebedb94631ceac92dbdcd465e904217d715..be6e3e21ad62da01e5e2dd78e300cbc8
|
||||
|
||||
<T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06f47ffe3b 100644
|
||||
index 69f55f7207b8c03ca886947c57c9d13a8e8eb576..0517c0932b79db1a0e27673654ae8bb5fd740425 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -454,6 +454,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -460,6 +460,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && (this.isClientSide || chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(ChunkHolder.FullChunkStatus.TICKING)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement
|
||||
this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
|
||||
@ -16492,7 +16492,7 @@ index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06
|
||||
}
|
||||
|
||||
if ((i & 1) != 0) {
|
||||
@@ -806,7 +811,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -812,7 +817,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return this.capturedTileEntities.get(blockposition);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -16501,7 +16501,7 @@ index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06
|
||||
}
|
||||
|
||||
public void setBlockEntity(BlockEntity blockEntity) {
|
||||
@@ -897,26 +902,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -903,26 +908,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||
this.getProfiler().incrementCounter("getEntities");
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
@ -16529,7 +16529,7 @@ index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -934,34 +920,23 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -940,34 +926,23 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
|
||||
this.getProfiler().incrementCounter("getEntities");
|
||||
@ -16580,7 +16580,7 @@ index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1294,4 +1269,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1305,4 +1280,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
private ExplosionInteraction() {}
|
||||
}
|
||||
@ -16627,7 +16627,7 @@ index ddb876d9494fa72ba2cb49dbfb8d5e61410d1d2a..5ed57b1156b1f358fb7d1d876becfc06
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index ab358cfc606ad24c8f3a49da4294ecc6a1d22630..2d89c415fe4e76bff51374d50f1a7efbaace134e 100644
|
||||
index 8bb14230beb4b012f38997eec70934b96bae4db5..5ca3987683f7cecbce24bac434dc387bb5e9bf08 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -114,7 +114,7 @@ public abstract class ChunkGenerator {
|
||||
@ -16702,7 +16702,7 @@ index e2278ed457a7342d0d1b1a5fc1b5bdef6358816b..71df7c590e31932f2b8fc26a2afaaa54
|
||||
|
||||
public int getIndex() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index be181106a223f6bb824ddf58690674617c6dacb5..8c2b562e46a35369389da453012b7af570145380 100644
|
||||
index 2753e2a1991ec39f03c2a81f3262f94f0e3fe9a7..b696638d63998c6dde6df700fd5c9244ffedb505 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -183,6 +183,43 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -16886,7 +16886,7 @@ index be181106a223f6bb824ddf58690674617c6dacb5..8c2b562e46a35369389da453012b7af5
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -804,7 +924,10 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -816,7 +936,10 @@ public class LevelChunk extends ChunkAccess {
|
||||
});
|
||||
}
|
||||
|
||||
@ -16897,7 +16897,7 @@ index be181106a223f6bb824ddf58690674617c6dacb5..8c2b562e46a35369389da453012b7af5
|
||||
ChunkPos chunkcoordintpair = this.getPos();
|
||||
|
||||
for (int i = 0; i < this.postProcessing.length; ++i) {
|
||||
@@ -842,6 +965,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -854,6 +977,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
this.pendingBlockEntities.clear();
|
||||
this.upgradeData.upgrade(this);
|
||||
@ -16909,7 +16909,7 @@ index be181106a223f6bb824ddf58690674617c6dacb5..8c2b562e46a35369389da453012b7af5
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -891,7 +1019,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -903,7 +1031,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
|
||||
public ChunkHolder.FullChunkStatus getFullStatus() {
|
||||
@ -16919,7 +16919,7 @@ index be181106a223f6bb824ddf58690674617c6dacb5..8c2b562e46a35369389da453012b7af5
|
||||
|
||||
public void setFullStatus(Supplier<ChunkHolder.FullChunkStatus> levelTypeProvider) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index a3c14a470ac7055abd00ac6f4f1c02065a485d3b..b8cf01fbfc3293bf78b1094a90da3594fa2067b4 100644
|
||||
index bca8084f7e76d036378705aa802217cc1bfdbc7d..f9dd2d9312297a727344d43150c5cab74128cbca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -94,7 +94,31 @@ public class ChunkSerializer {
|
||||
@ -17028,7 +17028,7 @@ index a3c14a470ac7055abd00ac6f4f1c02065a485d3b..b8cf01fbfc3293bf78b1094a90da3594
|
||||
// Paper start - rewrite light impl
|
||||
final int minSection = io.papermc.paper.util.WorldUtil.getMinLightSection(world);
|
||||
final int maxSection = io.papermc.paper.util.WorldUtil.getMaxLightSection(world);
|
||||
@@ -394,7 +457,7 @@ public class ChunkSerializer {
|
||||
@@ -393,7 +456,7 @@ public class ChunkSerializer {
|
||||
nbttagcompound.putInt("xPos", chunkcoordintpair.x);
|
||||
nbttagcompound.putInt("yPos", chunk.getMinSection());
|
||||
nbttagcompound.putInt("zPos", chunkcoordintpair.z);
|
||||
@ -17037,7 +17037,7 @@ index a3c14a470ac7055abd00ac6f4f1c02065a485d3b..b8cf01fbfc3293bf78b1094a90da3594
|
||||
nbttagcompound.putLong("InhabitedTime", chunk.getInhabitedTime());
|
||||
nbttagcompound.putString("Status", chunk.getStatus().getName());
|
||||
BlendingData blendingdata = chunk.getBlendingData();
|
||||
@@ -494,8 +557,17 @@ public class ChunkSerializer {
|
||||
@@ -493,8 +556,17 @@ public class ChunkSerializer {
|
||||
nbttagcompound.putBoolean("isLightOn", false); // Paper - set to false but still store, this allows us to detect --eraseCache (as eraseCache _removes_)
|
||||
}
|
||||
|
||||
@ -17057,7 +17057,7 @@ index a3c14a470ac7055abd00ac6f4f1c02065a485d3b..b8cf01fbfc3293bf78b1094a90da3594
|
||||
|
||||
CompoundTag nbttagcompound2;
|
||||
|
||||
@@ -532,7 +604,14 @@ public class ChunkSerializer {
|
||||
@@ -531,7 +603,14 @@ public class ChunkSerializer {
|
||||
nbttagcompound.put("CarvingMasks", nbttagcompound2);
|
||||
}
|
||||
|
||||
@ -17073,7 +17073,7 @@ index a3c14a470ac7055abd00ac6f4f1c02065a485d3b..b8cf01fbfc3293bf78b1094a90da3594
|
||||
CompoundTag nbttagcompound3 = new CompoundTag();
|
||||
Iterator iterator1 = chunk.getHeightmaps().iterator();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
index aa6d4996e1b9fce21ebf184eefb9d7a92d2a340b..c3305cb49741523724ff7b3c9254a0df2cf3d6c6 100644
|
||||
index 4a298c0dc29e31bce79ca845883da1bc23da410d..35115f79825035ff28bdffa26ad4127fec8d05c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
|
||||
@@ -28,26 +28,33 @@ import net.minecraft.world.level.storage.DimensionDataStorage;
|
||||
@ -17201,10 +17201,10 @@ index aa6d4996e1b9fce21ebf184eefb9d7a92d2a340b..c3305cb49741523724ff7b3c9254a0df
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1031ff6af 100644
|
||||
index 2e9519726e5628a13a09f79dff2f5069fe5f2aa9..340e2f789d3cacb5b87839e13f476149bc47583f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
@@ -31,43 +31,31 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
@@ -30,43 +30,31 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
private static final String ENTITIES_TAG = "Entities";
|
||||
private static final String POSITION_TAG = "Position";
|
||||
public final ServerLevel level;
|
||||
@ -17261,7 +17261,7 @@ index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1
|
||||
int[] is = chunkNbt.getIntArray("Position");
|
||||
return new ChunkPos(is[0], is[1]);
|
||||
}
|
||||
@@ -82,40 +70,68 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
@@ -81,45 +69,75 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
|
||||
@Override
|
||||
public void storeEntities(ChunkEntities<Entity> dataList) {
|
||||
@ -17286,8 +17286,7 @@ index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1
|
||||
- }
|
||||
-
|
||||
- });
|
||||
- CompoundTag compoundTag = new CompoundTag();
|
||||
- compoundTag.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
|
||||
- CompoundTag compoundTag = NbtUtils.addCurrentDataVersion(new CompoundTag());
|
||||
- compoundTag.put("Entities", listTag);
|
||||
- writeChunkPos(compoundTag, chunkPos);
|
||||
- this.worker.store(chunkPos, compoundTag).exceptionally((ex) -> {
|
||||
@ -17321,6 +17320,7 @@ index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1
|
||||
+ if (!force && entities.isEmpty()) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ ListTag listTag = new ListTag();
|
||||
+ entities.forEach((entity) -> { // diff here: use entities parameter
|
||||
+ CompoundTag compoundTag = new CompoundTag();
|
||||
@ -17329,10 +17329,10 @@ index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1
|
||||
+ }
|
||||
+
|
||||
+ });
|
||||
+ CompoundTag compoundTag = new CompoundTag();
|
||||
+ compoundTag.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
|
||||
+ CompoundTag compoundTag = NbtUtils.addCurrentDataVersion(new CompoundTag());
|
||||
+ compoundTag.put("Entities", listTag);
|
||||
+ writeChunkPos(compoundTag, chunkPos);
|
||||
+ // Paper - remove worker usage
|
||||
+
|
||||
+ return !force && listTag.isEmpty() ? null : compoundTag;
|
||||
+ }
|
||||
@ -17347,10 +17347,9 @@ index 0ede151943109e81f66875340261d77f67f63c95..0b92db95416b878f41b83b5c74d1c0a1
|
||||
|
||||
- private CompoundTag upgradeChunkTag(CompoundTag chunkNbt) {
|
||||
+ public static CompoundTag upgradeChunkTag(CompoundTag chunkNbt) { // Paper - public and static
|
||||
int i = getVersion(chunkNbt);
|
||||
return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - route to new converter system
|
||||
int i = NbtUtils.getDataVersion(chunkNbt, -1);
|
||||
return ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.ENTITY_CHUNK, chunkNbt, i, net.minecraft.SharedConstants.getCurrentVersion().getWorldVersion()); // Paper - route to new converter system
|
||||
}
|
||||
@@ -126,6 +142,6 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
@ -17521,7 +17520,7 @@ index b9b50c56e79297bb824a92355f437a5d4d7e6760..18ef7025f7f4dc2a4aff85ca65ff5a2d
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
index 5631345dee84001be1053fbf92def683be7a97f5..c396076bfb1d41cc0f8248d6f3aa4fc3f7d1c998 100644
|
||||
index c6bbf2e695a6b572271c4fde3bea3bddc1dda339..fc5901a257ffd6ec878d1acbf97b9e6be664c52e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java
|
||||
@@ -34,27 +34,28 @@ import net.minecraft.world.level.ChunkPos;
|
||||
@ -17697,7 +17696,7 @@ index 2830d32bba3dc85847e3a5d9b4d98f822e34b606..4cdfc433df67afcd455422e9baf56f16
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
index e6c22cf9a682a88b271a78d8ca0b312c91a60177..cdc87f14e5d6336856c74d5089e50ae5ebad9923 100644
|
||||
index ea4e005e4d394490f45ebf626d2229f7b4624294..4f3387d1b128bc98614cfabfb5306781bdcd93be 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -87,7 +87,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
|
||||
@ -17854,10 +17853,10 @@ index 738d3ce38a42ff8cd53eec042ef8bc74f2b8d059..a895c81ea6af0822c8371ae93cfe4b72
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4c99b64945068ec335228301b4ebdb7b933879fb..d6f858ee1245b313024c36ac2a0edd09b9307bca 100644
|
||||
index 36c1fd2987843d74b6f8f5711e77d67565f25c5b..cfae708f784546be04e4cedbc707c7b35aa40a46 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1129,7 +1129,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1124,7 +1124,7 @@ public final class CraftServer implements Server {
|
||||
this.console.addLevel(internal);
|
||||
|
||||
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
||||
@ -17866,7 +17865,7 @@ index 4c99b64945068ec335228301b4ebdb7b933879fb..d6f858ee1245b313024c36ac2a0edd09
|
||||
|
||||
this.pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
|
||||
return internal.getWorld();
|
||||
@@ -1173,7 +1173,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1168,7 +1168,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
handle.getChunkSource().close(save);
|
||||
@ -17875,7 +17874,7 @@ index 4c99b64945068ec335228301b4ebdb7b933879fb..d6f858ee1245b313024c36ac2a0edd09
|
||||
handle.convertable.close();
|
||||
} catch (Exception ex) {
|
||||
this.getLogger().log(Level.SEVERE, null, ex);
|
||||
@@ -1988,7 +1988,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1987,7 +1987,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
@ -17885,7 +17884,7 @@ index 4c99b64945068ec335228301b4ebdb7b933879fb..d6f858ee1245b313024c36ac2a0edd09
|
||||
|
||||
// Paper start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index fd1da8431578832bcd1f3ca7890dd2150b916ebd..958c5faeddd3ee54ac2880eb3eb9e4ab2bba2540 100644
|
||||
index 253f965e52cd488af88d55cdd09f1bad0ddbeb56..30137f60a3796cf845e8fd7bd3c291be979b8b0c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -313,10 +313,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -18004,10 +18003,10 @@ index fd1da8431578832bcd1f3ca7890dd2150b916ebd..958c5faeddd3ee54ac2880eb3eb9e4ab
|
||||
// Spigot start
|
||||
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ef1a0db17276178717b83a6d081a9e111d34e4e5..92e5b781049122e3de3784ec4197557f2730b3b3 100644
|
||||
index 12e7a0a24fe2aa6e7af97ad7d50d81e5c7b26663..d60dc99e2b926847f42a32e9d093a31556d179d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -176,6 +176,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -177,6 +177,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.firstPlayed = System.currentTimeMillis();
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d6f858ee1245b313024c36ac2a0edd09b9307bca..d82e0dd38ef2b32d82e906d5bc71b46052eb0625 100644
|
||||
index cfae708f784546be04e4cedbc707c7b35aa40a46..b9eae8760a642ab5a38980787dde045a3c08046d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -420,6 +420,35 @@ public final class CraftServer implements Server {
|
||||
@@ -415,6 +415,35 @@ public final class CraftServer implements Server {
|
||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||
}
|
||||
|
||||
@ -47,10 +47,10 @@ index d6f858ee1245b313024c36ac2a0edd09b9307bca..d82e0dd38ef2b32d82e906d5bc71b460
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 481c1f853bbe81da123cfb3f79ed4509cf127db8..985aae207e23584519b4c096f2aaaf0e80b6c163 100644
|
||||
index 6569c9db3fa026ee4fbfaceac0e4f6a15c1fbe16..0cbabd6ffc7bbc9494c1a0d631567fae828fb045 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -149,6 +149,12 @@ public class Main {
|
||||
@@ -159,6 +159,12 @@ public class Main {
|
||||
.ofType(File.class)
|
||||
.defaultsTo(new File("paper.yml"))
|
||||
.describedAs("Yml file");
|
@ -65,10 +65,10 @@ index 0d05ad9c0b5043e58d639041cfe3fb7a27f373a3..a5d391af2c6b733d653188f4aeeec2af
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
index ea052e4a5e5cb23609129fd08869bcd38f675cd0..7f137f43f725cd2866e10f0ade40d4906b64fac1 100644
|
||||
index 812813180b7022107ebb09d51ebfd1315d6f8085..f5c21d510351ea8ff76d89fe859f187a3106cc30 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
@@ -55,7 +55,7 @@ public class CactusBlock extends Block {
|
||||
@@ -54,7 +54,7 @@ public class CactusBlock extends Block {
|
||||
;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index f0cb2fa768adf1ffe68a00457d39a7749899ac6b..9d0df8d64a2cfd2458295a214829f277798030f0 100644
|
||||
index 5a5086e2d819c2172ea4d0c43bd9a5543da6ae87..d9a01dbd9bcdf634b906b369222e6e7ba90dc7c5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -86,6 +86,10 @@ public class FishingHook extends Projectile {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump and take water damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 10949455cc92ed6cb537fd7f148714c7ade4e360..c4b28340d62a89d6f896357c93fd933fe6cd934b 100644
|
||||
index a290487b153a66a3e936ed1183f3c2ce343e59b1..8dea6df3456fd37095400711c94b0d0866988745 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -110,6 +110,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
private final BodyRotationControl bodyRotationControl;
|
||||
protected PathNavigation navigation;
|
||||
public GoalSelector goalSelector;
|
||||
@ -16,7 +16,7 @@ index 10949455cc92ed6cb537fd7f148714c7ade4e360..c4b28340d62a89d6f896357c93fd933f
|
||||
public GoalSelector targetSelector;
|
||||
@Nullable
|
||||
private LivingEntity target;
|
||||
@@ -836,7 +837,17 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -865,7 +866,17 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@Override
|
||||
protected final void serverAiStep() {
|
||||
++this.noActionTime;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable despawn distances for living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c4b28340d62a89d6f896357c93fd933fe6cd934b..99218eac34374a4d13451cfec15006c3bf0d755f 100644
|
||||
index 8dea6df3456fd37095400711c94b0d0866988745..f74e1788692c3f9b291e6ba5043944a3179b97e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -812,14 +812,14 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -841,14 +841,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow for toggling of spawn chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 5ed57b1156b1f358fb7d1d876becfc06f47ffe3b..4b2aadae3a7595a5aee2bc71216adc34fa0f2cf9 100644
|
||||
index 0517c0932b79db1a0e27673654ae8bb5fd740425..0ce746ac2f448191854f6faa4e1876d869d8d38d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -256,6 +256,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -262,6 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
});
|
||||
// CraftBukkit end
|
||||
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
@ -6,10 +6,10 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index c186ea200e196ff97a9bbe78d4e550ccba2d40ac..c125564cfca5c4a616e11b334a9ec7929ebea496 100644
|
||||
index 7726bef38c7b9a81fd82960143fd07db18960087..88ea09b2f1c33e9fb528aad1564ae858c3c8b064 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -139,6 +139,17 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -140,6 +140,17 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
@ -28,10 +28,10 @@ index c186ea200e196ff97a9bbe78d4e550ccba2d40ac..c125564cfca5c4a616e11b334a9ec792
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index dd3eee50509f5388e78e0908e83925c43ab20628..43ec4bc45a3e553fbbf47aaf613f6e0aad2319cf 100644
|
||||
index 6999fa7217a76e1e41c96b8522a2e210a7e6e4cf..c133d51a363900164c1492359be5b1579806d5cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -65,6 +65,12 @@ public class PrimedTnt extends Entity {
|
||||
@@ -66,6 +66,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
@ -45,10 +45,10 @@ index dd3eee50509f5388e78e0908e83925c43ab20628..43ec4bc45a3e553fbbf47aaf613f6e0a
|
||||
if (this.onGround) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
index db40c7a11dba6450ac9c1107b226aff5858867c9..3e2407e00e56b8648bc6b084ba016ddccf40a53b 100644
|
||||
index 5b8574af6eae84a5957e4ce6acd4e9722835a320..accfb39539aea045e0c741a74b8bd50c752d326c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
@@ -52,6 +52,12 @@ public class MinecartTNT extends AbstractMinecart {
|
||||
@@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart {
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.fuse > 0) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e9f4ffec4b659f3300daa0138f6e955a8d97786d..e2e66fd4bd34e0ceaab350214a50ddbb1dc76184 100644
|
||||
index d03b0060377cec15de8bf6246a7bf75ce600e879..23181f54828410d78cae56fed226bea5de4be5ff 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1433,7 +1433,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1460,7 +1460,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@ -19,10 +19,10 @@ index e9f4ffec4b659f3300daa0138f6e955a8d97786d..e2e66fd4bd34e0ceaab350214a50ddbb
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d82e0dd38ef2b32d82e906d5bc71b46052eb0625..e5aa25abee4d4c5447920e64ad45acf9763dedf0 100644
|
||||
index b9eae8760a642ab5a38980787dde045a3c08046d..fbc62e2b07a430dea8a827790bda5fbf6f19d05b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -259,7 +259,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -254,7 +254,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@ -32,11 +32,11 @@ index d82e0dd38ef2b32d82e906d5bc71b46052eb0625..e5aa25abee4d4c5447920e64ad45acf9
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 985aae207e23584519b4c096f2aaaf0e80b6c163..49f6d20706e8fb94c41834f5addcd015d18acd7e 100644
|
||||
index 0cbabd6ffc7bbc9494c1a0d631567fae828fb045..2d1df61cc7ec645add8f729cc6cfdea0c56755aa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -223,12 +223,25 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
@@ -233,12 +233,25 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..351159bbdb0c8045f4983f54dee34430
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index d22210c6aaeed8ac6df296f47a699f2e5b67abf4..289276ae40409868c6293c5ab3bafe54c2ccf15c 100644
|
||||
index 98083486bddf60074fc8e47e63e780703a792a7c..976a8d9019cccd82d8f5cd2cf86202e4076753ed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -455,6 +455,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -21,10 +21,10 @@ index 5c3b11f738c1ea19981cc878aa6c2323497391a0..6fd874a83a248e6a7d427d18d11fc608
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 99218eac34374a4d13451cfec15006c3bf0d755f..bb7c459c126be789bb12d08a569fe344e08914b8 100644
|
||||
index f74e1788692c3f9b291e6ba5043944a3179b97e1..eee466e718f52329f8200ff830f5f1e44cda3e7e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -808,7 +808,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@@ -837,7 +837,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
if (this.level.getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
|
||||
this.discard();
|
||||
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||
@ -47,7 +47,7 @@ index e368478dba01a9b11adf23ed64bed61c73a78a28..17fda4857f74d2994525262472700e77
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
index 87f66fd33e404367d924137b2d8aac3b06937f43..2dcda3b03796655da443e1b3dd68c6f6bca20d21 100644
|
||||
index b5ee60c62cf1b8c59fdd7c8e6934321453015fd6..23ded94c7c7e4f96951e281efff499f1c61ec5c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
|
||||
@@ -127,7 +127,7 @@ public class Silverfish extends Monster {
|
||||
@ -73,13 +73,13 @@ index 8ea60d388fff4a6368652ff96f648e5880053a2b..8ecbb64f9db9346757c5597404489496
|
||||
entityzombie.finalizeSpawn(worldserver, this.level.getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null);
|
||||
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 47b5ef810348f8c702acb09b280b41b6b7227b6f..60fb74537fdc96005cbf6aa1670e773c0faa2f26 100644
|
||||
index f15c717b255a71906ab39644449a172efbaf2d3d..8726d50841da43729f076a2b0a9645ecea2a3f3a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -179,6 +179,9 @@ public abstract class Player extends LivingEntity {
|
||||
private Optional<GlobalPos> lastDeathLocation;
|
||||
@@ -182,6 +182,9 @@ public abstract class Player extends LivingEntity {
|
||||
@Nullable
|
||||
public FishingHook fishing;
|
||||
protected float hurtDir;
|
||||
+ // Paper start
|
||||
+ public boolean affectsSpawning = true;
|
||||
+ // Paper end
|
||||
@ -87,7 +87,7 @@ index 47b5ef810348f8c702acb09b280b41b6b7227b6f..60fb74537fdc96005cbf6aa1670e773c
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index f035206f2f59cb293d503c638ff06333a797a7a9..3e83bff81a0656d5e1d079ad9e63c7d27561c8e3 100644
|
||||
index 776dfbf3b33317370db3b50b8bbb95823344ee06..7b60c13cbe3d2a0d0657391a7b6be4e3706720fa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -54,7 +54,7 @@ public abstract class BaseSpawner {
|
||||
@ -137,10 +137,10 @@ index be6e3e21ad62da01e5e2dd78e300cbc8efdbeb42..ea98625fe7c00743b8df74a24e6d4b75
|
||||
for(Player player : this.players()) {
|
||||
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 92e5b781049122e3de3784ec4197557f2730b3b3..eecfbd4e835bfc3d98194365e360a827fb02bb38 100644
|
||||
index d60dc99e2b926847f42a32e9d093a31556d179d8..aa8f41ac360592a37306e439c85dda81acaaa6dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2113,8 +2113,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2187,8 +2187,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@Override
|
||||
public String getLocale() {
|
||||
return this.getHandle().locale;
|
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
|
||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e2e66fd4bd34e0ceaab350214a50ddbb1dc76184..ac81428f19e2d445f315000d34173c2d650a9aeb 100644
|
||||
index 23181f54828410d78cae56fed226bea5de4be5ff..19d7a4da730cf260407d6216b8dbba958ec8f84c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -281,7 +281,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
@ -24,7 +24,7 @@ index e2e66fd4bd34e0ceaab350214a50ddbb1dc76184..ac81428f19e2d445f315000d34173c2d
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public Commands vanillaCommandDispatcher;
|
||||
@@ -290,7 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -293,7 +293,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
||||
@ -33,7 +33,7 @@ index e2e66fd4bd34e0ceaab350214a50ddbb1dc76184..ac81428f19e2d445f315000d34173c2d
|
||||
public final double[] recentTps = new double[ 3 ];
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@@ -953,6 +953,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -955,6 +955,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
@ -145,10 +145,10 @@ index e2e66fd4bd34e0ceaab350214a50ddbb1dc76184..ac81428f19e2d445f315000d34173c2d
|
||||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e5aa25abee4d4c5447920e64ad45acf9763dedf0..babde3ac7af9b5659bcc7e0298d1d77e7b2d60e2 100644
|
||||
index fbc62e2b07a430dea8a827790bda5fbf6f19d05b..07536b696f734fb9e8d0abe1f414ae536610f9ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2418,6 +2418,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2416,6 +2416,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index eecfbd4e835bfc3d98194365e360a827fb02bb38..27f4387a3ac750114c99e41e855c8fb8081a507d 100644
|
||||
index aa8f41ac360592a37306e439c85dda81acaaa6dc..e232d0efc0615017d1d64680ff2ad1de9dcc2bee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1782,12 +1782,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1856,12 +1856,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setFlying(boolean value) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3fce997cc390136a16c941f0461b20d2bc046948..b1771e25c13b555d3316aca35f8a97ed4ce8f275 100644
|
||||
index fb7930009db2c219347e6601ca2cde0c8601e2b4..26cc626ad0c5328c20f7ef20e8e270c9a3c22dc4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2215,6 +2215,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2214,6 +2214,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.valid = true; // CraftBukkit
|
||||
@ -25,10 +25,10 @@ index 3fce997cc390136a16c941f0461b20d2bc046948..b1771e25c13b555d3316aca35f8a97ed
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 0cd735648314872e98e310627247b9ad425ab64d..5cf04b209ae3fa6c52ad45e726343418d0de311f 100644
|
||||
index 969fbf3959733200b1dfb98a8520465e358018c5..3cc8426283f68db0a4cbda6934aa6bfde7663e42 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -304,7 +304,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -307,7 +307,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
@ -56,7 +56,7 @@ index 0cd735648314872e98e310627247b9ad425ab64d..5cf04b209ae3fa6c52ad45e726343418
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -1928,6 +1948,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1942,6 +1962,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bukkitEntity.storeBukkitValues(nbt);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -72,7 +72,7 @@ index 0cd735648314872e98e310627247b9ad425ab64d..5cf04b209ae3fa6c52ad45e726343418
|
||||
return nbt;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2054,6 +2083,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2069,6 +2098,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -94,10 +94,10 @@ index 0cd735648314872e98e310627247b9ad425ab64d..5cf04b209ae3fa6c52ad45e726343418
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index c125564cfca5c4a616e11b334a9ec7929ebea496..561b8d6fcf4d511fb026bcc2c02054e56589d0b7 100644
|
||||
index 88ea09b2f1c33e9fb528aad1564ae858c3c8b064..5e93e55df24941a21721295ef8a3381ae19e1f26 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -339,6 +339,14 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -340,6 +340,14 @@ public class FallingBlockEntity extends Entity {
|
||||
this.blockState = Blocks.SAND.defaultBlockState();
|
||||
}
|
||||
|
||||
@ -113,10 +113,10 @@ index c125564cfca5c4a616e11b334a9ec7929ebea496..561b8d6fcf4d511fb026bcc2c02054e5
|
||||
|
||||
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 43ec4bc45a3e553fbbf47aaf613f6e0aad2319cf..aa0dfd08aefbb9363ec96080432f0f75d71b0b95 100644
|
||||
index c133d51a363900164c1492359be5b1579806d5cb..ab5817df2c98d24ee627fd5cf1f71e40b044e43e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -117,6 +117,14 @@ public class PrimedTnt extends Entity {
|
||||
@@ -118,6 +118,14 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
@Override
|
||||
protected void readAdditionalSaveData(CompoundTag nbt) {
|
||||
this.setFuse(nbt.getShort("Fuse"));
|
||||
@ -132,10 +132,10 @@ index 43ec4bc45a3e553fbbf47aaf613f6e0aad2319cf..aa0dfd08aefbb9363ec96080432f0f75
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 55bf95017d58bb61f9c6af27335c88421c74c4aa..62c2780b165a520e85f17fdf5c0d1c29b7579ebc 100644
|
||||
index 17c914088b467007aada17e3b2238a9c76fb532b..7a3ae4daa0f1f8dd2dd200fbfa1010f70f4b1f91 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1217,5 +1217,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1252,5 +1252,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
return ret;
|
||||
}
|
Loading…
Reference in New Issue
Block a user