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

* change workflow

* apply some patches

* set experimental to true

* some compile fixes

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@5d3463aa Updated Upstream (Paper)

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@5d3463aa Updated Upstream (Paper)

* remove data converter for 1.21.6; move clumps to unapplied

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

* Update upstream

* Update upstream

* update to 1.21.6-pre4

* update patches

* fix compile

* set readme version to 1.21.6

* Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@439f15db Updated Upstream (Paper)
PurpurMC/Purpur@46a28b93 [ci/skip] update version in README
This commit is contained in:
Artem Ostrasev
2025-06-18 17:36:28 +03:00
committed by GitHub
parent c75a1915bc
commit 109c57a637
83 changed files with 648 additions and 33108 deletions

View File

@@ -58,7 +58,7 @@ For anything else you can refer to our [contribution guide](https://bxteam.org/d
<dependency>
<groupId>org.bxteam.divinemc</groupId>
<artifactId>divinemc-api</artifactId>
<version>1.21.5-R0.1-SNAPSHOT</version>
<version>1.21.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -71,11 +71,11 @@ repositories {
```
```kotlin
dependencies {
compileOnly("org.bxteam.divinemc:divinemc-api:1.21.5-R0.1-SNAPSHOT")
compileOnly("org.bxteam.divinemc:divinemc-api:1.21.6-R0.1-SNAPSHOT")
}
```
We also have a [Javadoc](https://repo.bxteam.org/javadoc/snapshots/org/bxteam/divinemc/divinemc-api/1.21.5-R0.1-SNAPSHOT/raw/index.html) for the API.
We also have a [Javadoc](https://repo.bxteam.org/javadoc/snapshots/org/bxteam/divinemc/divinemc-api/1.21.6-R0.1-SNAPSHOT/raw/index.html) for the API.
## ⚖️ License
DivineMC is licensed under the GNU General Public License v3.0. You can find the license [here](LICENSE).

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Extend Location API
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
index 20e30fa5a33c68a4dec12e51a6b81f4afbda35b5..8b71277d3cab283eeab43df3e4dc4fb4fbad2388 100644
index 47f667ccc86086d27d8649dd01f5867610556c60..3f8ca9dfcf695f52393af117f14d8b0586fb6cfa 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -1253,4 +1253,170 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
@@ -1271,4 +1271,170 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
public @NotNull Location toLocation(@NotNull World world) {
return new Location(world, this.x(), this.y(), this.z(), this.getYaw(), this.getPitch());
}

View File

@@ -7,7 +7,7 @@
- static final Color[] colors = {
+ public static final Color[] colors = { // DivineMC - Pufferfish SIMD - make public
// Start generate - MapPalette#colors
// @GeneratedFrom 1.21.5
// @GeneratedFrom 1.21.6-rc1
new Color(0x00000000, true),
@@ -395,9 +_,15 @@
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());

View File

@@ -1,14 +1,14 @@
--- a/purpur-server/build.gradle.kts
+++ b/purpur-server/build.gradle.kts
@@ -13,6 +_,7 @@
@@ -14,6 +_,7 @@
}
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/"
+val bxTeamMavenPublicUrl = "https://repo.bxteam.org/snapshots/"
dependencies {
mache("io.papermc:mache:1.21.5+build.2")
@@ -30,6 +_,7 @@
mache("io.papermc:mache:1.21.6+build.1")
@@ -27,6 +_,7 @@
// Purpur start - Rebrand
val purpur = forks.register("purpur") {
@@ -16,7 +16,7 @@
upstream.patchDir("paperServer") {
upstreamPath = "paper-server"
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
@@ -37,9 +_,27 @@
@@ -34,9 +_,27 @@
outputDir = rootDirectory.dir("paper-server")
}
}
@@ -43,9 +43,9 @@
+ // DivineMC end - Rebrand
+
spigot {
enabled = false
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
packageVersion = "v1_21_R4" // also needs to be updated in MappingEnvironment
@@ -62,6 +_,7 @@
@@ -60,6 +_,7 @@
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
@@ -53,7 +53,7 @@
)
}
@@ -125,10 +_,18 @@
@@ -123,10 +_,18 @@
main {
java { srcDir("../paper-server/src/main/java") }
resources { srcDir("../paper-server/src/main/resources") }
@@ -72,7 +72,7 @@
}
}
val log4jPlugins = sourceSets.create("log4jPlugins") {
@@ -156,10 +_,23 @@
@@ -154,10 +_,23 @@
}
dependencies {
@@ -99,7 +99,7 @@
implementation("net.minecrell:terminalconsoleappender:1.3.0")
implementation("net.kyori:adventure-text-serializer-ansi:4.21.0") // Keep in sync with adventureVersion from Paper-API build file
runtimeConfiguration(sourceSets.main.map { it.runtimeClasspath })
@@ -170,16 +_,16 @@
@@ -168,16 +_,16 @@
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/
@@ -120,7 +120,7 @@
implementation("org.ow2.asm:asm-commons:9.8")
implementation("org.spongepowered:configurate-yaml:4.2.0-20250225.064233-199")
implementation("org.spongepowered:configurate-core:4.2.0-20250225.064233-204") // Pinned dependency of above pinned yaml snapshot.
@@ -191,24 +_,31 @@
@@ -189,24 +_,31 @@
// Deps that were previously in the API but have now been moved here for backwards compat, eventually to be removed
runtimeOnly("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.49.1.0")
@@ -160,7 +160,7 @@
implementation("net.neoforged:srgutils:1.0.9") // Mappings handling
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins
@@ -224,30 +_,42 @@
@@ -222,30 +_,42 @@
implementation("me.lucko:spark-paper:1.10.133-20250413.112336-1")
}

View File

@@ -18,10 +18,10 @@ index 394443d00e661715439be1e56dddc129947699a4..480ad57a6b7b74e6b83e9c6ceb69ea1f
public CrashReport(String title, Throwable exception) {
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(exception); // Paper
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 71d28092e0c3fe6e3ab284263f657eb12ba9dc60..4e347f56c98283485f7e279322c19f899e6fd569 100644
index fb4301ccd4fb3643e19c477293946f536b0f7741..e26a053c598c33fd32b305235284ef6600a59752 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1180,6 +1180,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1182,6 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
protected void runServer() {
try {

View File

@@ -7,21 +7,21 @@ Original license: GPLv3
Original project: https://github.com/plasmoapp/matter
diff --git a/net/minecraft/server/commands/SeedCommand.java b/net/minecraft/server/commands/SeedCommand.java
index a65affc41a4fc299bc2281f0f53f2e075633899d..552b9e7973c7c22100fbdfe9821f162ea032c975 100644
index 7c1e18d8362be5ae885c32b05e98b9ef45942d93..a414de3768972157d3031222fd160556d9b99bf4 100644
--- a/net/minecraft/server/commands/SeedCommand.java
+++ b/net/minecraft/server/commands/SeedCommand.java
@@ -12,6 +12,17 @@ public class SeedCommand {
long seed = context.getSource().getLevel().getSeed();
long seed = commandContext.getSource().getLevel().getSeed();
Component component = ComponentUtils.copyOnClickText(String.valueOf(seed));
context.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false);
commandContext.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false);
+
+ // DivineMC start - Implement Secure Seed
+ if (org.bxteam.divinemc.config.DivineConfig.MiscCategory.enableSecureSeed) {
+ su.plo.matter.Globals.setupGlobals(context.getSource().getLevel());
+ su.plo.matter.Globals.setupGlobals(commandContext.getSource().getLevel());
+ String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed);
+ Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr);
+
+ context.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false);
+ commandContext.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false);
+ }
+ // DivineMC end - Implement Secure Seed
+
@@ -29,10 +29,10 @@ index a65affc41a4fc299bc2281f0f53f2e075633899d..552b9e7973c7c22100fbdfe9821f162e
}));
}
diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 5748658abf0b90812005ae9d426df92daf5532f0..8849a04b10517ff2de12a9df212ac90ff4882401 100644
index b286dc17cda16fca3af9374d2a4a8bd137c24450..b42ad5b411af2a52daac040347647fa37460022b 100644
--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -114,7 +114,17 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
@@ -116,7 +116,17 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
String string = this.get("level-seed", "");
boolean flag = this.get("generate-structures", true);
long l = WorldOptions.parseSeed(string).orElse(WorldOptions.randomSeed());
@@ -52,7 +52,7 @@ index 5748658abf0b90812005ae9d426df92daf5532f0..8849a04b10517ff2de12a9df212ac90f
this.get("generator-settings", property -> GsonHelper.parse(!property.isEmpty() ? property : "{}"), new JsonObject()),
this.get("level-type", property -> property.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString())
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
index f5d4f439c3346cc158043ada02094257ff05a06e..4d4139b5f42a4db6e22bf1d063a23dc7b9914f85 100644
index 25150731bb3f3d04b248ebc47fc9b453e49a705e..75c8ce32e68f92e20201e9c243f46f2be716eac8 100644
--- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -619,6 +619,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -64,10 +64,10 @@ index f5d4f439c3346cc158043ada02094257ff05a06e..4d4139b5f42a4db6e22bf1d063a23dc7
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index e139b875314686f252127db11536abd7a58ba0f5..c1730d2a27d290e43ebe3c7d6919cdcd3203b920 100644
index 5f2c27800f047f128857044493a6d9325ffd759b..9dcb9e5ecc31fcc3fc7547a47ec98d2689698769 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -624,6 +624,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -627,6 +627,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkGenerator, gen);
}
// CraftBukkit end
@@ -76,10 +76,10 @@ index e139b875314686f252127db11536abd7a58ba0f5..c1730d2a27d290e43ebe3c7d6919cdcd
DataFixer fixerUpper = server.getFixerUpper();
// Paper - rewrite chunk system
diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java
index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..5109762794adb8f62ae27b6c52dc9057cf0af077 100644
index b299fc08fe900b4d48ce3e6986bcea000253053e..4dc68a03f607cacbf7f1bf9c08a4cbc1edf86ace 100644
--- a/net/minecraft/world/entity/monster/Slime.java
+++ b/net/minecraft/world/entity/monster/Slime.java
@@ -412,7 +412,11 @@ public class Slime extends Mob implements Enemy {
@@ -413,7 +413,11 @@ public class Slime extends Mob implements Enemy {
}
ChunkPos chunkPos = new ChunkPos(pos);
@@ -93,10 +93,10 @@ index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..5109762794adb8f62ae27b6c52dc9057
final double maxHeightSlimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.slimeChunk.maximum;
if (random.nextInt(10) == 0 && flag && pos.getY() < maxHeightSlimeChunk) {
diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java
index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..42458418e6217adba28f729f04904814542eaa17 100644
index 182c14b660f8860bed627eed4e01fd4002153e9a..5e9f3856c384dbb2bd462121b903cd2b326e4376 100644
--- a/net/minecraft/world/level/chunk/ChunkAccess.java
+++ b/net/minecraft/world/level/chunk/ChunkAccess.java
@@ -82,6 +82,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
@@ -83,6 +83,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
public final Map<BlockPos, BlockEntity> blockEntities = new Object2ObjectOpenHashMap<>();
protected final LevelHeightAccessor levelHeightAccessor;
protected final LevelChunkSection[] sections;
@@ -107,7 +107,7 @@ index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..42458418e6217adba28f729f04904814
// CraftBukkit start - SPIGOT-6814: move to IChunkAccess to account for 1.17 to 1.18 chunk upgrading.
private static final org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry();
public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(ChunkAccess.DATA_TYPE_REGISTRY);
@@ -191,6 +195,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
@@ -192,6 +196,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
return GameEventListenerRegistry.NOOP;
}

View File

@@ -282,20 +282,20 @@ index 4f9f3367b1ca3903df03a80fa2b01a3d24e6e77d..87f218cbeda68d2996a354afabb8be70
+ // DivineMC end - async path processing
}
diff --git a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
index d8f532c5e68ff4dff933556c4f981e9474c044e6..37f3d3888ea2a862d006cf2b201f9715bcb8ce1e 100644
index 73bba480f3f017a8aed14562bd82ba33db04391c..b31976b68eec3cd0ab0620a487e99ecd49f78186 100644
--- a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
+++ b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java
@@ -56,7 +56,7 @@ public abstract class DoorInteractGoal extends Goal {
@@ -54,7 +54,7 @@ public abstract class DoorInteractGoal extends Goal {
return false;
} else {
GroundPathNavigation groundPathNavigation = (GroundPathNavigation)this.mob.getNavigation();
Path path = groundPathNavigation.getPath();
Path path = this.mob.getNavigation().getPath();
- if (path != null && !path.isDone()) {
+ if (path != null && path.isProcessed() && !path.isDone()) { // DivineMC - async path processing
+ if (path != null && path.isProcessed() && !path.isDone()) { // DivineMC - Async Pathfinding
for (int i = 0; i < Math.min(path.getNextNodeIndex() + 2, path.getNodeCount()); i++) {
Node node = path.getNode(i);
this.doorPos = new BlockPos(node.x, node.y + 1, node.z);
diff --git a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
index 66a02fe7594522ef391d67e09856bf3f70fe597d..dfb8f72a83dfe27b1f9a036f2cad3f4c9a7f15b4 100644
index 458ceec68ca138b0aa9b70d6c934473c01d468f4..62e385f40294c2343ce0a3deb95229057539503b 100644
--- a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java
@@ -12,9 +12,25 @@ public class AmphibiousPathNavigation extends PathNavigation {
@@ -325,7 +325,7 @@ index 66a02fe7594522ef391d67e09856bf3f70fe597d..dfb8f72a83dfe27b1f9a036f2cad3f4c
}
diff --git a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..c3ce8516338d458d20e6848fd63bedaf70bea222 100644
index 077863b758fbc3e51f25bcf842d00a2cc07c6a2f..4b2cc7fa8848b6cb15cc82090bf37bcdd16f098a 100644
--- a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java
@@ -16,9 +16,25 @@ public class FlyingPathNavigation extends PathNavigation {
@@ -363,7 +363,7 @@ index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..c3ce8516338d458d20e6848fd63bedaf
if (!this.isDone()) {
if (this.canUpdatePath()) {
diff --git a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..a8a3d48e9f2f31ec0a20a4b7c547a9590865d807 100644
index 86fccf3617a32f3791b03d8067e2eaf6b8d8bebb..2c26d30a7373c6ac8ead22894b63a8d6529ba1f2 100644
--- a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
@@ -24,9 +24,25 @@ public class GroundPathNavigation extends PathNavigation {
@@ -393,7 +393,7 @@ index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..a8a3d48e9f2f31ec0a20a4b7c547a959
}
diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..c01c1633eedee3ecd5e1eb667808d364d7b6fe4c 100644
index c8e4ccb96a0f162c780066cf4f61b970b49b7703..0b5f1f1e24c8c0468875d709c6b81798882600a0 100644
--- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -167,6 +167,10 @@ public abstract class PathNavigation {
@@ -478,7 +478,7 @@ index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..c01c1633eedee3ecd5e1eb667808d364
Vec3 vec3 = new Vec3((endNode.x + this.mob.getX()) / 2.0, (endNode.y + this.mob.getY()) / 2.0, (endNode.z + this.mob.getZ()) / 2.0);
return pos.closerToCenterThan(vec3, this.path.getNodeCount() - this.path.getNextNodeIndex());
diff --git a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
index 2979846853898d78a2df19df2287da16dbe4ae71..0979e11a1c01927496184918f3a1923f175c7478 100644
index ea0f6a19e4a79538e68917ba86cbc98be4dbca8d..2c9c16d30ae55e86e00d3b97447c870a66ac8f6e 100644
--- a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java
@@ -15,11 +15,27 @@ public class WaterBoundPathNavigation extends PathNavigation {
@@ -557,10 +557,10 @@ index 1f96fd5085bacb4c584576c7cb9f51e7898e9b03..e56869b8c700bfd9fa25f7b7db8663c4
+ // DivineMC end - async pathfinding
}
diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java
index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..a0294937487bfd13f26a5e7eb2bd21f29aa7c229 100644
index ca5651f15552f91fba650747d28a75c00fa11442..c5883758d11e91f96b4139b3bd8586a8b3e26b73 100644
--- a/net/minecraft/world/entity/animal/Bee.java
+++ b/net/minecraft/world/entity/animal/Bee.java
@@ -936,7 +936,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -937,7 +937,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
} else {
Bee.this.pathfindRandomlyTowards(Bee.this.hivePos);
}
@@ -569,7 +569,7 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..a0294937487bfd13f26a5e7eb2bd21f2
boolean flag = this.pathfindDirectlyTowards(Bee.this.hivePos);
if (!flag) {
this.dropAndBlacklistHive();
@@ -990,7 +990,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@@ -991,7 +991,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
return true;
} else {
Path path = Bee.this.navigation.getPath();
@@ -579,10 +579,10 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..a0294937487bfd13f26a5e7eb2bd21f2
}
}
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
index eb3aa96b2a5cb553b016744863818186d1d831c4..433233f3fb346c15627cf0ad313ea55579826d86 100644
index c6e4966d3e4fdb7c91577fc1693fb66930b4f3dc..81f0e444ccb6962d675e3a097341683d504d0889 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -482,6 +482,17 @@ public class Frog extends Animal {
@@ -483,6 +483,17 @@ public class Frog extends Animal {
super(mob, level);
}
@@ -600,7 +600,7 @@ index eb3aa96b2a5cb553b016744863818186d1d831c4..433233f3fb346c15627cf0ad313ea555
@Override
public boolean canCutCorner(PathType pathType) {
return pathType != PathType.WATER_BORDER && super.canCutCorner(pathType);
@@ -490,6 +501,11 @@ public class Frog extends Animal {
@@ -491,6 +502,11 @@ public class Frog extends Animal {
@Override
protected PathFinder createPathFinder(int maxVisitedNodes) {
this.nodeEvaluator = new Frog.FrogNodeEvaluator(true);
@@ -613,10 +613,10 @@ index eb3aa96b2a5cb553b016744863818186d1d831c4..433233f3fb346c15627cf0ad313ea555
}
}
diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java
index b85d1e196d2bf61ac4896205afb08eba89c4397e..ea90e3d7ad84e301f975ff91fade63c5429972cf 100644
index 2e6d0f035a01277aa28bbe912d5df8dc4cf04547..edcb20935f58e78fa4ef2c11a7dcc6a7857341c2 100644
--- a/net/minecraft/world/entity/monster/Drowned.java
+++ b/net/minecraft/world/entity/monster/Drowned.java
@@ -313,7 +313,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -308,7 +308,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
protected boolean closeToNextPos() {
Path path = this.getNavigation().getPath();
@@ -656,10 +656,10 @@ index fe31c4a45afd61be8b74efe9d0858ccd0aced075..859c41c3c81b3d3ac05eebdc83c959d1
}
diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java
index 60a8d79306755e9483ba9e93a07939b73ad717fe..39b9dc1e78c1f9fc6a5ccad0de56cdb6d0781a05 100644
index 021aa51da04bea01b0e827390ce1690af7092b8f..0440cbbc0d6657f32dc37a1dbbe9ee78f8e229cf 100644
--- a/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
@@ -578,6 +578,16 @@ public class Warden extends Monster implements VibrationSystem {
@@ -574,6 +574,16 @@ public class Warden extends Monster implements VibrationSystem {
@Override
protected PathFinder createPathFinder(int maxVisitedNodes) {
this.nodeEvaluator = new WalkNodeEvaluator();

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Async locate command
diff --git a/net/minecraft/server/commands/LocateCommand.java b/net/minecraft/server/commands/LocateCommand.java
index 2723d5377567241921fef61952e474c1c0ee9bbf..ee9f84b33a34b5b9d7c3f8928c958c298f780a03 100644
index a734b2597c3491db35d9660e169f8e8b6320900b..1692724f5406a22702f185f66073dd5e836ce7f8 100644
--- a/net/minecraft/server/commands/LocateCommand.java
+++ b/net/minecraft/server/commands/LocateCommand.java
@@ -103,44 +103,77 @@ public class LocateCommand {
@@ -100,44 +100,77 @@ public class LocateCommand {
}
private static int locateStructure(CommandSourceStack source, ResourceOrTagKeyArgument.Result<Structure> structure) throws CommandSyntaxException {
@@ -118,7 +118,7 @@ index 2723d5377567241921fef61952e474c1c0ee9bbf..ee9f84b33a34b5b9d7c3f8928c958c29
}
public static int showLocateResult(
@@ -195,7 +228,7 @@ public class LocateCommand {
@@ -192,7 +225,7 @@ public class LocateCommand {
.withHoverEvent(new HoverEvent.ShowText(Component.translatable("chat.coordinates.tooltip")))
);
source.sendSuccess(() -> Component.translatable(translationKey, elementName, component, i), false);

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Multithreaded Tracker
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
index 02a9ef1694c796584c29430d27f0a09047368835..d1148be69ffc03973f097ab421ee59c6999b6e84 100644
index f3bac0906d8a1c5dea7b0dee13c5cd6fdbbcae49..c2c52fa8cd05a1b3487976cced210352a9026980 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
@@ -340,7 +340,11 @@ public final class RegionizedPlayerChunkLoader {
@@ -22,7 +22,7 @@ index 02a9ef1694c796584c29430d27f0a09047368835..d1148be69ffc03973f097ab421ee59c6
private static final byte CHUNK_TICKET_STAGE_NONE = 0;
private static final byte CHUNK_TICKET_STAGE_LOADING = 1;
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
index b28d19b2fcdff9250e95db05f6e428db54a771e6..5ab3c01d81522caace541bcf96fd6d2e9b49a8c9 100644
index edda52a8430386238be4963e8ea2406f0c2d4df3..687af4f52dc3ae5564079b6782b63a4277c43439 100644
--- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java
@@ -1013,6 +1013,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -169,10 +169,10 @@ index f106373ef3ac4a8685c2939c9e8361688a285913..b844b6dd89bc53b74c0d1bdbf4657c11
public boolean visible = true;
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
index b118e91f1e0b5a8b8c0b2a4a32faabc5a34a5954..19214d03a149e62b02ead0c9a1de8e99087de357 100644
index e96d4dee14c05f2fa329bfb1588ec795d4e3d730..fa0fd2a7f15a076ac981f85f4f249a15a4ab512e 100644
--- a/net/minecraft/server/level/ServerEntity.java
+++ b/net/minecraft/server/level/ServerEntity.java
@@ -423,12 +423,13 @@ public class ServerEntity {
@@ -417,12 +417,13 @@ public class ServerEntity {
if (this.entity instanceof LivingEntity) {
Set<AttributeInstance> attributesToSync = ((LivingEntity)this.entity).getAttributes().getAttributesToSync();
if (!attributesToSync.isEmpty()) {
@@ -189,10 +189,10 @@ index b118e91f1e0b5a8b8c0b2a4a32faabc5a34a5954..19214d03a149e62b02ead0c9a1de8e99
attributesToSync.clear();
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index c1730d2a27d290e43ebe3c7d6919cdcd3203b920..2f69b1e05ef258d6b28ee912167b8a5bb83fc703 100644
index 9dcb9e5ecc31fcc3fc7547a47ec98d2689698769..dda62ab1d718d22e24ed5c88674d7a3d9dd4323e 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -2481,7 +2481,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2504,7 +2504,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public LevelEntityGetter<Entity> getEntities() {
@@ -201,7 +201,7 @@ index c1730d2a27d290e43ebe3c7d6919cdcd3203b920..2f69b1e05ef258d6b28ee912167b8a5b
return this.moonrise$getEntityLookup(); // Paper - rewrite chunk system
}
@@ -2717,7 +2717,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2771,7 +2771,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
map.carriedByPlayers.remove(player);
@@ -211,10 +211,10 @@ index c1730d2a27d290e43ebe3c7d6919cdcd3203b920..2f69b1e05ef258d6b28ee912167b8a5b
}
}
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 9aedd605330bd8e2049482fb5507898901e8350a..32053aaa7b2a9c582615e47b13dbe99e98e61337 100644
index 5c8489b6cecf83c087d648ae2c10243ec0b4b614..e1e5e9d49439355d5f52a90e308cbad3ad74b41f 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1884,7 +1884,7 @@ public class ServerGamePacketListenerImpl
@@ -1917,7 +1917,7 @@ public class ServerGamePacketListenerImpl
}
public void internalTeleport(PositionMoveRotation posMoveRotation, Set<Relative> relatives) {
@@ -224,10 +224,10 @@ index 9aedd605330bd8e2049482fb5507898901e8350a..32053aaa7b2a9c582615e47b13dbe99e
if (this.player.isRemoved()) {
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java
index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..f133dd8b4fe6f7428f096d5780019609ae179a3f 100644
index 42ad600c6a5cb20e1d820f169f6a1a17ef3a5195..2ce6697a0bd2a094bbfdd0e2a9c7665e14837d40 100644
--- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java
+++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java
@@ -26,8 +26,11 @@ public class AttributeInstance {
@@ -22,8 +22,11 @@ public class AttributeInstance {
private final Map<AttributeModifier.Operation, Map<ResourceLocation, AttributeModifier>> modifiersByOperation = Maps.newEnumMap(
AttributeModifier.Operation.class
);
@@ -242,10 +242,10 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..f133dd8b4fe6f7428f096d5780019609
private boolean dirty = true;
private double cachedValue;
diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
index 23576e631ad4a12ec3ff3630be253738534588f3..66e0f892c9832f2ed65d5f147020d18ab32c8ce7 100644
index 7dd8c1c8e27410854ce1ee90defc607c2710b5a2..de647aa4eee2d9af2d2c5d1cde3a8a836d4f7e48 100644
--- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java
+++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
@@ -14,9 +14,12 @@ import net.minecraft.nbt.ListTag;
@@ -14,9 +14,12 @@ import net.minecraft.core.Holder;
import net.minecraft.resources.ResourceLocation;
public class AttributeMap {

View File

@@ -25,7 +25,7 @@ index 5fb382be4d86328690c49f2a5a0c3ec698a38e21..f333d9028f315e7912dd335c8158abd5
public static Transformation identity() {
diff --git a/net/minecraft/core/MappedRegistry.java b/net/minecraft/core/MappedRegistry.java
index 761e583a56b1c4a605b0cbb04b61c4df60b8b9bb..c07155589ef44cbbacafe03b36d2cd4cdcba3fd2 100644
index 4715a60760c2c9079313db9016000bfb5c65e070..fce8f1caca81f47f704bc0237147e9999cc5732c 100644
--- a/net/minecraft/core/MappedRegistry.java
+++ b/net/minecraft/core/MappedRegistry.java
@@ -33,10 +33,12 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
@@ -46,10 +46,10 @@ index 761e583a56b1c4a605b0cbb04b61c4df60b8b9bb..c07155589ef44cbbacafe03b36d2cd4c
private final Map<TagKey<T>, HolderSet.Named<T>> frozenTags = new IdentityHashMap<>();
MappedRegistry.TagSet<T> allTags = MappedRegistry.TagSet.unbound();
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
index 00a82873d226f113278632a53c0faca420dd67d4..b28829f9f4c084a8dba35219dae9f4a9f293c416 100644
index 1014ab2aeb5e496124c99c938538e88d75561cd5..343ec870d6ea3e2792f369c4867a3afb4bcfa385 100644
--- a/net/minecraft/network/Connection.java
+++ b/net/minecraft/network/Connection.java
@@ -610,13 +610,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -600,13 +600,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
if (!(this.packetListener instanceof net.minecraft.server.network.ServerLoginPacketListenerImpl loginPacketListener)
|| loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.VERIFYING
|| Connection.joinAttemptsThisTick++ < MAX_PER_TICK) {
@@ -193,10 +193,10 @@ index bee90335677f7d8b01589ce5cfd81a40fd422886..a5e488d14fd2016ee188b114d0e68156
public record Positioned(ChunkPos center, int viewDistance) implements ChunkTrackingView {
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 2f69b1e05ef258d6b28ee912167b8a5bb83fc703..6ed2d1aeab17941b67019d45734da46efc53ffdf 100644
index dda62ab1d718d22e24ed5c88674d7a3d9dd4323e..d0d97e063acf8f11c32adf1fd2ec6bca59913c33 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -1312,13 +1312,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1321,13 +1321,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Paper end - log detailed entity tick information
public void tickNonPassenger(Entity entity) {
@@ -210,7 +210,7 @@ index 2f69b1e05ef258d6b28ee912167b8a5bb83fc703..6ed2d1aeab17941b67019d45734da46e
entity.setOldPosAndRot();
entity.tickCount++;
entity.totalEntityAge++; // Paper - age-like counter for all entities
@@ -1331,13 +1325,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1340,13 +1334,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
for (Entity entity1 : entity.getPassengers()) {
this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
}
@@ -328,7 +328,7 @@ index f28fbf81a417a678726d3f77b3999054676d522e..7ff32b1f93b31fafd13f4e0857d14d85
Arrays.fill(this.byId, null);
this.nextId = 0;
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
index ab3a221c115992d0f4ea921aa92cf0976b815ff4..076a931341da486162f289a5f19d3d6736df7768 100644
index e2602c6d817794616eb05a471077447804b835a1..d5a9fd918621708c5bcbf56e33513a6765122d1c 100644
--- a/net/minecraft/util/Mth.java
+++ b/net/minecraft/util/Mth.java
@@ -46,11 +46,11 @@ public class Mth {
@@ -465,10 +465,10 @@ index a18240418a19a95147341a634527d774f3d5bb92..66f74ad2a194a6676574da2932cf4677
public DebugSampleSubscriptionTracker(PlayerList playerList) {
this.playerList = playerList;
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0535b51d6 100644
index d608ffc59dd6d9883db3f12b80cc11c7d8ded745..b4fc7ad2f353e8fbaf2179df2750c9a1c8ac9aba 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -149,7 +149,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -155,7 +155,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// Paper start - Share random for entities to make them more random
@@ -477,7 +477,7 @@ index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0
// Paper start - replace random
private static final class RandomRandomSource extends ca.spottedleaf.moonrise.common.util.ThreadUnsafeRandom {
public RandomRandomSource() {
@@ -1086,28 +1086,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1108,28 +1108,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.onGround;
}
@@ -506,7 +506,7 @@ index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
@@ -1232,13 +1213,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1244,13 +1225,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
}
}
@@ -520,31 +520,7 @@ index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0
}
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
@@ -4523,10 +4497,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
- if (this.touchingUnloadedChunk()) {
- return false;
- }
-
final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3);
final Level world = this.level;
@@ -4562,7 +4532,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
for (int currChunkZ = minChunkZ; currChunkZ <= maxChunkZ; ++currChunkZ) {
for (int currChunkX = minChunkX; currChunkX <= maxChunkX; ++currChunkX) {
- final net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunkSource.getChunk(currChunkX, currChunkZ, net.minecraft.world.level.chunk.status.ChunkStatus.FULL, false).getSections();
+ // DivineMC start - Misc optimizations
+ final net.minecraft.world.level.chunk.ChunkAccess chunk = chunkSource.getChunk(currChunkX, currChunkZ, net.minecraft.world.level.chunk.status.ChunkStatus.FULL, false);
+ if (chunk == null) continue;
+ final net.minecraft.world.level.chunk.LevelChunkSection[] sections = chunk.getSections();
+ // DivineMC end - Misc optimizations
// bound y
for (int currChunkY = minChunkY; currChunkY <= maxChunkY; ++currChunkY) {
@@ -4719,9 +4693,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4922,9 +4896,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void setDeltaMovement(Vec3 deltaMovement) {
@@ -554,7 +530,7 @@ index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0
}
public void addDeltaMovement(Vec3 addend) {
@@ -4829,9 +4801,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -5032,9 +5004,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// Paper end - Fix MC-4
if (this.position.x != x || this.position.y != y || this.position.z != z) {
@@ -565,10 +541,10 @@ index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0
int floor1 = Mth.floor(y);
int floor2 = Mth.floor(z);
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..ff4648b3be103446ab401d36c14cc80b48840cab 100644
index c8354d46ed909090f7c15f396863bf7d73afcefa..382ef2dad5e995bc01f6492218b8c8f7a930d6ac 100644
--- a/net/minecraft/world/entity/ExperienceOrb.java
+++ b/net/minecraft/world/entity/ExperienceOrb.java
@@ -166,6 +166,7 @@ public class ExperienceOrb extends Entity {
@@ -195,6 +195,7 @@ public class ExperienceOrb extends Entity {
if (this.age >= 6000) {
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}
@@ -577,10 +553,10 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..ff4648b3be103446ab401d36c14cc80b
}
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index a58133b53a19e90d4386f57891ee41a5c03228c2..a65c86b411c15bbdfd431dac00e510d2262e65e1 100644
index e1f5a4814d051a43090bf6df2acbcd20fbbc1934..fd586acb15362a461c77256c6db9cc3a8002750d 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -698,7 +698,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -715,7 +715,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
@@ -589,7 +565,7 @@ index a58133b53a19e90d4386f57891ee41a5c03228c2..a65c86b411c15bbdfd431dac00e510d2
if (nearestPlayer != null) {
// Paper start - Configurable despawn distances
final io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DespawnRangePair despawnRangePair = this.level().paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory());
@@ -727,6 +727,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -744,6 +744,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
}
}
@@ -610,10 +586,10 @@ index a58133b53a19e90d4386f57891ee41a5c03228c2..a65c86b411c15bbdfd431dac00e510d2
protected final void serverAiStep() {
this.noActionTime++;
diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java
index 92fe6acbd530e985da23f50e615817309915122c..c9a2c4f7051639478bd9788911d3c6bead8f5152 100644
index d510503a8ad272255aeba20a916642828023fd19..2d9bf302b779602d733187c6f86e52467f0dc540 100644
--- a/net/minecraft/world/level/GameRules.java
+++ b/net/minecraft/world/level/GameRules.java
@@ -277,7 +277,7 @@ public class GameRules {
@@ -288,7 +288,7 @@ public class GameRules {
}
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules, FeatureFlagSet enabledFeatures) {
@@ -699,7 +675,7 @@ index c7b46efd4f08067e2c9c5c8b0e8b71a94a79823d..c7252c636fcea34a866dcc4862b60cef
int i1 = config.size;
double[] doubles = new double[i1 * 4];
diff --git a/net/minecraft/world/level/storage/DimensionDataStorage.java b/net/minecraft/world/level/storage/DimensionDataStorage.java
index 05361803a929cbcf651a37cf43009e57acb25f3e..5d21d2520dd33889988d8300060e6a41a8334562 100644
index 1ff0b19a077333ad9da9cab7f5a891eeaa2109a9..b82be2c9576b7d41d104b0c44237a01e678811d5 100644
--- a/net/minecraft/world/level/storage/DimensionDataStorage.java
+++ b/net/minecraft/world/level/storage/DimensionDataStorage.java
@@ -39,7 +39,7 @@ import org.slf4j.Logger;
@@ -712,7 +688,7 @@ index 05361803a929cbcf651a37cf43009e57acb25f3e..5d21d2520dd33889988d8300060e6a41
private final HolderLookup.Provider registries;
private final Path dataFolder;
diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java
index 5767fbfd7f33c5276fb4335ce473b2e1baca411c..1866d857cabde481f23e861e0db7994bfa84ac40 100644
index e53398996bbb278c6e06024d8ca945b364a44c10..f60c1ab58a2e9adfb01e9bd430b92cd1902e5dbe 100644
--- a/net/minecraft/world/phys/AABB.java
+++ b/net/minecraft/world/phys/AABB.java
@@ -190,13 +190,15 @@ public class AABB {

View File

@@ -29,10 +29,10 @@ index 1b8193587814225c2ef2c5d9e667436eb50ff6c5..78e3c49a233dc6bed558458d555fe740
}
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..131e673c8eaa2afa801de5913982259d48908358 100644
index b2bcfb3557a0326fd7ec1059f95d6da4568dfd80..6bb36686ae7ca9f4bf763baa894086146f967806 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
@@ -383,6 +383,14 @@ public final class ChunkEntitySlices {
@@ -405,6 +405,14 @@ public final class ChunkEntitySlices {
private E[] storage;
private int size;
@@ -47,7 +47,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..131e673c8eaa2afa801de5913982259d
public BasicEntityList() {
this(0);
@@ -403,6 +411,7 @@ public final class ChunkEntitySlices {
@@ -425,6 +433,7 @@ public final class ChunkEntitySlices {
private void resize() {
if (this.storage == EMPTY) {
this.storage = (E[])new Entity[DEFAULT_CAPACITY];
@@ -55,7 +55,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..131e673c8eaa2afa801de5913982259d
} else {
this.storage = Arrays.copyOf(this.storage, this.storage.length * 2);
}
@@ -416,6 +425,7 @@ public final class ChunkEntitySlices {
@@ -438,6 +447,7 @@ public final class ChunkEntitySlices {
} else {
this.storage[idx] = entity;
}
@@ -63,7 +63,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..131e673c8eaa2afa801de5913982259d
}
public int indexOf(final E entity) {
@@ -431,24 +441,31 @@ public final class ChunkEntitySlices {
@@ -453,24 +463,31 @@ public final class ChunkEntitySlices {
}
public boolean remove(final E entity) {
@@ -104,7 +104,7 @@ index ba20e87d2105ce53cdaf4049de2388d05fcd1b56..131e673c8eaa2afa801de5913982259d
}
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
index d1148be69ffc03973f097ab421ee59c6999b6e84..529593d4c46b71849e50e2976411186134c51aab 100644
index c2c52fa8cd05a1b3487976cced210352a9026980..25f1ab0d7a2701a9fe9d6af7169b056a51108f2c 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
@@ -187,13 +187,13 @@ public final class RegionizedPlayerChunkLoader {
@@ -524,10 +524,10 @@ index 8f8268924ac92fca5df8a11e08031fa8416c6e05..f1bc7a5e80de0293e1837b2f7401b347
}
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b7dc550c1 100644
index 2cc0e7c72d2b2e562452138f2b41fd1dcaf0570a..772694b751057aca58cea51741ebc45189078117 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/NewChunkHolder.java
@@ -644,11 +644,19 @@ public final class NewChunkHolder {
@@ -646,11 +646,19 @@ public final class NewChunkHolder {
}
public final ChunkHolder vanillaChunkHolder;
@@ -547,7 +547,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
this.scheduler = scheduler;
this.vanillaChunkHolder = new ChunkHolder(
new ChunkPos(chunkX, chunkZ), ChunkHolderManager.MAX_TICKET_LEVEL, world,
@@ -790,12 +798,14 @@ public final class NewChunkHolder {
@@ -792,12 +800,14 @@ public final class NewChunkHolder {
// note: these are completed with null to indicate that no write occurred
// they are also completed with null to indicate a null write occurred
@@ -566,7 +566,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
public UnloadTask getUnloadTask(final MoonriseRegionFileIO.RegionFileType type) {
switch (type) {
@@ -858,7 +868,7 @@ public final class NewChunkHolder {
@@ -860,7 +870,7 @@ public final class NewChunkHolder {
this.priorityLocked = false;
if (chunk != null) {
@@ -575,7 +575,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
this.chunkDataUnload = new UnloadTask(new CallbackCompletable<>(), this.scheduler.saveExecutor.createTask(toRun), toRun);
}
if (poiChunk != null) {
@@ -877,7 +887,11 @@ public final class NewChunkHolder {
@@ -879,7 +889,11 @@ public final class NewChunkHolder {
MoonriseRegionFileIO.scheduleSave(this.world, this.chunkX, this.chunkZ, data, type);
}
@@ -588,7 +588,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
final ReentrantAreaLock.Node schedulingLock = this.scheduler.schedulingLockArea.lock(this.chunkX, this.chunkZ);
try {
// can only write to these fields while holding the schedule lock
@@ -1190,6 +1204,7 @@ public final class NewChunkHolder {
@@ -1192,6 +1206,7 @@ public final class NewChunkHolder {
for (int dz = -NEIGHBOUR_RADIUS; dz <= NEIGHBOUR_RADIUS; ++dz) {
for (int dx = -NEIGHBOUR_RADIUS; dx <= NEIGHBOUR_RADIUS; ++dx) {
final NewChunkHolder holder = (dx | dz) == 0 ? this : this.scheduler.chunkHolderManager.getChunkHolder(dx + this.chunkX, dz + this.chunkZ);
@@ -596,7 +596,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
if (loaded) {
if (holder.setNeighbourFullLoaded(-dx, -dz)) {
changedFullStatus.add(holder);
@@ -1214,6 +1229,19 @@ public final class NewChunkHolder {
@@ -1216,6 +1231,19 @@ public final class NewChunkHolder {
private void updateCurrentState(final FullChunkStatus to) {
this.currentFullChunkStatus = to;
@@ -616,7 +616,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
}
// only to be called on the main thread, no locks need to be held
@@ -1348,11 +1376,11 @@ public final class NewChunkHolder {
@@ -1350,11 +1378,11 @@ public final class NewChunkHolder {
return this.requestedGenStatus;
}
@@ -630,7 +630,7 @@ index e4a5fa25ed368fc4662c30934da2963ef446d782..b5057ffac429ea2d1910082a83c13a5b
}).add(consumer);
}
@@ -1394,11 +1422,11 @@ public final class NewChunkHolder {
@@ -1396,11 +1424,11 @@ public final class NewChunkHolder {
}, Priority.HIGHEST);
}
@@ -888,7 +888,7 @@ index 51f4dd4f583dfbd16cb00f1cb4418d1044cecb1c..2f83deafbb5b50e5ce191b5351ec5ed9
}
diff --git a/io/papermc/paper/FeatureHooks.java b/io/papermc/paper/FeatureHooks.java
index 52b981a05ad5aabb7c85dc1e0f1d2b835163bb87..f4af8e131c2badbe0e57ccec5be8710e12d7c38d 100644
index a42a773503ca0e0dc36dd44440b3eda670a6811b..f51db348545db7073558efda7f95a9738313198b 100644
--- a/io/papermc/paper/FeatureHooks.java
+++ b/io/papermc/paper/FeatureHooks.java
@@ -32,11 +32,6 @@ import org.bukkit.Chunk;
@@ -904,7 +904,7 @@ index 52b981a05ad5aabb7c85dc1e0f1d2b835163bb87..f4af8e131c2badbe0e57ccec5be8710e
commands.put(Set.of("fixlight"), new FixLightCommand()); // Paper - rewrite chunk system
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); // Paper - rewrite chunk system
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
index 5ab3c01d81522caace541bcf96fd6d2e9b49a8c9..3ece4fc97811f680c1dd01913d6bff51722c6ba1 100644
index 687af4f52dc3ae5564079b6782b63a4277c43439..ab3b1c7442b9f3dd72a9ce8c70dc708d2371471a 100644
--- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java
@@ -132,8 +132,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1018,7 +1018,7 @@ index fd3d0f6cb53bc8b6186f0d86575f21007b2c20ed..7f3c41b59e288364d67534511fc038e6
}
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
index 4d4139b5f42a4db6e22bf1d063a23dc7b9914f85..9a65321ce62f21b150d29be30dbae7dba0ff40be 100644
index 75c8ce32e68f92e20201e9c243f46f2be716eac8..2873642844c683ae4388ae27a045e01441d15426 100644
--- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -444,8 +444,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
@@ -1032,18 +1032,18 @@ index 4d4139b5f42a4db6e22bf1d063a23dc7b9914f85..9a65321ce62f21b150d29be30dbae7db
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc27fd62a7 100644
index d0d97e063acf8f11c32adf1fd2ec6bca59913c33..14c8df2f3b9c133b38e871e81f7ee2333322437c 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -177,6 +177,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -179,6 +179,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public final ServerChunkCache chunkSource;
private final MinecraftServer server;
public final net.minecraft.world.level.storage.PrimaryLevelData serverLevelData; // CraftBukkit - type
+ public final ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.LevelHolderData chunkHolderData; // DivineMC - Chunk System optimization
private int lastSpawnChunkRadius;
final EntityTickList entityTickList = new EntityTickList();
// Paper - rewrite chunk system
@@ -287,6 +288,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private final ServerWaypointManager waypointManager;
@@ -290,6 +291,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// Paper end - optimise getPlayerByUUID
// Paper start - rewrite chunk system
@@ -1051,7 +1051,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
private final ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder viewDistanceHolder = new ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder();
private final ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader chunkLoader = new ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader((ServerLevel)(Object)this);
private final ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.EntityDataController entityDataController;
@@ -678,6 +680,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -682,6 +684,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Paper start - rewrite chunk system
this.moonrise$setEntityLookup(new ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup((ServerLevel)(Object)this, ((ServerLevel)(Object)this).new EntityCallbacks()));
this.chunkTaskScheduler = new ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler((ServerLevel)(Object)this);
@@ -1059,7 +1059,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
this.entityDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.EntityDataController(
new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.EntityDataController.EntityRegionFileStorage(
new RegionStorageInfo(levelStorageAccess.getLevelId(), dimension, "entities"),
@@ -691,6 +694,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -695,6 +698,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle
@@ -1067,7 +1067,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
}
// Paper start
@@ -820,8 +824,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -825,8 +829,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public boolean shouldTickBlocksAt(long chunkPos) {
// Paper start - rewrite chunk system
@@ -1077,7 +1077,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
// Paper end - rewrite chunk system
}
@@ -877,7 +880,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -882,7 +885,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) {
final LevelChunkSection[] sections = chunk.getSections();
@@ -1086,7 +1086,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
final ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom simpleRandom = this.simpleRandom;
final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294();
@@ -885,42 +888,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -890,42 +893,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
final int offsetX = cpos.x << 4;
final int offsetZ = cpos.z << 4;
@@ -1139,7 +1139,7 @@ index 6ed2d1aeab17941b67019d45734da46efc53ffdf..d003e36a37cbc39d6467a9c45ad716dc
}
// Paper end - optimise random ticking
@@ -2519,16 +2521,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2559,16 +2561,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public boolean isPositionTickingWithEntitiesLoaded(long chunkPos) {
// Paper start - rewrite chunk system
@@ -1508,10 +1508,10 @@ index a80b2e9dceea423180a9c390d1970317dff4f1b0..6d9dfc1837dccef2073da180aaaf68b0
void read(FriendlyByteBuf buffer);
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
index d7f4d54f73adc0d4d71fb9ba425e45a11c456961..a512609aaa823b940ed269c981fc9beec49a126e 100644
index baa006132b1fa3d73fd4a14f6bc747a3957d1a0c..ce41cd702a61d96552567b310cf59b22d9363eeb 100644
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
@@ -393,6 +393,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -392,6 +392,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
return this.data.palette.maybeHas(predicate);
}
@@ -1525,10 +1525,10 @@ index d7f4d54f73adc0d4d71fb9ba425e45a11c456961..a512609aaa823b940ed269c981fc9bee
public PalettedContainer<T> copy() {
return new PalettedContainer<>(this, this.presetValues); // Paper - Anti-Xray - Add preset values
diff --git a/net/minecraft/world/level/chunk/ProtoChunk.java b/net/minecraft/world/level/chunk/ProtoChunk.java
index 13837d5508c34de3ccc49caac0d6c0ba7010d88a..3449d4dbb68353204ec67c46eed1404dd6410e96 100644
index aa085d8a78a3fb40a214e4b152ab04d9a409f76f..2aea410b5ba3156cf08f92ffc554ae64c9e90664 100644
--- a/net/minecraft/world/level/chunk/ProtoChunk.java
+++ b/net/minecraft/world/level/chunk/ProtoChunk.java
@@ -41,7 +41,7 @@ public class ProtoChunk extends ChunkAccess {
@@ -46,7 +46,7 @@ public class ProtoChunk extends ChunkAccess {
@Nullable
private volatile LevelLightEngine lightEngine;
private volatile ChunkStatus status = ChunkStatus.EMPTY;
@@ -2638,7 +2638,7 @@ index e2036a80eff3dc1a9ec625880d4aab6ef71d84fa..6c5200a311a6c5a93a49999cc0c3a8b3
protected ScatteredFeaturePiece(StructurePieceType type, int x, int y, int z, int width, int height, int depth, Direction orientation) {
super(type, 0, StructurePiece.makeBoundingBox(x, y, z, orientation, width, height, depth));
diff --git a/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/net/minecraft/world/level/levelgen/structure/StructureCheck.java
index 48fce0845fb023d6286dac144c285b048d778564..3e8e740f08614143f09c62f07bee7b305dd7929c 100644
index 7779a2f83f51465bde476776470bd77712f6be0d..c79c758ced104d2711b73b41370c43c4dc56b03e 100644
--- a/net/minecraft/world/level/levelgen/structure/StructureCheck.java
+++ b/net/minecraft/world/level/levelgen/structure/StructureCheck.java
@@ -47,6 +47,7 @@ public class StructureCheck {
@@ -3169,7 +3169,7 @@ index 1f1ee6e2d020cd06184313d19523ea928cf242c8..ab6d51b60cdbaed7ac7395d2a27eadd6
public StartPiece(RandomSource random, int x, int z) {
super(StructurePieceType.STRONGHOLD_START, 0, x, z, getRandomHorizontalDirection(random));
diff --git a/net/minecraft/world/level/levelgen/structure/structures/WoodlandMansionPieces.java b/net/minecraft/world/level/levelgen/structure/structures/WoodlandMansionPieces.java
index 081fe9509b777bd1f853b662ca8b01c64f27b5e5..9a3d1ed95d201d24374ff15c7a8daa30bc25f777 100644
index 872fd2ebe6f95cf1d59e18a4c5ca15d12a65b7b0..9e4aa26d18dd748b5f7af59e88af612ad1224d1f 100644
--- a/net/minecraft/world/level/levelgen/structure/structures/WoodlandMansionPieces.java
+++ b/net/minecraft/world/level/levelgen/structure/structures/WoodlandMansionPieces.java
@@ -126,7 +126,7 @@ public class WoodlandMansionPieces {
@@ -3231,10 +3231,10 @@ index 05027cc20d174d78bef118cd2ba545ac56e1559c..32bbfe48dee44b0b491aa369dec59cbf
private boolean finalizeEntities;
diff --git a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
index bb8b5ca9044ecb33687e7f20cfb0acbf55f887c7..df3a1b9ed4ad836bd3358b6b440964e497213ea3 100644
index f21e612a35d6ac4482dbf5d14e506959659e371a..5a05536e474bec574aa637f86bfc51f566d76ebf 100644
--- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
@@ -69,8 +69,8 @@ public class StructureTemplate {
@@ -75,8 +75,8 @@ public class StructureTemplate {
public static final String ENTITY_TAG_BLOCKPOS = "blockPos";
public static final String ENTITY_TAG_NBT = "nbt";
public static final String SIZE_TAG = "size";

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize entity stupid brain
diff --git a/net/minecraft/world/entity/AgeableMob.java b/net/minecraft/world/entity/AgeableMob.java
index 201c6d6e2f5799a7678b16f01c85508bc72e8af5..caa829739e002f28e5c9072fa573efa34da80d4c 100644
index 04875840085541ebfc7014868beec49bb7ab9976..bd7e8fa315ca67fcf03d34added45b649d7aaebb 100644
--- a/net/minecraft/world/entity/AgeableMob.java
+++ b/net/minecraft/world/entity/AgeableMob.java
@@ -124,6 +124,16 @@ public abstract class AgeableMob extends PathfinderMob {
@@ -125,6 +125,16 @@ public abstract class AgeableMob extends PathfinderMob {
public void onSyncedDataUpdated(EntityDataAccessor<?> key) {
if (DATA_BABY_ID.equals(key)) {
this.refreshDimensions();
@@ -403,10 +403,10 @@ index 24d1928445b5571e040a2b12d5c82e77a880d9bd..dac0a23aebf2dea1972c07d5c82079da
private boolean isVillagerBaby(LivingEntity livingEntity) {
return livingEntity.getType() == EntityType.VILLAGER && livingEntity.isBaby();
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
index 6029051a7bade2eb412d7ec4957a4361e7e575b1..01e1712854aaebc59db844045141b25561df8fc3 100644
index 70b32e0d06f9b8b7999df5fdfd773c09394e23fb..36fcc913385afec8bb66c1664b902e4d6868f11d 100644
--- a/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
@@ -99,6 +99,13 @@ public class Goat extends Animal {
@@ -100,6 +100,13 @@ public class Goat extends Animal {
this.getNavigation().setCanFloat(true);
this.setPathfindingMalus(PathType.POWDER_SNOW, -1.0F);
this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F);

View File

@@ -5,17 +5,17 @@ Subject: [PATCH] Lag compensation
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 9956405d7f9d14af7278837adeede76dea8d4bd9..86754cb52caeef962172bcb79cbc8f16bcdd3b63 100644
index ba5cb47347da6a0bc69b8f6924baac52f60375b8..05541061f1ac4f13e3de55f4ab90df4e273aa4b0 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -287,6 +287,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -288,6 +288,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
public boolean lagging = false; // Purpur - Lagging threshold
protected boolean upnp = false; // Purpur - UPnP Port Forwarding
+ public final org.bxteam.divinemc.util.tps.TPSCalculator tpsCalculator = new org.bxteam.divinemc.util.tps.TPSCalculator(); // DivineMC - Lag compensation
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
@@ -1533,6 +1534,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
@@ -25,10 +25,10 @@ index 9956405d7f9d14af7278837adeede76dea8d4bd9..86754cb52caeef962172bcb79cbc8f16
this.tickCount++;
this.tickRateManager.tick();
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index d003e36a37cbc39d6467a9c45ad716dc27fd62a7..84ed28dba0ed2a2edcfee495bdcc24ad21936486 100644
index 14c8df2f3b9c133b38e871e81f7ee2333322437c..05b8834b5566ac12655b563a1a58f123275fdedb 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -213,6 +213,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
public boolean hasRidableMoveEvent = false; // Purpur - Ridables
@@ -36,7 +36,7 @@ index d003e36a37cbc39d6467a9c45ad716dc27fd62a7..84ed28dba0ed2a2edcfee495bdcc24ad
@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
@@ -762,6 +763,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -766,6 +767,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
@@ -45,7 +45,7 @@ index d003e36a37cbc39d6467a9c45ad716dc27fd62a7..84ed28dba0ed2a2edcfee495bdcc24ad
this.updateSkyBrightness();
if (runsNormally) {
this.tickTime();
@@ -841,11 +844,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -846,11 +849,18 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.setDayTime(this.preciseTime);
} else
// Purpur end - Configurable daylight cycle
@@ -66,10 +66,10 @@ index d003e36a37cbc39d6467a9c45ad716dc27fd62a7..84ed28dba0ed2a2edcfee495bdcc24ad
this.serverLevelData.setDayTime(time);
// Purpur start - Configurable daylight cycle
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index f3706dfb6aeb5035cbf0a8bf6b4d9a5243aaaa17..808e4e2ae070b5232c2050fdcb183cc21b8fb996 100644
index e3babfa292556c5f5a208536a3f869dc71b82498..16a3cd813997456ca67a382a8277eca02dc6662f 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -503,6 +503,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -517,6 +517,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
}
}
@@ -77,7 +77,7 @@ index f3706dfb6aeb5035cbf0a8bf6b4d9a5243aaaa17..808e4e2ae070b5232c2050fdcb183cc2
this.tickEffects();
this.yHeadRotO = this.yHeadRot;
this.yBodyRotO = this.yBodyRot;
@@ -510,6 +511,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -524,6 +525,17 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
this.xRotO = this.getXRot();
}
@@ -122,10 +122,10 @@ index 88b07fbb96b20124777889830afa480673629d43..91f6d43b3785ddad7db8eb529ba3293c
public TeleportTransition getPortalDestination(ServerLevel level, Entity entity) {
return this.portal.getPortalDestination(level, entity, this.entryPosition);
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
index 4ddf1cdf7a47bf06f95c5bfce8f3c4d035e87cfc..cdcf0be8f8ca51bf548ec5ae2d74b3eef4a7d3d3 100644
index 545c672a51fd2121dc2bf827c3b160ef9d2f790b..647241577f37655e2fc8814ef658d4031359ed89 100644
--- a/net/minecraft/world/entity/item/ItemEntity.java
+++ b/net/minecraft/world/entity/item/ItemEntity.java
@@ -160,8 +160,25 @@ public class ItemEntity extends Entity implements TraceableEntity {
@@ -150,8 +150,25 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
// Paper end - EAR 2
@@ -152,7 +152,7 @@ index 4ddf1cdf7a47bf06f95c5bfce8f3c4d035e87cfc..cdcf0be8f8ca51bf548ec5ae2d74b3ee
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else {
diff --git a/net/minecraft/world/item/Item.java b/net/minecraft/world/item/Item.java
index c52fb17d1e496a91223b7387cacb128c1865caee..142249b6412801cad1c7710ad6edb1955d0b5df5 100644
index 40cb5e6bbcf9dbdb400f1503e86c0804b60e07be..d5352cbb4a64631a0a831de880efa21e1b3f6092 100644
--- a/net/minecraft/world/item/Item.java
+++ b/net/minecraft/world/item/Item.java
@@ -286,10 +286,25 @@ public class Item implements FeatureElement, ItemLike {
@@ -183,10 +183,10 @@ index c52fb17d1e496a91223b7387cacb128c1865caee..142249b6412801cad1c7710ad6edb195
BlocksAttacks blocksAttacks = stack.get(DataComponents.BLOCKS_ATTACKS);
return blocksAttacks != null ? 72000 : 0;
diff --git a/net/minecraft/world/level/GameRules.java b/net/minecraft/world/level/GameRules.java
index c9a2c4f7051639478bd9788911d3c6bead8f5152..34b9baaff95189c8d9155968b00324f1b2e94209 100644
index 2d9bf302b779602d733187c6f86e52467f0dc540..69196d7e43054955137569b22c4ca40adff3b1d8 100644
--- a/net/minecraft/world/level/GameRules.java
+++ b/net/minecraft/world/level/GameRules.java
@@ -355,8 +355,31 @@ public class GameRules {
@@ -366,8 +366,31 @@ public class GameRules {
}
public int getInt(GameRules.Key<GameRules.IntegerValue> key) {
@@ -248,10 +248,10 @@ index 8db95b74f88f8096de93115ae8d3fb2e6184ad3b..e044830439fe9821ab3f62695d318a63
}
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
index 04942e23dd2bc82e4c60110756beedb5e0f074d7..a40cd4f4904927598f1966c5746634fe1fa5e059 100644
index 53c77efe2f86c5dfb5f02fa0b1886e8cda2e3862..f534f7983424ff3a72809a4f6c20bbed83a54b42 100644
--- a/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
@@ -910,6 +910,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -917,6 +917,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
this.ticker = ticker;
}
@@ -271,7 +271,7 @@ index 04942e23dd2bc82e4c60110756beedb5e0f074d7..a40cd4f4904927598f1966c5746634fe
@Override
public void tick() {
if (!this.blockEntity.isRemoved() && this.blockEntity.hasLevel()) {
@@ -918,7 +931,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -925,7 +938,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
try {
BlockState blockState = LevelChunk.this.getBlockState(blockPos);
if (this.blockEntity.getType().isValid(blockState)) {

View File

@@ -6,17 +6,17 @@ Subject: [PATCH] Skip EntityScheduler's executeTick checks if there isn't any
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 86754cb52caeef962172bcb79cbc8f16bcdd3b63..1a842ecfb717f7b5ed2fdb2779040ab0e857612d 100644
index 05541061f1ac4f13e3de55f4ab90df4e273aa4b0..f16a50b9b07e0f754f573710875859605318ba69 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -288,6 +288,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public boolean lagging = false; // Purpur - Lagging threshold
protected boolean upnp = false; // Purpur - UPnP Port Forwarding
public final org.bxteam.divinemc.util.tps.TPSCalculator tpsCalculator = new org.bxteam.divinemc.util.tps.TPSCalculator(); // DivineMC - Lag compensation
+ public final Set<net.minecraft.world.entity.Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // DivineMC - Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
@@ -1661,17 +1662,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
// Paper start - Folia scheduler API

View File

@@ -9,7 +9,7 @@ This is a fully vanilla optimization. Improves: [Blast]Furnace/Campfire/Smoker/S
This was mostly made for the auto crafting table, since the performance boost is much more visible while using that mod
diff --git a/net/minecraft/world/item/crafting/RecipeManager.java b/net/minecraft/world/item/crafting/RecipeManager.java
index bf69cef9b8ade11a1c08199cdd6c723e5a78c078..ca6751ca70bdb3349c717a3923e9d1c1a19a012f 100644
index f2c82217811712625df594667330a73f8f44e261..d39ff67faf89f34dcb41769b268c3dafc1b6305b 100644
--- a/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/net/minecraft/world/item/crafting/RecipeManager.java
@@ -166,7 +166,7 @@ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> imp

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Option to allow weird movement and disable teleporting
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 32053aaa7b2a9c582615e47b13dbe99e98e61337..667cc2b415e6ef4e2685e2eacad9c2c37165e771 100644
index e1e5e9d49439355d5f52a90e308cbad3ad74b41f..c5d0876d765d468123f841c18351a4513abb5866 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -566,7 +566,7 @@ public class ServerGamePacketListenerImpl
@@ -593,7 +593,7 @@ public class ServerGamePacketListenerImpl
return;
}
// Paper end - Prevent moving into unloaded chunks
@@ -18,16 +18,16 @@ index 32053aaa7b2a9c582615e47b13dbe99e98e61337..667cc2b415e6ef4e2685e2eacad9c2c3
// CraftBukkit end
LOGGER.warn(
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5
@@ -596,7 +596,7 @@ public class ServerGamePacketListenerImpl
@@ -623,7 +623,7 @@ public class ServerGamePacketListenerImpl
d5 = d2 - rootVehicle.getZ();
d7 = d3 * d3 + d4 * d4 + d5 * d5;
boolean flag2 = false;
boolean flag1 = false;
- if (d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
+ if (!org.bxteam.divinemc.config.DivineConfig.FixesCategory.alwaysAllowWeirdMovement && (d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold)) { // Spigot // DivineMC - stop weird movement
flag2 = true; // Paper - diff on change, this should be moved wrongly
flag1 = true; // Paper - diff on change, this should be moved wrongly
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
}
@@ -1512,20 +1512,24 @@ public class ServerGamePacketListenerImpl
@@ -1546,20 +1546,24 @@ public class ServerGamePacketListenerImpl
if (this.shouldCheckPlayerMovement(isFallFlying)) {
float f2 = isFallFlying ? 300.0F : 100.0F;
if (d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) {
@@ -35,7 +35,7 @@ index 32053aaa7b2a9c582615e47b13dbe99e98e61337..667cc2b415e6ef4e2685e2eacad9c2c3
- // Paper start - Add fail move event
- io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
+ // DivineMC start - Stop teleporting players when they move too quickly
+ if (!org.bxteam.divinemc.config.DivineConfig.FixesCategory.alwaysAllowWeirdMovement && !(org.bxteam.divinemc.config.DivineConfig.FixesCategory.ignoreMovedTooQuicklyWhenLagging && player.serverLevel().getServer().lagging)) {
+ if (!org.bxteam.divinemc.config.DivineConfig.FixesCategory.alwaysAllowWeirdMovement && !(org.bxteam.divinemc.config.DivineConfig.FixesCategory.ignoreMovedTooQuicklyWhenLagging && player.level().getServer().lagging)) {
+ // CraftBukkit end
+ // Paper start - Add fail move event
+ io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
@@ -63,7 +63,7 @@ index 32053aaa7b2a9c582615e47b13dbe99e98e61337..667cc2b415e6ef4e2685e2eacad9c2c3
}
}
}
@@ -1586,6 +1590,7 @@ public class ServerGamePacketListenerImpl
@@ -1620,6 +1624,7 @@ public class ServerGamePacketListenerImpl
d7 = d3 * d3 + d4 * d4 + d5 * d5;
boolean movedWrongly = false; // Paper - Add fail move event; rename
if (!this.player.isChangingDimension()

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Block Log4Shell exploit
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 376ae7bde8fdf0efed5a7d33f67a1a5ae3b5e6e7..ce8255db82335255313e16b9811bdfc39d33e5ee 100644
index 672995a6fb8c0f9e9155aa6f48edb1a52fd5cade..2858bd6c456e95adf80bb251044659e9e5c21700 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2482,6 +2482,7 @@ public class ServerGamePacketListenerImpl
@@ -2516,6 +2516,7 @@ public class ServerGamePacketListenerImpl
}
private void tryHandleChat(String message, Runnable handler, boolean sync) { // CraftBukkit
@@ -16,7 +16,7 @@ index 376ae7bde8fdf0efed5a7d33f67a1a5ae3b5e6e7..ce8255db82335255313e16b9811bdfc3
if (isChatMessageIllegal(message)) {
this.disconnectAsync(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add proper async disconnect
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
@@ -2514,6 +2515,15 @@ public class ServerGamePacketListenerImpl
@@ -2548,6 +2549,15 @@ public class ServerGamePacketListenerImpl
}
}

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Skip distanceToSqr call in ServerEntity#sendChanges if the
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
index 19214d03a149e62b02ead0c9a1de8e99087de357..ed5d488eb3e13a63a228d3f8323c14178072822b 100644
index fa0fd2a7f15a076ac981f85f4f249a15a4ab512e..ff2f1e31633749da89cfc0779004ac1ef104470d 100644
--- a/net/minecraft/server/level/ServerEntity.java
+++ b/net/minecraft/server/level/ServerEntity.java
@@ -205,23 +205,27 @@ public class ServerEntity {
@@ -209,23 +209,27 @@ public class ServerEntity {
if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) {
Vec3 deltaMovement = this.entity.getDeltaMovement();

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize canSee checks
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
index fb6e0beb35d1d6bb9a159debeb06e861051821b9..71c7d0186288e5b910d3898f10c5bffb6657e760 100644
index ab3b1c7442b9f3dd72a9ce8c70dc708d2371471a..1a9b7de55555484196de695f61982c940448b262 100644
--- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java
@@ -1328,7 +1328,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Verify Minecraft EULA earlier
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
index 29dd9a980bb7dc8457dd9ad6eeaa2c5067e3b954..a0553288d99e94d14345f25ec4672e1ca70950b6 100644
index bc3209d3cbe971af74b7856caa6300b59b0bb6bc..9a19c36074b9d8eb291b15b080687e47bcd5d007 100644
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -123,7 +123,6 @@ public class Main {
@@ -124,7 +124,6 @@ public class Main {
dedicatedServerSettings.forceSave();
RegionFileVersion.configure(dedicatedServerSettings.getProperties().regionFileComression);
Path path2 = Paths.get("eula.txt");
@@ -16,7 +16,7 @@ index 29dd9a980bb7dc8457dd9ad6eeaa2c5067e3b954..a0553288d99e94d14345f25ec4672e1c
// Paper start - load config files early 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"));
@@ -146,19 +145,6 @@ public class Main {
@@ -147,19 +146,6 @@ public class Main {
return;
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Option to disable saving of snowball and firework
diff --git a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index e0e193078e550225e163149638bf9e053c0531f8..a3c9421506d1b9d79cb9cac46dbb2f86c83e7036 100644
index d8dc196ef92e97f831cf97cd1536a46f81f9d5d1..ed8c50f67f5a6deda74845e4bce9fd9aa42558c0 100644
--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -354,4 +354,14 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
@@ -350,4 +350,14 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
double d1 = entity.position().z - this.position().z;
return DoubleDoubleImmutablePair.of(d, d1);
}

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Re-Fix MC-117075
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 2e90bb96ed90f3debbe5803856ed41a5c08003f8..4eedfc61c7e682a44858703b462eecad17a48904 100644
index 6240f6f0799916f1c95505f3dfaeb00812abea70..6e8075618baf98fcc396f0b5e241a806805b3d94 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -104,7 +104,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Virtual Threads
diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java
index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..a0c59cfb8a8717a308a5597cadd6df1a47bd7224 100644
index 0a69469c79aaa2466cda04f6acefed18e421d555..66f7f2aa071c2811400b4fed12ccf51ca8bb6e23 100644
--- a/net/minecraft/Util.java
+++ b/net/minecraft/Util.java
@@ -98,7 +98,12 @@ public class Util {
@@ -23,10 +23,10 @@ index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..a0c59cfb8a8717a308a5597cadd6df1a
private final AtomicInteger count = new AtomicInteger();
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
index 8cfd050e1b5ebd6725a6888c8ec7aa6ce7c06efe..1df51c0190ad9756300cd5c1f40a62a01e883e26 100644
index 2b4345d16e8e5e903afb723dc41f549613998f7c..6e75bbc18762914c85866a0f46c6927aaf58afa1 100644
--- a/net/minecraft/commands/Commands.java
+++ b/net/minecraft/commands/Commands.java
@@ -473,7 +473,7 @@ public class Commands {
@@ -508,7 +508,7 @@ public class Commands {
}
// Fixed pool, but with discard policy
@@ -36,7 +36,7 @@ index 8cfd050e1b5ebd6725a6888c8ec7aa6ce7c06efe..1df51c0190ad9756300cd5c1f40a62a0
new java.util.concurrent.LinkedBlockingQueue<>(),
new com.google.common.util.concurrent.ThreadFactoryBuilder()
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 1a842ecfb717f7b5ed2fdb2779040ab0e857612d..ce79e6db9ab1a49005d1163641dd32050a2f9a41 100644
index f16a50b9b07e0f754f573710875859605318ba69..f484d4b72e1919762dec1a219f0e51e1eacea37f 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -2641,8 +2641,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -54,10 +54,10 @@ index 1a842ecfb717f7b5ed2fdb2779040ab0e857612d..ce79e6db9ab1a49005d1163641dd3205
public ChatDecorator getChatDecorator() {
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8677d5da2787b312f621b93e5323d908b366f65d..afc514702a853e98a334b48499f3696ae7f95ea2 100644
index 9e7bcc4322d303ee0d8c72a0ec0917180e992a20..121daa3509879dfec7cce629e1d5260fcbccb087 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -801,8 +801,11 @@ public class ServerGamePacketListenerImpl
@@ -828,8 +828,11 @@ public class ServerGamePacketListenerImpl
}
// Paper start - AsyncTabCompleteEvent
@@ -89,7 +89,7 @@ index 637b2eb7104cb0bc7f314ad6eea11a432e899861..c461440898c98f688064f552bb0e610f
private final byte[] challenge;
final MinecraftServer server;
diff --git a/net/minecraft/server/network/ServerTextFilter.java b/net/minecraft/server/network/ServerTextFilter.java
index 5d18f6c3173ed257bef15637a53adbff26ee9062..6f093875a5eac9e37792548c5edc77636966f391 100644
index b3d46e7687c572d9847124eb58e4a6011a78066c..9d2e2b1cff68383cd19b42e24559e3009ef1df54 100644
--- a/net/minecraft/server/network/ServerTextFilter.java
+++ b/net/minecraft/server/network/ServerTextFilter.java
@@ -48,7 +48,11 @@ public abstract class ServerTextFilter implements AutoCloseable {

View File

@@ -231,10 +231,10 @@ index 5c081a5b3d10f713e4e82fe1a43758f553fe50e0..85e84603a19964f05d9d5e62eb096ca7
+ // DivineMC end - Optimize Structure Generation
}
diff --git a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
index df3a1b9ed4ad836bd3358b6b440964e497213ea3..3730ea5ab8a82ab39b3454c2f5beb971c7b8939e 100644
index 5a05536e474bec574aa637f86bfc51f566d76ebf..e0f4500099c582653a81e6679be859e3d669bb88 100644
--- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
@@ -247,6 +247,12 @@ public class StructureTemplate {
@@ -255,6 +255,12 @@ public class StructureTemplate {
return transform(pos, decorator.getMirror(), decorator.getRotation(), decorator.getRotationPivot());
}
@@ -247,7 +247,7 @@ index df3a1b9ed4ad836bd3358b6b440964e497213ea3..3730ea5ab8a82ab39b3454c2f5beb971
public boolean placeInWorld(ServerLevelAccessor serverLevel, BlockPos offset, BlockPos pos, StructurePlaceSettings settings, RandomSource random, int flags) {
if (this.palettes.isEmpty()) {
return false;
@@ -264,7 +270,11 @@ public class StructureTemplate {
@@ -272,7 +278,11 @@ public class StructureTemplate {
}
}
// CraftBukkit end
@@ -260,7 +260,7 @@ index df3a1b9ed4ad836bd3358b6b440964e497213ea3..3730ea5ab8a82ab39b3454c2f5beb971
if ((!list.isEmpty() || !settings.isIgnoreEntities() && !this.entityInfoList.isEmpty())
&& this.size.getX() >= 1
&& this.size.getY() >= 1
@@ -871,7 +881,11 @@ public class StructureTemplate {
@@ -882,7 +892,11 @@ public class StructureTemplate {
private List<StructureTemplate.JigsawBlockInfo> cachedJigsaws;
Palette(List<StructureTemplate.StructureBlockInfo> blocks) {

View File

@@ -5,19 +5,19 @@ Subject: [PATCH] Option to disable disconnect.spam
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index afc514702a853e98a334b48499f3696ae7f95ea2..72dfe9d9a443b0e1c0267a664dfa7c89168d700a 100644
index 121daa3509879dfec7cce629e1d5260fcbccb087..e4c7307d7efbcad86cd58a06bb53540faed4b574 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -812,7 +812,7 @@ public class ServerGamePacketListenerImpl
@@ -839,7 +839,7 @@ public class ServerGamePacketListenerImpl
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); // Paper - AsyncTabCompleteEvent; run this async
// CraftBukkit start
- if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) { // Paper - configurable tab spam limits
+ if (!this.tabSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile()) && !org.bxteam.divinemc.config.DivineConfig.NetworkCategory.disableDisconnectSpam) { // Paper - configurable tab spam limits // DivineMC - Option to disable disconnect.spam
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
return;
}
@@ -824,7 +824,7 @@ public class ServerGamePacketListenerImpl
@@ -851,7 +851,7 @@ public class ServerGamePacketListenerImpl
// Paper end - Don't suggest if tab-complete is disabled
// Paper start
final int index;
@@ -26,7 +26,7 @@ index afc514702a853e98a334b48499f3696ae7f95ea2..72dfe9d9a443b0e1c0267a664dfa7c89
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - add proper async disconnect
return;
}
@@ -884,6 +884,7 @@ public class ServerGamePacketListenerImpl
@@ -911,6 +911,7 @@ public class ServerGamePacketListenerImpl
ParseResults<CommandSourceStack> parseResults = this.server.getCommands().getDispatcher().parse(stringReader, this.player.createCommandSourceStack());
// Paper start - Handle non-recoverable exceptions
if (!parseResults.getExceptions().isEmpty()
@@ -34,7 +34,7 @@ index afc514702a853e98a334b48499f3696ae7f95ea2..72dfe9d9a443b0e1c0267a664dfa7c89
&& parseResults.getExceptions().values().stream().anyMatch(e -> e instanceof io.papermc.paper.brigadier.TagParseCommandSyntaxException)) {
this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM);
return;
@@ -2609,6 +2610,7 @@ public class ServerGamePacketListenerImpl
@@ -2643,6 +2644,7 @@ public class ServerGamePacketListenerImpl
// this.chatSpamThrottler.increment();
if (!this.chatSpamThrottler.isIncrementAndUnderThreshold()
// CraftBukkit end
@@ -42,7 +42,7 @@ index afc514702a853e98a334b48499f3696ae7f95ea2..72dfe9d9a443b0e1c0267a664dfa7c89
&& !this.server.getPlayerList().isOp(this.player.getGameProfile())
&& !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause & add proper async disconnect
@@ -3388,7 +3390,7 @@ public class ServerGamePacketListenerImpl
@@ -3400,7 +3402,7 @@ public class ServerGamePacketListenerImpl
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
// Paper start - auto recipe limit
if (!org.bukkit.Bukkit.isPrimaryThread()) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable MC-67
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index f825964c5e7a06d54af68c68d3bf2da0535b51d6..d80f5b6039a4e49ddbf5598f68137e7c17b388c5 100644
index b4fc7ad2f353e8fbaf2179df2750c9a1c8ac9aba..55e82d490ed3489ff671ae8a49745571c4bfb993 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3956,6 +3956,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4171,6 +4171,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canTeleport(Level fromLevel, Level toLevel) {

View File

@@ -10,10 +10,10 @@ As part of: ModernFix (https://github.com/embeddedt/ModernFix)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
index a512609aaa823b940ed269c981fc9beec49a126e..1469835b298db8d4079b791192849626b972c62f 100644
index ce41cd702a61d96552567b310cf59b22d9363eeb..4c02444001ce772cad0f9eb28ce147cd3cc08b8d 100644
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
@@ -275,6 +275,28 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -274,6 +274,28 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
data.palette.read(buffer);
buffer.readFixedSizeLongArray(data.storage.getRaw());
this.data = data;

View File

@@ -27,7 +27,7 @@ index 63fd7b45750430b565d599337d3112cbaa7e7550..4275a2e1e29c15cdda75c29c46825563
public static Direction getApproximateNearest(double x, double y, double z) {
diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java
index 1866d857cabde481f23e861e0db7994bfa84ac40..de2a22fde8d91f13ccae347de48f4143d5749a6c 100644
index f60c1ab58a2e9adfb01e9bd430b92cd1902e5dbe..37ad60f2be694c22bfef402c38c8206348bf36a5 100644
--- a/net/minecraft/world/phys/AABB.java
+++ b/net/minecraft/world/phys/AABB.java
@@ -19,6 +19,15 @@ public class AABB {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Command block parse results caching
diff --git a/net/minecraft/world/level/BaseCommandBlock.java b/net/minecraft/world/level/BaseCommandBlock.java
index 0eb88c24c66b521fd34d2fda6e6e21e3ecc6ac88..430084381e9aa3e53afb59b58021ab6c3c70db03 100644
index d823f95a823f599db2c80f888e4b1a411fa4d3aa..6438b98628bb8eaa1e57276de2bc6b8741731eab 100644
--- a/net/minecraft/world/level/BaseCommandBlock.java
+++ b/net/minecraft/world/level/BaseCommandBlock.java
@@ -37,6 +37,10 @@ public abstract class BaseCommandBlock implements CommandSource {
@@ -34,6 +34,10 @@ public abstract class BaseCommandBlock implements CommandSource {
private String command = "";
@Nullable
private Component customName;
@@ -19,7 +19,7 @@ index 0eb88c24c66b521fd34d2fda6e6e21e3ecc6ac88..430084381e9aa3e53afb59b58021ab6c
// CraftBukkit start
@Override
public abstract org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper);
@@ -119,7 +123,35 @@ public abstract class BaseCommandBlock implements CommandSource {
@@ -113,7 +117,35 @@ public abstract class BaseCommandBlock implements CommandSource {
this.successCount++;
}
});
@@ -56,7 +56,7 @@ index 0eb88c24c66b521fd34d2fda6e6e21e3ecc6ac88..430084381e9aa3e53afb59b58021ab6c
} catch (Throwable var6) {
CrashReport crashReport = CrashReport.forThrowable(var6, "Executing command block");
CrashReportCategory crashReportCategory = crashReport.addCategory("Command to be executed");
@@ -139,6 +171,13 @@ public abstract class BaseCommandBlock implements CommandSource {
@@ -133,6 +165,13 @@ public abstract class BaseCommandBlock implements CommandSource {
}
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Leaf: Improve BlockEntity ticking isRemoved check
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
index 7eb6da13dc47eaeac6e70d4e2935c1cc022c6400..d2eed7a0cf0c2c9dbcfb272cf89194f11d37151c 100644
index df086a2580ee41f88a00fb78b50b87f22539b833..868881e2b8567d1a03eee4f4a9f611bbc36c66d0 100644
--- a/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
@@ -992,13 +992,26 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -999,13 +999,26 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
public static class RebindableTickingBlockEntityWrapper implements TickingBlockEntity {
public TickingBlockEntity ticker;
@@ -35,7 +35,7 @@ index 7eb6da13dc47eaeac6e70d4e2935c1cc022c6400..d2eed7a0cf0c2c9dbcfb272cf89194f1
}
@Override
@@ -1008,6 +1021,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -1015,6 +1028,12 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@Override
public boolean isRemoved() {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable movement speed for entities
diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java
index ea90e3d7ad84e301f975ff91fade63c5429972cf..d3d8e140eb597d054bb6ca7a2b6f2fe4903e48ae 100644
index edcb20935f58e78fa4ef2c11a7dcc6a7857341c2..d4e7fc0a5bda4f44bcfed3d1adae7cdaf815784b 100644
--- a/net/minecraft/world/entity/monster/Drowned.java
+++ b/net/minecraft/world/entity/monster/Drowned.java
@@ -97,6 +97,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
@@ -98,6 +98,7 @@ public class Drowned extends Zombie implements RangedAttackMob {
public void initAttributes() {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.drownedMaxHealth);
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.drownedScale);
@@ -29,10 +29,10 @@ index a4ce65911a5d778f60bcedb3acd9fe59a5094c96..f359bfedd2d6fbd1c2d77d664157c472
@Override
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..b914cf4f62a1e729e12c2b2c4e5bae8f349e9bd9 100644
index ab4dc7b3a7593d255dbd7d1df667fce3504af3ed..86fd1eb0b9e235f58fb9eca3f384f001b2330907 100644
--- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -127,6 +127,7 @@ public class Zombie extends Monster {
@@ -126,6 +126,7 @@ public class Zombie extends Monster {
public void initAttributes() {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieMaxHealth);
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombieScale);
@@ -40,7 +40,7 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..b914cf4f62a1e729e12c2b2c4e5bae8f
}
// Purpur end - Configurable entity base attributes
@@ -194,7 +195,6 @@ public class Zombie extends Monster {
@@ -193,7 +194,6 @@ public class Zombie extends Monster {
public static AttributeSupplier.Builder createAttributes() {
return Monster.createMonsterAttributes()
.add(Attributes.FOLLOW_RANGE, 35.0)
@@ -49,10 +49,10 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..b914cf4f62a1e729e12c2b2c4e5bae8f
.add(Attributes.ARMOR, 2.0)
.add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java
index e201b8348d3f816e73b9dc43b2c30681199ec767..b9291d89b06e58c02afa088fd20369ed9901e741 100644
index 00af89717bf2459b315baf70a515a0e68267fb9f..438e07863f85d83874373b9d2407c0c383ba5722 100644
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -98,6 +98,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@@ -97,6 +97,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@Override
public void initAttributes() {
this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieVillagerMaxHealth);
@@ -61,10 +61,10 @@ index e201b8348d3f816e73b9dc43b2c30681199ec767..b9291d89b06e58c02afa088fd20369ed
@Override
diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
index 39489c8a347031fb4f73faca46039786e35762ac..701311b6988cd7d349d3e0fade665a9d4448c544 100644
index f58c48d9de85fda3d13079f3e56b31af75b3c725..db43ea25cb817c10bde1a30076d4b1f6266651d6 100644
--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
+++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
@@ -85,6 +85,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
@@ -86,6 +86,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
public void initAttributes() {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombifiedPiglinMaxHealth);
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombifiedPiglinScale);
@@ -72,7 +72,7 @@ index 39489c8a347031fb4f73faca46039786e35762ac..701311b6988cd7d349d3e0fade665a9d
}
// Purpur end - Configurable entity base attributes
@@ -136,7 +137,6 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
@@ -137,7 +138,6 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
public static AttributeSupplier.Builder createAttributes() {
return Zombie.createAttributes()
.add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0)

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Dynamic Activation of Brain
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
index 265f20fd771df850a0bb0029e699d3146d883837..62aaa45f512ed77e4901a2e703431594a32b615e 100644
index ca21597263cb430e2a5ae07e8cecfb0d53a270d2..226088405c019922085285ba5d04d7c131470c69 100644
--- a/io/papermc/paper/entity/activation/ActivationRange.java
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
@@ -161,6 +161,21 @@ public final class ActivationRange {
@@ -167,6 +167,21 @@ public final class ActivationRange {
}
ActivationRange.activateEntity(entity);
@@ -31,10 +31,10 @@ index 265f20fd771df850a0bb0029e699d3146d883837..62aaa45f512ed77e4901a2e703431594
}
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 6f62f5751932a1007d63a77a28d07fbd51eaa798..4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa 100644
index 05b8834b5566ac12655b563a1a58f123275fdedb..e05a0eed63098c535360b66276f154e4dc119d6a 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -802,6 +802,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -804,6 +804,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.entityTickList
.forEach(
entity -> {
@@ -43,10 +43,10 @@ index 6f62f5751932a1007d63a77a28d07fbd51eaa798..4890db5bf0358d1d3bb1c7d3894339d4
if (!tickRateManager.isEntityFrozen(entity)) {
entity.checkDespawn();
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index d80f5b6039a4e49ddbf5598f68137e7c17b388c5..3b754db2db36d9e2398efe2f5286b70f20470c2c 100644
index 55e82d490ed3489ff671ae8a49745571c4bfb993..e96eeae793d127b76a2fe6853cba49ce192b91f9 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -344,6 +344,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -365,6 +365,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public boolean fixedPose = false; // Paper - Expand Pose API
private final int despawnTime; // Paper - entity despawn time limit
public int totalEntityAge; // Paper - age-like counter for all entities
@@ -56,10 +56,10 @@ index d80f5b6039a4e49ddbf5598f68137e7c17b388c5..3b754db2db36d9e2398efe2f5286b70f
// Paper start - EAR 2
public final boolean defaultActivationState;
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
index d6a0ad078fd1f0350afaac3f1743896d73b015e1..50bc352f4d918678a479a39b218973f7cd0500c7 100644
index c960166814cdb3043a38de40c59cb067ae936ba3..79d93bb4c7dd0f7c8c4cc8bafb893a0d93f70f2b 100644
--- a/net/minecraft/world/entity/EntityType.java
+++ b/net/minecraft/world/entity/EntityType.java
@@ -1075,6 +1075,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -1085,6 +1085,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
private final boolean canSpawnFarFromPlayer;
private final int clientTrackingRange;
private final int updateInterval;
@@ -68,10 +68,10 @@ index d6a0ad078fd1f0350afaac3f1743896d73b015e1..50bc352f4d918678a479a39b218973f7
@Nullable
private Component description;
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index a65c86b411c15bbdfd431dac00e510d2262e65e1..29624bff8655ec8ad6404a4b8438d845f68afc99 100644
index fd586acb15362a461c77256c6db9cc3a8002750d..7f1b36ca38a15aa987afb8069fd4e34bed4c569a 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -206,10 +206,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -209,10 +209,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
public void inactiveTick() {
super.inactiveTick();
@@ -84,7 +84,7 @@ index a65c86b411c15bbdfd431dac00e510d2262e65e1..29624bff8655ec8ad6404a4b8438d845
this.targetSelector.tick();
}
}
@@ -754,13 +754,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -771,13 +771,19 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
// Paper end - Allow nerfed mobs to jump and float
this.sensing.tick();
int i = this.tickCount + this.getId();
@@ -126,10 +126,10 @@ index f6c673b1abe53afcb14fd68d590431027ed29f67..1e5312e02298c63c168526a960d688dc
}
}
diff --git a/net/minecraft/world/entity/ai/goal/GoalSelector.java b/net/minecraft/world/entity/ai/goal/GoalSelector.java
index b816b2de8eb327060ca6ea7c4afc17373fa77ff6..6d90235c35a78d1167181cbaa05c5e7644ff27a8 100644
index 653c58c7637c46c8b46a5082f671324a2221d431..a4328a427636aa845d6627ecb75a9efe7320bb15 100644
--- a/net/minecraft/world/entity/ai/goal/GoalSelector.java
+++ b/net/minecraft/world/entity/ai/goal/GoalSelector.java
@@ -36,10 +36,14 @@ public class GoalSelector {
@@ -34,10 +34,14 @@ public class GoalSelector {
}
// Paper start - EAR 2
@@ -147,10 +147,10 @@ index b816b2de8eb327060ca6ea7c4afc17373fa77ff6..6d90235c35a78d1167181cbaa05c5e76
public boolean hasTasks() {
for (WrappedGoal task : this.availableGoals) {
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
index 29c22b464705f1b50ec0e423c5df40d8f21e57b7..76d99e4a89fe7df736b836a165d829def489c07b 100644
index c5275d6069a491c3c2b2de175b76fb871b667b0c..8c5d807b224fcce00c124845d782b31d47df2f20 100644
--- a/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
@@ -116,6 +116,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -113,6 +113,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
private float spinningAnimationTicks0;
public boolean forceDancing = false; // CraftBukkit
private org.purpurmc.purpur.controller.FlyingMoveControllerWASD purpurController; // Purpur - Ridables
@@ -158,7 +158,7 @@ index 29c22b464705f1b50ec0e423c5df40d8f21e57b7..76d99e4a89fe7df736b836a165d829de
public Allay(EntityType<? extends Allay> entityType, Level level) {
super(entityType, level);
@@ -283,9 +284,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@@ -268,9 +269,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -176,10 +176,10 @@ index 29c22b464705f1b50ec0e423c5df40d8f21e57b7..76d99e4a89fe7df736b836a165d829de
@Override
diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
index 0b787911c929f1564d859dcba1ee04510b4a9b7f..b3c09fe1a86f6a47448d4e71261ff34664758c17 100644
index 6931bc84594362579a1832cb8ccda501e9fb0631..4e84f2faef81ba596ff1017a666c34cdb7c5c3f2 100644
--- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java
+++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
@@ -110,6 +110,7 @@ public class Axolotl extends Animal implements Bucketable {
@@ -112,6 +112,7 @@ public class Axolotl extends Animal implements Bucketable {
public final BinaryAnimator onGroundAnimator = new BinaryAnimator(10, Mth::easeInOutSine);
public final BinaryAnimator movingAnimator = new BinaryAnimator(10, Mth::easeInOutSine);
private static final int REGEN_BUFF_BASE_DURATION = 100;
@@ -187,7 +187,7 @@ index 0b787911c929f1564d859dcba1ee04510b4a9b7f..b3c09fe1a86f6a47448d4e71261ff346
public Axolotl(EntityType<? extends Axolotl> entityType, Level level) {
super(entityType, level);
@@ -372,12 +373,16 @@ public class Axolotl extends Animal implements Bucketable {
@@ -374,12 +375,16 @@ public class Axolotl extends Animal implements Bucketable {
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -210,10 +210,10 @@ index 0b787911c929f1564d859dcba1ee04510b4a9b7f..b3c09fe1a86f6a47448d4e71261ff346
public static AttributeSupplier.Builder createAttributes() {
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
index 433233f3fb346c15627cf0ad313ea55579826d86..e11c9aa9c7ba3ed3ecf4812679e23836d3187597 100644
index 81f0e444ccb6962d675e3a097341683d504d0889..1c9f3f0b2a344c026532c89c0db377ab8183c912 100644
--- a/net/minecraft/world/entity/animal/frog/Frog.java
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
@@ -105,6 +105,7 @@ public class Frog extends Animal {
@@ -106,6 +106,7 @@ public class Frog extends Animal {
public final AnimationState swimIdleAnimationState = new AnimationState();
private org.purpurmc.purpur.controller.MoveControllerWASD purpurLandController; // Purpur - Ridables
private org.purpurmc.purpur.controller.WaterMoveControllerWASD purpurWaterController; // Purpur - Ridables
@@ -221,7 +221,7 @@ index 433233f3fb346c15627cf0ad313ea55579826d86..e11c9aa9c7ba3ed3ecf4812679e23836
public Frog(EntityType<? extends Animal> entityType, Level level) {
super(entityType, level);
@@ -259,9 +260,13 @@ public class Frog extends Animal {
@@ -260,9 +261,13 @@ public class Frog extends Animal {
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -239,10 +239,10 @@ index 433233f3fb346c15627cf0ad313ea55579826d86..e11c9aa9c7ba3ed3ecf4812679e23836
@Override
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
index 63645451495dffd87362fd37cf91a90717ae4470..615655b41eb51b18b9517110e463ef44837ff8dc 100644
index c0e12a6e5dd2b7e12e4cc40f6795228de6b470cc..d8eb93431f4ef8720ccfd58cf5e7942ccb1184c2 100644
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -63,6 +63,7 @@ public class Tadpole extends AbstractFish {
@@ -65,6 +65,7 @@ public class Tadpole extends AbstractFish {
);
public boolean ageLocked; // Paper
private org.purpurmc.purpur.controller.WaterMoveControllerWASD purpurController; // Purpur - Ridables
@@ -250,7 +250,7 @@ index 63645451495dffd87362fd37cf91a90717ae4470..615655b41eb51b18b9517110e463ef44
public Tadpole(EntityType<? extends AbstractFish> entityType, Level level) {
super(entityType, level);
@@ -134,9 +135,13 @@ public class Tadpole extends AbstractFish {
@@ -136,9 +137,13 @@ public class Tadpole extends AbstractFish {
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -268,10 +268,10 @@ index 63645451495dffd87362fd37cf91a90717ae4470..615655b41eb51b18b9517110e463ef44
public static AttributeSupplier.Builder createAttributes() {
diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java
index 01e1712854aaebc59db844045141b25561df8fc3..45aac1f956a54368f33e1292ba2dbfdd3e426bd0 100644
index 36fcc913385afec8bb66c1664b902e4d6868f11d..ec72612cb69a2483349e29eb88063ed717a60029 100644
--- a/net/minecraft/world/entity/animal/goat/Goat.java
+++ b/net/minecraft/world/entity/animal/goat/Goat.java
@@ -93,6 +93,7 @@ public class Goat extends Animal {
@@ -94,6 +94,7 @@ public class Goat extends Animal {
private static final boolean DEFAULT_HAS_RIGHT_HORN = true;
private boolean isLoweringHead;
private int lowerHeadTick;
@@ -279,7 +279,7 @@ index 01e1712854aaebc59db844045141b25561df8fc3..45aac1f956a54368f33e1292ba2dbfdd
public Goat(EntityType<? extends Goat> entityType, Level level) {
super(entityType, level);
@@ -233,9 +234,13 @@ public class Goat extends Animal {
@@ -234,9 +235,13 @@ public class Goat extends Animal {
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -297,10 +297,10 @@ index 01e1712854aaebc59db844045141b25561df8fc3..45aac1f956a54368f33e1292ba2dbfdd
@Override
diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
index 0644f425cddebe8e5a65e69acae57db867380981..56fb3c23a265403a20cfab551aa002792cd942ea 100644
index 04244779a152a531ba148c450450d11a13d78a6c..eeb5b9f19827ee667f4fb210d1b882fb6eaebc19 100644
--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
+++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
@@ -87,6 +87,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
@@ -88,6 +88,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
MemoryModuleType.PACIFIED,
MemoryModuleType.IS_PANICKING
);
@@ -308,7 +308,7 @@ index 0644f425cddebe8e5a65e69acae57db867380981..56fb3c23a265403a20cfab551aa00279
public Hoglin(EntityType<? extends Hoglin> entityType, Level level) {
super(entityType, level);
@@ -206,17 +207,21 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
@@ -207,17 +208,21 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -340,10 +340,10 @@ index 0644f425cddebe8e5a65e69acae57db867380981..56fb3c23a265403a20cfab551aa00279
@Override
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index ce0dca4f8cd903037f6fe011d34a17d08ff5a907..23bf006b0698eed832a3ce28ec8dc8235792c9f6 100644
index 94c1e65a4d7d59e967f31c2692e9b448faf67a55..472f48965dc7806ca751a397cbe1b04802f065cd 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -128,6 +128,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -129,6 +129,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
private static final com.mojang.serialization.Codec<java.util.Set<net.minecraft.world.item.Item>> ITEM_SET_CODEC = net.minecraft.core.registries.BuiltInRegistries.ITEM
.byNameCodec().listOf().xmap(java.util.HashSet::new, List::copyOf);
// CraftBukkit end
@@ -351,7 +351,7 @@ index ce0dca4f8cd903037f6fe011d34a17d08ff5a907..23bf006b0698eed832a3ce28ec8dc823
public Piglin(EntityType<? extends AbstractPiglin> entityType, Level level) {
super(entityType, level);
@@ -357,9 +358,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@@ -358,9 +359,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
@Override
protected void customServerAiStep(ServerLevel level) {
//if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Purpur - only use brain if no rider
@@ -369,10 +369,10 @@ index ce0dca4f8cd903037f6fe011d34a17d08ff5a907..23bf006b0698eed832a3ce28ec8dc823
@Override
diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java
index 39b9dc1e78c1f9fc6a5ccad0de56cdb6d0781a05..db05fed2d0050796dfa32cbfc4206323252a30ca 100644
index 0440cbbc0d6657f32dc37a1dbbe9ee78f8e229cf..4944b6d389c65511eed75d580779f912b8ff076d 100644
--- a/net/minecraft/world/entity/monster/warden/Warden.java
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
@@ -110,6 +110,7 @@ public class Warden extends Monster implements VibrationSystem {
@@ -108,6 +108,7 @@ public class Warden extends Monster implements VibrationSystem {
private final VibrationSystem.User vibrationUser;
private VibrationSystem.Data vibrationData;
AngerManagement angerManagement = new AngerManagement(this::canTargetEntity, Collections.emptyList());
@@ -380,7 +380,7 @@ index 39b9dc1e78c1f9fc6a5ccad0de56cdb6d0781a05..db05fed2d0050796dfa32cbfc4206323
public Warden(EntityType<? extends Monster> entityType, Level level) {
super(entityType, level);
@@ -303,18 +304,22 @@ public class Warden extends Monster implements VibrationSystem {
@@ -301,18 +302,22 @@ public class Warden extends Monster implements VibrationSystem {
@Override
protected void customServerAiStep(ServerLevel level) {
@@ -414,10 +414,10 @@ index 39b9dc1e78c1f9fc6a5ccad0de56cdb6d0781a05..db05fed2d0050796dfa32cbfc4206323
@Override
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
index aace211c23ab9026792a77e5ed5c5eac4311f391..2e2745cd8e3383455656c95214779754cc890b33 100644
index 497974779b281ced8e3dd757dbdf52abc0e0328b..3e23bc54e0315b6324843851e072005ca4da3f8e 100644
--- a/net/minecraft/world/entity/npc/Villager.java
+++ b/net/minecraft/world/entity/npc/Villager.java
@@ -178,6 +178,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -179,6 +179,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
);
private boolean isLobotomized = false; public boolean isLobotomized() { return this.isLobotomized; } // Purpur - Lobotomize stuck villagers
private int notLobotomizedCount = 0; // Purpur - Lobotomize stuck villagers
@@ -426,7 +426,7 @@ index aace211c23ab9026792a77e5ed5c5eac4311f391..2e2745cd8e3383455656c95214779754
public Villager(EntityType<? extends Villager> entityType, Level level) {
this(entityType, level, VillagerType.PLAINS);
@@ -400,7 +402,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -401,7 +403,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}
// Purpur end - Lobotomize stuck villagers
// Pufferfish start

View File

@@ -54,10 +54,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..8713d00d767c9225a0823d2fdbb0b479
+ public void moonrise$write(final org.bxteam.divinemc.region.IRegionFile regionFile) throws IOException; // DivineMC - Linear region file format
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index ce79e6db9ab1a49005d1163641dd32050a2f9a41..3deced447eb80fec362e1b8b3bea817b36074fbc 100644
index f484d4b72e1919762dec1a219f0e51e1eacea37f..813a60771b8a6618090f1ea713b70a617ca28308 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -926,10 +926,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -928,10 +928,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
if (flush) {
for (ServerLevel serverLevel2 : this.getAllLevels()) {
@@ -71,7 +71,7 @@ index ce79e6db9ab1a49005d1163641dd32050a2f9a41..3deced447eb80fec362e1b8b3bea817b
return flag;
diff --git a/net/minecraft/util/worldupdate/WorldUpgrader.java b/net/minecraft/util/worldupdate/WorldUpgrader.java
index 559bd4eef7174b04f5aa71b982ba34cbace8da8a..6f4a2eae572d0268600d815aa0fe13577c1e14b6 100644
index 79d57ca8a7870a02e95562d89cbd4341d8282660..b5711b348a2e1480b041587c220af5872ead2c56 100644
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
@@ -75,7 +75,7 @@ public class WorldUpgrader implements AutoCloseable {

View File

@@ -175,10 +175,10 @@ index 345d4b80bd4383e0fb66d744d87bc8ef4100fd32..68a074a1eb11b158af773a2c44aa49d5
private static boolean isRightDistanceToPlayerAndSpawnPoint(ServerLevel level, ChunkAccess chunk, BlockPos.MutableBlockPos pos, double distance) {
diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java
index 42458418e6217adba28f729f04904814542eaa17..d4f95214ffbdedfee9e22f4a76d207ba538c6557 100644
index 5e9f3856c384dbb2bd462121b903cd2b326e4376..19f74518923783d8d5560b526a1f267dabd23156 100644
--- a/net/minecraft/world/level/chunk/ChunkAccess.java
+++ b/net/minecraft/world/level/chunk/ChunkAccess.java
@@ -91,6 +91,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
@@ -92,6 +92,7 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(ChunkAccess.DATA_TYPE_REGISTRY);
// CraftBukkit end
public final Registry<Biome> biomeRegistry; // CraftBukkit
@@ -187,10 +187,10 @@ index 42458418e6217adba28f729f04904814542eaa17..d4f95214ffbdedfee9e22f4a76d207ba
// Paper start - rewrite chunk system
private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles;
diff --git a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4f349c4a7 100644
index e04d3479383cd480cf35ed7ac3c82e7f6fb69e28..87abba1241552fe967229f1b442cd0a767cbf739 100644
--- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
+++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
@@ -92,6 +92,7 @@ public record SerializableChunkData(
@@ -94,6 +94,7 @@ public record SerializableChunkData(
List<CompoundTag> blockEntities,
CompoundTag structureData
, @Nullable net.minecraft.nbt.Tag persistentDataContainer // CraftBukkit - persistentDataContainer
@@ -198,7 +198,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
) {
public static final Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC = PalettedContainer.codecRW(
Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState(), null // Paper - Anti-Xray
@@ -188,6 +189,19 @@ public record SerializableChunkData(
@@ -190,6 +191,19 @@ public record SerializableChunkData(
lists[i] = list2;
}
@@ -218,7 +218,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
List<CompoundTag> list3 = tag.getList("entities").stream().flatMap(ListTag::compoundStream).toList();
List<CompoundTag> list4 = tag.getList("block_entities").stream().flatMap(ListTag::compoundStream).toList();
CompoundTag compoundOrEmpty = tag.getCompoundOrEmpty("structures");
@@ -268,6 +282,7 @@ public record SerializableChunkData(
@@ -270,6 +284,7 @@ public record SerializableChunkData(
list4,
compoundOrEmpty
, tag.get("ChunkBukkitValues") // CraftBukkit - ChunkBukkitValues
@@ -226,7 +226,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
);
}
}
@@ -424,6 +439,15 @@ public record SerializableChunkData(
@@ -426,6 +441,15 @@ public record SerializableChunkData(
chunkAccess.addPackedPostProcess(this.postProcessingSections[i], i);
}
@@ -242,7 +242,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
if (chunkType == ChunkType.LEVELCHUNK) {
return this.loadStarlightLightData(level, new ImposterProtoChunk((LevelChunk)chunkAccess, false)); // Paper - starlight
} else {
@@ -554,6 +578,7 @@ public record SerializableChunkData(
@@ -556,6 +580,7 @@ public record SerializableChunkData(
persistentDataContainer = chunk.persistentDataContainer.toTagCompound();
}
// CraftBukkit end
@@ -250,7 +250,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
return new SerializableChunkData(
level.registryAccess().lookupOrThrow(Registries.BIOME),
pos,
@@ -574,6 +599,7 @@ public record SerializableChunkData(
@@ -576,6 +601,7 @@ public record SerializableChunkData(
list1,
compoundTag
, persistentDataContainer // CraftBukkit - persistentDataContainer
@@ -258,7 +258,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
);
}
}
@@ -658,6 +684,21 @@ public record SerializableChunkData(
@@ -660,6 +686,21 @@ public record SerializableChunkData(
compoundTag.put("ChunkBukkitValues", this.persistentDataContainer);
}
// CraftBukkit end
@@ -280,7 +280,7 @@ index 749096358fccbd5d1d13801092255c51096eb001..23b54c108c99b40f8ac8a695b18525a4
// Paper start - starlight
if (this.lightCorrect && !this.chunkStatus.isBefore(net.minecraft.world.level.chunk.status.ChunkStatus.LIGHT)) {
// clobber vanilla value to force vanilla to relight
@@ -865,4 +906,49 @@ public record SerializableChunkData(
@@ -875,4 +916,49 @@ public record SerializableChunkData(
}
// Paper end - starlight - convert from record
}

View File

@@ -5,19 +5,19 @@ Subject: [PATCH] Async mob spawning
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 3deced447eb80fec362e1b8b3bea817b36074fbc..b5103e14f25f4cf92438214f2fc3ada552dce742 100644
index 813a60771b8a6618090f1ea713b70a617ca28308..9e83d0ec1a0976f365fa6cb3f1b7db167641b336 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
protected boolean upnp = false; // Purpur - UPnP Port Forwarding
public final org.bxteam.divinemc.util.tps.TPSCalculator tpsCalculator = new org.bxteam.divinemc.util.tps.TPSCalculator(); // DivineMC - Lag compensation
public final Set<net.minecraft.world.entity.Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // DivineMC - Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
+ public org.bxteam.divinemc.util.AsyncProcessor mobSpawnExecutor = new org.bxteam.divinemc.util.AsyncProcessor("mob_spawning"); // DivineMC - Async mob spawning
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
index 9a65321ce62f21b150d29be30dbae7dba0ff40be..4ff1f78eb963e2baf0c2871b4fea624c271f4348 100644
index 2873642844c683ae4388ae27a045e01441d15426..adc2104447d738fd9f76d2e69690f0c76a41b844 100644
--- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -182,6 +182,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon

View File

@@ -8,7 +8,7 @@ Integration with Imanity Software's Raytrace AntiXray for better use of this plu
Original project: https://github.com/Imanity-Software/raytrace-antixray-spigot-sdk
diff --git a/net/minecraft/server/level/ServerPlayerGameMode.java b/net/minecraft/server/level/ServerPlayerGameMode.java
index d1f74d10e5e3d65895d7e87dd77f298cd9689b33..8fdc5ab8bfba0e40cedfac64d6bc5e24d1cca969 100644
index c4a4f08272b34f72dea4feaaeb66d153b2aab8c8..be5da5a81246b4f4abe19f7c0cf68990d6bdf5bd 100644
--- a/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -296,6 +296,12 @@ public class ServerPlayerGameMode {
@@ -25,10 +25,10 @@ index d1f74d10e5e3d65895d7e87dd77f298cd9689b33..8fdc5ab8bfba0e40cedfac64d6bc5e24
}
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index c01463194470624ecd84209100fdbdc851028fb7..3577017125e508db86a022e96355bdb6923ce3d4 100644
index 6e8075618baf98fcc396f0b5e241a806805b3d94..37f5bd2a63e2ec074fbc55d366e0d128f1918089 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -1173,6 +1173,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1171,6 +1171,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
snapshot.setFlags(flags); // Paper - always set the flag of the most recent call to mitigate issues with multiple update at the same pos with different flags
}
BlockState blockState = chunkAt.setBlockState(pos, state, flags);

View File

@@ -59,18 +59,18 @@ index ac27ff24f018d8798921c5152e679ceed1e88d8d..ec7d1353b19e55b00c558df8981323ef
List<org.bukkit.block.BlockState> states = new java.util.ArrayList<>(level.capturedBlockStates.values());
level.capturedBlockStates.clear();
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index b5103e14f25f4cf92438214f2fc3ada552dce742..bc157a799b03ac0e797a6980c43f19bf4fb3f09c 100644
index 9e83d0ec1a0976f365fa6cb3f1b7db167641b336..6f08d761ee52d65a57fd01cf7bffa461dc1b898b 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -291,6 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final org.bxteam.divinemc.util.tps.TPSCalculator tpsCalculator = new org.bxteam.divinemc.util.tps.TPSCalculator(); // DivineMC - Lag compensation
public final Set<net.minecraft.world.entity.Entity> entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // DivineMC - Skip EntityScheduler's executeTick checks if there isn't any tasks to be run
public org.bxteam.divinemc.util.AsyncProcessor mobSpawnExecutor = new org.bxteam.divinemc.util.AsyncProcessor("mob_spawning"); // DivineMC - Async mob spawning
+ public java.util.concurrent.Semaphore serverLevelTickingSemaphore = null; // DivineMC - Parallel world ticking
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
@@ -321,24 +322,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
@@ -323,24 +324,36 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private long lastMidTickExecute;
private long lastMidTickExecuteFailure;
@@ -210,7 +210,7 @@ index b5103e14f25f4cf92438214f2fc3ada552dce742..bc157a799b03ac0e797a6980c43f19bf
}
// CraftBukkit end
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index b65c8e393249b0fc731e02262d58873cb38942b8..48033df6b384a21a59e8051e7d1f880e1af3c78c 100644
index 19a3ba355694e7c26c233b216807cb23c82548be..245ffc68aac80d99849290bfefe5cb613eef5d81 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -224,6 +224,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -228,19 +228,19 @@ index b65c8e393249b0fc731e02262d58873cb38942b8..48033df6b384a21a59e8051e7d1f880e
this.setFlightAllowed(properties.allowFlight);
this.setMotd(properties.motd);
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e71873e8e 100644
index e05a0eed63098c535360b66276f154e4dc119d6a..0102d87411dcf0bba7f6873dc54385c957a7e2d7 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -179,7 +179,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -181,7 +181,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public final net.minecraft.world.level.storage.PrimaryLevelData serverLevelData; // CraftBukkit - type
public final ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.LevelHolderData chunkHolderData; // DivineMC - Chunk System optimization
private int lastSpawnChunkRadius;
- final EntityTickList entityTickList = new EntityTickList();
+ final EntityTickList entityTickList = new EntityTickList(this); // DivineMC - Parallel world ticking
private final ServerWaypointManager waypointManager;
// Paper - rewrite chunk system
private final GameEventDispatcher gameEventDispatcher;
public boolean noSave;
@@ -205,6 +205,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -208,6 +208,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private double preciseTime; // Purpur - Configurable daylight cycle
private boolean forceTime; // Purpur - Configurable daylight cycle
private final RandomSequences randomSequences;
@@ -248,15 +248,15 @@ index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e
// CraftBukkit start
public final LevelStorageSource.LevelStorageAccess levelStorageAccess;
@@ -695,6 +696,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -698,6 +699,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
+ this.tickExecutor = java.util.concurrent.Executors.newSingleThreadExecutor(new org.bxteam.divinemc.server.ServerLevelTickExecutorThreadFactory(getWorld().getName())); // DivineMC - Parallel world ticking
this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle
this.chunkSystemPriorities = new org.bxteam.divinemc.server.chunk.PriorityHandler(this); // DivineMC - Chunk System optimizations
this.ominousBanner = Objects.requireNonNullElse(this.registryAccess(), net.minecraft.core.RegistryAccess.EMPTY).lookup(Registries.BANNER_PATTERN).map(Raid::getOminousBannerInstance).orElse(null); // DivineMC - Optimize Raids
@@ -1293,12 +1295,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
@@ -1300,12 +1302,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (fluidState.is(fluid)) {
fluidState.tick(this, pos, blockState);
}
@@ -274,7 +274,7 @@ index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e
}
private void tickBlock(BlockPos pos, Block block) {
@@ -1306,12 +1308,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1313,12 +1315,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (blockState.is(block)) {
blockState.tick(this, pos, this.random);
}
@@ -292,7 +292,7 @@ index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e
}
// Paper start - log detailed entity tick information
@@ -1547,6 +1549,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1568,6 +1570,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
private void addPlayer(ServerPlayer player) {
@@ -300,7 +300,7 @@ index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e
Entity entity = this.getEntity(player.getUUID());
if (entity != null) {
LOGGER.warn("Force-added player with duplicate UUID {}", player.getUUID());
@@ -1559,7 +1562,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1580,7 +1583,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// CraftBukkit start
private boolean addEntity(Entity entity, @Nullable org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
@@ -316,18 +316,18 @@ index 4890db5bf0358d1d3bb1c7d3894339d4bdccfbaa..a14b3c918f9d8021c5f1758fcb38572e
// Paper start - extra debug info
if (entity.valid) {
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index fa9bbf447b32e27a8714950215b36233712a025d..381b2608bb4989c2888ef8338e8fac1758be9f60 100644
index bedc28c355b2c1e5a2ca4a1559c29101525c51e2..3b87d3f889db67e4913691b2cd50dddd2a2faf7d 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -452,6 +452,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -463,6 +463,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return this.viewDistanceHolder;
}
// Paper end - rewrite chunk system
+ public boolean hasTickedAtLeastOnceInNewWorld = false; // DivineMC - Parallel world ticking
public ServerPlayer(MinecraftServer server, ServerLevel level, GameProfile gameProfile, ClientInformation clientInformation) {
super(level, level.getSharedSpawnPos(), level.getSharedSpawnAngle(), gameProfile);
@@ -745,6 +746,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
super(level, gameProfile);
@@ -750,6 +751,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@Override
public void tick() {
@@ -335,15 +335,15 @@ index fa9bbf447b32e27a8714950215b36233712a025d..381b2608bb4989c2888ef8338e8fac17
// CraftBukkit start
if (this.joining) {
this.joining = false;
@@ -1395,6 +1397,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1427,6 +1429,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return this;
} else {
// CraftBukkit start
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot change dimension of a player off-main, from world " + serverLevel().getWorld().getName() + " to world " + level.getWorld().getName()); // DivineMC - Parallel world ticking (additional concurrency issues logs)
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot change dimension of a player off-main, from world " + level().getWorld().getName() + " to world " + level.getWorld().getName()); // DivineMC - Parallel world ticking (additional concurrency issues logs)
/*
this.isChangingDimension = true;
LevelData levelData = level.getLevelData();
@@ -1736,6 +1739,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1772,6 +1775,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return OptionalInt.empty();
} else {
// CraftBukkit start
@@ -356,7 +356,7 @@ index fa9bbf447b32e27a8714950215b36233712a025d..381b2608bb4989c2888ef8338e8fac17
this.containerMenu = abstractContainerMenu; // Moved up
if (!this.isImmobile())
this.connection
@@ -1800,6 +1809,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1836,6 +1845,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
}
@Override
public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
@@ -369,10 +369,10 @@ index fa9bbf447b32e27a8714950215b36233712a025d..381b2608bb4989c2888ef8338e8fac17
// Paper end - Inventory close reason
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index 21ea5de6bf2d034d63dab1d7c563b63b3e713521..1b9db93ef1ee47200c5cc01caf55821b08e6a695 100644
index 8bf5f7a98e4e8542d56c49a7e2c4926ec86f712d..e1ca822d41311e3be44c52badb907619ca681cf9 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -150,6 +150,7 @@ public abstract class PlayerList {
@@ -149,6 +149,7 @@ public abstract class PlayerList {
abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
@@ -380,22 +380,22 @@ index 21ea5de6bf2d034d63dab1d7c563b63b3e713521..1b9db93ef1ee47200c5cc01caf55821b
player.isRealPlayer = true; // Paper
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
GameProfile gameProfile = player.getGameProfile();
@@ -715,6 +716,14 @@ public abstract class PlayerList {
@@ -711,6 +712,14 @@ public abstract class PlayerList {
}
public ServerPlayer respawn(ServerPlayer player, boolean keepInventory, Entity.RemovalReason reason, @Nullable org.bukkit.event.player.PlayerRespawnEvent.RespawnReason eventReason, @Nullable org.bukkit.Location location) {
+ // DivineMC start - Parallel world ticking
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) {
+ if (location != null)
+ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot respawn player off-main, from world " + player.serverLevel().getWorld().getName() + " to world " + location.getWorld().getName());
+ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot respawn player off-main, from world " + player.level().getWorld().getName() + " to world " + location.getWorld().getName());
+ else
+ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot respawn player off-main, respawning in world " + player.serverLevel().getWorld().getName());
+ ca.spottedleaf.moonrise.common.util.TickThread.ensureOnlyTickThread("Cannot respawn player off-main, respawning in world " + player.level().getWorld().getName());
+ }
+ // DivineMC end - Parallel world ticking
this.players.remove(player);
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
player.serverLevel().removePlayerImmediately(player, reason);
@@ -724,6 +733,7 @@ public abstract class PlayerList {
player.level().removePlayerImmediately(player, reason);
@@ -720,6 +729,7 @@ public abstract class PlayerList {
ServerPlayer serverPlayer = player;
Level fromWorld = player.level();
player.wonGame = false;
@@ -404,10 +404,10 @@ index 21ea5de6bf2d034d63dab1d7c563b63b3e713521..1b9db93ef1ee47200c5cc01caf55821b
serverPlayer.connection = player.connection;
serverPlayer.restoreFrom(player, keepInventory);
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 3b754db2db36d9e2398efe2f5286b70f20470c2c..a458e858e70e10f9ae0f952ab85f01e4b481081e 100644
index e96eeae793d127b76a2fe6853cba49ce192b91f9..3aa2069ff070d9edb596e3c08cd34c617edd955c 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3243,14 +3243,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3432,14 +3432,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.portalProcess != null) {
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
this.setPortalCooldown();
@@ -448,11 +448,11 @@ index 3b754db2db36d9e2398efe2f5286b70f20470c2c..a458e858e70e10f9ae0f952ab85f01e4
} else if (this.portalProcess.hasExpired()) {
this.portalProcess = null;
}
@@ -3815,6 +3835,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4016,6 +4036,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
private Entity teleportCrossDimension(ServerLevel level, TeleportTransition teleportTransition) {
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(level, "Cannot teleport entity to another world off-main, from world " + this.level.getWorld().getName() + " to world " + level.getWorld().getName()); // DivineMC - Parallel world ticking
private Entity teleportCrossDimension(ServerLevel oldLevel, ServerLevel newLevel, TeleportTransition teleportTransition) {
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(newLevel, "Cannot teleport entity to another world off-main, from world " + oldLevel.getWorld().getName() + " to world " + newLevel.getWorld().getName()); // DivineMC - Parallel world ticking
List<Entity> passengers = this.getPassengers();
List<Entity> list = new ArrayList<>(passengers.size());
this.ejectPassengers();
@@ -549,10 +549,10 @@ index 3614551856c594f3c0cfee984fcf03fad672b007..ad52152d090c32b81044b8fd9496eae0
});
entity.getBrain().eraseMemory(MemoryModuleType.POTENTIAL_JOB_SITE);
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
index 2e2745cd8e3383455656c95214779754cc890b33..69e9d7b68cae66c65906e6db4facfe7f408375c1 100644
index 3e23bc54e0315b6324843851e072005ca4da3f8e..50130de436bb12334f5b7f63bf6bf30578b569b2 100644
--- a/net/minecraft/world/entity/npc/Villager.java
+++ b/net/minecraft/world/entity/npc/Villager.java
@@ -795,13 +795,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -796,13 +796,24 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
this.brain.getMemory(moduleType).ifPresent(pos -> {
ServerLevel level = server.getLevel(pos.dimension());
if (level != null) {
@@ -584,10 +584,10 @@ index 2e2745cd8e3383455656c95214779754cc890b33..69e9d7b68cae66c65906e6db4facfe7f
});
}
diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..48076c0fd956141724ef30f6dd7136858b657863 100644
index 2258736e6f9f52efe5bd353b8949a7a0b9a4fdb8..440fbe301782e81cec679a27a876dd3c0bf8615e 100644
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
@@ -122,40 +122,50 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
@@ -119,40 +119,50 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
Vec3 vec3 = this.oldPosition();
if (owner instanceof ServerPlayer serverPlayer) {
if (serverPlayer.connection.isAcceptingMessages()) {
@@ -640,7 +640,7 @@ index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..48076c0fd956141724ef30f6dd713685
- if (serverPlayer1 != null) {
- serverPlayer1.resetFallDistance();
- serverPlayer1.resetCurrentImpulseContext();
- serverPlayer1.hurtServer(serverPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage
- serverPlayer1.hurtServer(serverPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage
- }
+ // CraftBukkit start - moved up
+ // ServerPlayer serverPlayer1 = serverPlayer.teleport(
@@ -652,7 +652,7 @@ index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..48076c0fd956141724ef30f6dd713685
+ if (serverPlayer1 != null) {
+ serverPlayer1.resetFallDistance();
+ serverPlayer1.resetCurrentImpulseContext();
+ serverPlayer1.hurtServer(serverPlayer.serverLevel(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage
+ serverPlayer1.hurtServer(serverPlayer.level(), this.damageSources().enderPearl().eventEntityDamager(this), this.level().purpurConfig.enderPearlDamage); // CraftBukkit // Paper - fix DamageSource API // Purpur - Configurable Ender Pearl damage
+ }
- this.playSound(serverLevel, vec3);
@@ -669,7 +669,7 @@ index 6575e8ef16f6011f7a799ba31531a2ebefee0c4d..48076c0fd956141724ef30f6dd713685
} else {
Entity entity = owner.teleport(
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
index c4721eb0efe34f5e313bc890b4e960144eca4fe1..804b7666ccb64e6b8d7fa19afd376f42f0475272 100644
index bfee8f3f47bc457543022fabbbee2130a6abe81a..55d0b8a88d202fb86c4da84e0d40b63df2461c2a 100644
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -96,8 +96,14 @@ public abstract class AbstractContainerMenu {
@@ -688,10 +688,10 @@ index c4721eb0efe34f5e313bc890b4e960144eca4fe1..804b7666ccb64e6b8d7fa19afd376f42
this.containerId = containerId;
}
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
index 36677cb0db42b74fa84d67b85717f629f84b4dd0..f329ad90e08bbb4fd3c4c804d6894f1a9e0aaaaf 100644
index b95acf4c688a9113a34e9be2639536245c66c83e..160fd27bdd02e9c276cdae241b0652ae547517cf 100644
--- a/net/minecraft/world/item/ItemStack.java
+++ b/net/minecraft/world/item/ItemStack.java
@@ -406,8 +406,10 @@ public final class ItemStack implements DataComponentHolder {
@@ -398,8 +398,10 @@ public final class ItemStack implements DataComponentHolder {
if (interactionResult.consumesAction() && serverLevel.captureTreeGeneration && !serverLevel.capturedBlockStates.isEmpty()) {
serverLevel.captureTreeGeneration = false;
org.bukkit.Location location = org.bukkit.craftbukkit.util.CraftLocation.toBukkit(clickedPos, serverLevel.getWorld());
@@ -705,7 +705,7 @@ index 36677cb0db42b74fa84d67b85717f629f84b4dd0..f329ad90e08bbb4fd3c4c804d6894f1a
serverLevel.capturedBlockStates.clear();
org.bukkit.event.world.StructureGrowEvent structureEvent = null;
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72abe1c53f9c 100644
index bf38e3bfcb0b96c4529d5e535893043512f52b02..dc82e12783989c307be2ac709a21321dac25f217 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -160,6 +160,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -724,7 +724,7 @@ index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72ab
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
// Paper start - Protect Bedrock and End Portal/Frames from being destroyed
@@ -1511,11 +1513,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1517,11 +1519,12 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
this.blockEntityTickers.markAsRemoved(this.tileTickPosition); // DivineMC - optimize block entity removals - Fix MC-117075
} else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) {
tickingBlockEntity.tick();
@@ -741,7 +741,7 @@ index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72ab
}
}
this.blockEntityTickers.removeMarkedEntries(); // DivineMC - optimize block entity removals - Fix MC-117075
@@ -1535,7 +1538,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1541,7 +1544,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
// Paper end - Prevent block entity and entity crashes
}
@@ -755,14 +755,14 @@ index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72ab
// Paper start - Option to prevent armor stands from doing entity lookups
@@ -1678,6 +1685,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@Nullable
public BlockEntity getBlockEntity(BlockPos pos, boolean validate) {
@Override
public BlockEntity getBlockEntity(BlockPos pos) {
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThreadOrAsyncThread((ServerLevel) this, "Cannot read world asynchronously"); // DivineMC - Parallel world ticking
// Paper start - Perf: Optimize capturedTileEntities lookup
net.minecraft.world.level.block.entity.BlockEntity blockEntity;
if (!this.capturedTileEntities.isEmpty() && (blockEntity = this.capturedTileEntities.get(pos)) != null) {
@@ -1695,6 +1703,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1694,6 +1702,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
}
public void setBlockEntity(BlockEntity blockEntity) {
@@ -770,7 +770,7 @@ index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72ab
BlockPos blockPos = blockEntity.getBlockPos();
if (!this.isOutsideBuildHeight(blockPos)) {
// CraftBukkit start
@@ -1779,6 +1788,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -1778,6 +1787,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@Override
public List<Entity> getEntities(@Nullable Entity entity, AABB boundingBox, Predicate<? super Entity> predicate) {
@@ -778,7 +778,7 @@ index 20d2368d22ee32fbcf6e433282b0567abd36cad9..5f281360ee07fffa709f920958ee72ab
List<Entity> list = Lists.newArrayList();
// Paper start - rewrite chunk system
@@ -2097,8 +2107,15 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
@@ -2100,8 +2110,15 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
public abstract RecipeAccess recipeAccess();
public BlockPos getBlockRandomPos(int x, int y, int z, int yMask) {
@@ -912,15 +912,15 @@ index a22cb810622e0ae97bc2a0d6390d026d9482b783..5856178e41523700ca7ed9a46c1c802c
}
if (event == null || !event.isCancelled()) {
diff --git a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..9076d8ea09920f08d70610724d4ca1b8da580db4 100644
index 5a094257a31f0500278a706a418e1697f8810ffb..3df0633fe4e632f7d42289facf4ad79978d50c40 100644
--- a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
@@ -79,6 +79,12 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
@@ -76,6 +76,12 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
}
public static boolean canUnlock(Player player, LockCode code, Component displayName, @Nullable BlockEntity blockEntity) {
+ // DivineMC start - Parallel world ticking
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking && player instanceof net.minecraft.server.level.ServerPlayer serverPlayer && blockEntity != null && blockEntity.getLevel() != serverPlayer.serverLevel()) {
+ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking && player instanceof net.minecraft.server.level.ServerPlayer serverPlayer && blockEntity != null && blockEntity.getLevel() != serverPlayer.level()) {
+ net.minecraft.server.MinecraftServer.LOGGER.warn("Player {} ({}) attempted to open a BlockEntity @ {} {}, {}, {} while they were in a different world {} than the block themselves!", serverPlayer.getScoreboardName(), serverPlayer.getStringUUID(), blockEntity.getLevel().getWorld().getName(), blockEntity.getBlockPos().getX(), blockEntity.getBlockPos().getY(), blockEntity.getBlockPos().getZ(), serverPlayer.level().getWorld().getName());
+ return false;
+ }
@@ -929,7 +929,7 @@ index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..9076d8ea09920f08d70610724d4ca1b8
final org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(blockEntity.getLevel(), blockEntity.getBlockPos());
net.kyori.adventure.text.Component lockedMessage = net.kyori.adventure.text.Component.translatable("container.isLocked", io.papermc.paper.adventure.PaperAdventure.asAdventure(displayName));
diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
index 2627583ab12d886b1fba0b1d1e599f942926b499..2caa770411c542a70fe50267ce4cffb22fc94b97 100644
index 0a94670dc20bb9c521b0395633eb100393895f6a..4ad9c47862a9791f72a18835a343bf0e962c14c8 100644
--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
@@ -43,9 +43,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
@@ -1030,10 +1030,10 @@ index d23f255de9208f42125fa358a9e8194c984fe4d3..92e9bc9ba577474ca1108b8d06157395
// CraftBukkit end
}
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
index c7c984f1380f9386634f88d98fdde11e623a2d7d..2c7019bc22d217dea184bc2472c4e8ab9a069a32 100644
index 010c7204bfa772ff9a2187a5db76d7c65ea34f66..6de61b3e75edee87562e3aab01c7020cd91133b3 100644
--- a/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
@@ -363,6 +363,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@@ -365,6 +365,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
@Nullable
@Override
public BlockState setBlockState(BlockPos pos, BlockState state, int flags) {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] MSPT Tracking for each world
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index ef2cf6d9ca57266bb0466ca1aa5d2066349f9954..c4ae883af4337e04d0944c603f298ee1576cb3d2 100644
index 6f08d761ee52d65a57fd01cf7bffa461dc1b898b..d96f1b3312734b4daa86fd7ac133f3f5475375b4 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1674,7 +1674,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -25,10 +25,10 @@ index ef2cf6d9ca57266bb0466ca1aa5d2066349f9954..c4ae883af4337e04d0944c603f298ee1
CrashReport crashReport = CrashReport.forThrowable(levelTickingException, "Exception ticking world");
serverLevel.fillReportDetails(crashReport);
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index b609361d4ff1d42d3ac40411013de767ad8665d7..1d4e6ffc1c17f2e5ab363b71a2e8cbcc63bdfb7c 100644
index 0102d87411dcf0bba7f6873dc54385c957a7e2d7..c87d1ff6f55e2316686add55abebbc7d8ecab914 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -568,6 +568,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -570,6 +570,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// Paper end - chunk tick iteration

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize Raids
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index fcd732a923e0ced69d2342fa59122dee0e98438e..2958419f56eb7d18dd003130c287ee768c07e4ae 100644
index 8cfa5e0aafc3102e4397188b7dcce7185b19f648..5cb7a49f03438d1c05852decc95d77682e39c8b2 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -214,6 +214,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -218,6 +218,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
public boolean hasRidableMoveEvent = false; // Purpur - Ridables
public org.bxteam.divinemc.util.tps.TPSCalculator tpsCalculator = new org.bxteam.divinemc.util.tps.TPSCalculator(); // DivineMC - Lag Compensation
@@ -16,8 +16,8 @@ index fcd732a923e0ced69d2342fa59122dee0e98438e..2958419f56eb7d18dd003130c287ee76
@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
@@ -696,6 +697,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -708,6 +709,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.tickExecutor = java.util.concurrent.Executors.newSingleThreadExecutor(new org.bxteam.divinemc.server.ServerLevelTickExecutorThreadFactory(getWorld().getName())); // DivineMC - Parallel world ticking
this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle
this.chunkSystemPriorities = new org.bxteam.divinemc.server.chunk.PriorityHandler(this); // DivineMC - Chunk System optimizations
+ this.ominousBanner = Objects.requireNonNullElse(this.registryAccess(), net.minecraft.core.RegistryAccess.EMPTY).lookup(Registries.BANNER_PATTERN).map(Raid::getOminousBannerInstance).orElse(null); // DivineMC - Optimize Raids
@@ -25,7 +25,7 @@ index fcd732a923e0ced69d2342fa59122dee0e98438e..2958419f56eb7d18dd003130c287ee76
// Paper start
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
index 62a3a8d46e10e6f02e3f515bbce5d9ba1f6566b8..4d078e99e4128354abbe0a5fe386f5832148105c 100644
index b3a29ce523fb5de71589c7c17598bba17622f988..39b9141c6c64acb362bbf12a1d47901ff75920b6 100644
--- a/net/minecraft/world/entity/raid/Raid.java
+++ b/net/minecraft/world/entity/raid/Raid.java
@@ -126,6 +126,7 @@ public class Raid {
@@ -59,10 +59,10 @@ index 62a3a8d46e10e6f02e3f515bbce5d9ba1f6566b8..4d078e99e4128354abbe0a5fe386f583
public float getHealthOfLivingRaiders() {
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
index 76ebbab40f5bac6d5f588410d3c5e6716cbe0679..799f2a4a5a22a6a5fb9cd5daea99edc34fe4b9d7 100644
index 3baba21d106ab09ae476238f2636169c371f43cf..652ab0cd78252616c63df55c3249c1c7599783e9 100644
--- a/net/minecraft/world/entity/raid/Raider.java
+++ b/net/minecraft/world/entity/raid/Raider.java
@@ -42,9 +42,25 @@ import net.minecraft.world.phys.Vec3;
@@ -43,9 +43,25 @@ import net.minecraft.world.phys.Vec3;
public abstract class Raider extends PatrollingMonster {
protected static final EntityDataAccessor<Boolean> IS_CELEBRATING = SynchedEntityData.defineId(Raider.class, EntityDataSerializers.BOOLEAN);
@@ -91,7 +91,7 @@ index 76ebbab40f5bac6d5f588410d3c5e6716cbe0679..799f2a4a5a22a6a5fb9cd5daea99edc3
private static final int DEFAULT_WAVE = 0;
private static final boolean DEFAULT_CAN_JOIN_RAID = false;
@Nullable
@@ -149,7 +165,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -150,7 +166,7 @@ public abstract class Raider extends PatrollingMonster {
public boolean isCaptain() {
ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.HEAD);
boolean flag = !itemBySlot.isEmpty()
@@ -100,7 +100,7 @@ index 76ebbab40f5bac6d5f588410d3c5e6716cbe0679..799f2a4a5a22a6a5fb9cd5daea99edc3
boolean isPatrolLeader = this.isPatrolLeader();
return flag && isPatrolLeader;
}
@@ -212,7 +228,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -213,7 +229,7 @@ public abstract class Raider extends PatrollingMonster {
boolean flag = this.hasActiveRaid() && this.getCurrentRaid().getLeader(this.getWave()) != null;
if (this.hasActiveRaid()
&& !flag
@@ -109,7 +109,7 @@ index 76ebbab40f5bac6d5f588410d3c5e6716cbe0679..799f2a4a5a22a6a5fb9cd5daea99edc3
// Paper start - EntityPickupItemEvent fixes
if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entity, 0, false).isCancelled()) {
return;
@@ -399,6 +415,16 @@ public abstract class Raider extends PatrollingMonster {
@@ -400,6 +416,16 @@ public abstract class Raider extends PatrollingMonster {
&& !this.cannotPickUpBanner();
}
@@ -126,7 +126,7 @@ index 76ebbab40f5bac6d5f588410d3c5e6716cbe0679..799f2a4a5a22a6a5fb9cd5daea99edc3
private boolean cannotPickUpBanner() {
if (!getServerLevel(this.mob).getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING, this.mob.level().purpurConfig.pillagerMobGriefingOverride) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items // Purpur - Add mobGriefing override to everything affected
if (!this.mob.hasActiveRaid()) {
@@ -408,7 +434,7 @@ public abstract class Raider extends PatrollingMonster {
@@ -409,7 +435,7 @@ public abstract class Raider extends PatrollingMonster {
} else if (!this.mob.canBeLeader()) {
return true;
} else if (ItemStack.matches(

View File

@@ -15,7 +15,7 @@ The delay is currently set to 2 seconds, however, we may want to adjust this bef
This patch fixes PaperMC/Paper#9581
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
index 4cf581e618a774cac010f593bacc7f221f7dea78..a1d07b6dcce9af1a8cd715d2b0aa99e0e575af38 100644
index 70cf5f90b278814b7b594dd79f592696c28a69d7..75a3b7ea3c212bce63041ebfc4c7be9f55127cc4 100644
--- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
@@ -48,6 +48,7 @@ public final class RegionizedPlayerChunkLoader {
@@ -27,10 +27,10 @@ index 4cf581e618a774cac010f593bacc7f221f7dea78..a1d07b6dcce9af1a8cd715d2b0aa99e0
public static final int GENERATED_TICKET_LEVEL = ChunkHolderManager.FULL_LOADED_TICKET_LEVEL;
public static final int LOADED_TICKET_LEVEL = ChunkTaskScheduler.getTicketLevel(ChunkStatus.EMPTY);
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index 8923a30daf515262e4bdbfbd55e3cb827092979c..de66143a2f093b43233c12cc0ea384a51bdf4840 100644
index a534b3e6835b9e998ae25210812ddf55685473ea..ce68dd77963e2bcb6119c682a700f540109d4877 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -315,6 +315,13 @@ public abstract class PlayerList {
@@ -316,6 +316,13 @@ public abstract class PlayerList {
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
// Paper start - Fire PlayerJoinEvent when Player is actually ready; correctly register player BEFORE PlayerJoinEvent, so the entity is valid and doesn't require tick delay hacks
player.supressTrackerForLogin = true;

View File

@@ -7,10 +7,10 @@ Original license: GPL v3
Original project: https://github.com/pufferfish-gg/Pufferfish
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 808e4e2ae070b5232c2050fdcb183cc21b8fb996..aeea9dc46013632b2178818823564bb559746b13 100644
index 16a3cd813997456ca67a382a8277eca02dc6662f..3cf377f87e8b7f672ea247728365eb61f47bc3ac 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -406,6 +406,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -420,6 +420,12 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
return this.getDeltaMovement().y() < 1.0E-5F && this.isInLiquid();
}
@@ -23,7 +23,7 @@ index 808e4e2ae070b5232c2050fdcb183cc21b8fb996..aeea9dc46013632b2178818823564bb5
@Override
public void baseTick() {
this.oAttackAnim = this.attackAnim;
@@ -424,7 +430,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -438,7 +444,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
if (this.isAlive() && this.level() instanceof ServerLevel serverLevel1) {
boolean flag = this instanceof Player;

View File

@@ -7,10 +7,10 @@ Original license: GPL v3
Original project: https://github.com/pufferfish-gg/Pufferfish
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
index c7cc8e1277bbfa8bcac596a5043e418cb1567971..146826c99a410bef2afd5ed055b40a6ae6b38701 100644
index fcdb3ee493e65bf002e78862f00061336e731ede..a8c11c6d7d107987dc04e5b741cfabf5ea0e8090 100644
--- a/net/minecraft/world/entity/monster/EnderMan.java
+++ b/net/minecraft/world/entity/monster/EnderMan.java
@@ -334,11 +334,28 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -330,11 +330,28 @@ public class EnderMan extends Monster implements NeutralMob {
private boolean teleport(double x, double y, double z) {
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@ This patch adds regionized chunk ticking feature, by grouping adjacent chunks in
Original idea by Dueris, modified by NONPLAYT and heavily optimized by dan28000
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
index b28829f9f4c084a8dba35219dae9f4a9f293c416..583f0d2a54508e0a6e99771d5d1fb787f7a913f3 100644
index 343ec870d6ea3e2792f369c4867a3afb4bcfa385..db909744c922f2e5b486a8f15dac79d66d7ed0a0 100644
--- a/net/minecraft/network/Connection.java
+++ b/net/minecraft/network/Connection.java
@@ -325,7 +325,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@@ -390,10 +390,10 @@ index a2dbb52fab3f82dd3ddcac9b7d1e0ed44ebf1574..41c4e2fcfd3264180e9df938a9ddf0de
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index caa1fd0e35b69c8bd55170af6140442bef5d6b4d..4b874acfdfd2aaa3477e65da20a73b1e693c67bd 100644
index 690b6d9f89f70afd8f37d907863b87dd1f4591af..7ae5ba48632528dfe5bbdedf252b5995f5452f1c 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -189,7 +189,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -192,7 +192,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
private final LevelTicks<Block> blockTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded);
private final LevelTicks<Fluid> fluidTicks = new LevelTicks<>(this::isPositionTickingWithEntitiesLoaded);
private final PathTypeCache pathTypesByPosCache = new PathTypeCache();
@@ -402,7 +402,7 @@ index caa1fd0e35b69c8bd55170af6140442bef5d6b4d..4b874acfdfd2aaa3477e65da20a73b1e
volatile boolean isUpdatingNavigations;
protected final Raids raids;
private final ObjectLinkedOpenHashSet<BlockEventData> blockEvents = new ObjectLinkedOpenHashSet<>();
@@ -806,6 +806,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -810,6 +810,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.dragonFight.tick();
}
@@ -416,7 +416,7 @@ index caa1fd0e35b69c8bd55170af6140442bef5d6b4d..4b874acfdfd2aaa3477e65da20a73b1e
io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR
this.entityTickList
.forEach(
@@ -1794,22 +1801,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -1817,22 +1824,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (Shapes.joinIsNotEmpty(collisionShape, collisionShape1, BooleanOp.NOT_SAME)) {
List<PathNavigation> list = new ObjectArrayList<>();
@@ -448,7 +448,7 @@ index caa1fd0e35b69c8bd55170af6140442bef5d6b4d..4b874acfdfd2aaa3477e65da20a73b1e
try {
this.isUpdatingNavigations = true;
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 698f9c3a66dbb4f9ef1fbea873a1769d314d2bb4..7ef3ea374f36554ff66ace50ffaef9ad8920d961 100644
index dc82e12783989c307be2ac709a21321dac25f217..47a0b2d6713d2d73b2dc359c69ec06cb59d45adb 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -106,7 +106,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -986,6 +_,13 @@
@@ -988,6 +_,13 @@
if (this.hasStopped) return;
this.hasStopped = true;
}

View File

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

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -725,8 +_,14 @@
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
@@ -752,8 +_,14 @@
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
if (packet.getId() == this.awaitingTeleport) {
if (this.awaitingPositionFromClient == null) {
- ServerGamePacketListenerImpl.LOGGER.warn("Disconnected on accept teleport packet. Was not expecting position data from client at this time"); // Purpur - Add more logger output for invalid movement kicks

View File

@@ -1,10 +1,10 @@
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -715,7 +_,6 @@
@@ -711,7 +_,6 @@
}
public ServerPlayer respawn(ServerPlayer player, boolean keepInventory, Entity.RemovalReason reason, @Nullable org.bukkit.event.player.PlayerRespawnEvent.RespawnReason eventReason, @Nullable org.bukkit.Location location) {
- player.stopRiding(); // CraftBukkit
this.players.remove(player);
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
player.serverLevel().removePlayerImmediately(player, reason);
player.level().removePlayerImmediately(player, reason);

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/stats/ServerStatsCounter.java
+++ b/net/minecraft/stats/ServerStatsCounter.java
@@ -100,12 +_,6 @@
@@ -98,12 +_,6 @@
this.dirty.add(stat);
}
@@ -12,8 +12,8 @@
-
public void parseLocal(DataFixer fixerUpper, String json) {
try {
try (JsonReader jsonReader = new JsonReader(new StringReader(json))) {
@@ -144,9 +_,11 @@
JsonElement jsonElement = StrictJsonParser.parse(json);
@@ -139,9 +_,11 @@
public void sendStats(ServerPlayer player) {
Object2IntMap<Stat<?>> map = new Object2IntOpenHashMap<>();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1393,7 +_,7 @@
@@ -1425,7 +_,7 @@
player.setRealHealth(health);
}
@@ -9,7 +9,7 @@
return;
}
// CraftBukkit end
@@ -2730,6 +_,7 @@
@@ -2762,6 +_,7 @@
}
protected void updateSwingTime() {
@@ -17,7 +17,7 @@
int currentSwingDuration = this.getCurrentSwingDuration();
if (this.swinging) {
this.swingTime++;
@@ -3212,7 +_,13 @@
@@ -3264,7 +_,13 @@
}
protected float getFlyingSpeed() {
@@ -32,9 +32,9 @@
}
public float getSpeed() {
@@ -3657,6 +_,7 @@
@@ -3713,6 +_,7 @@
protected void updateFallFlying() {
this.checkSlowFallDistance();
this.checkFallDistanceAccumulation();
if (!this.level().isClientSide) {
+ if (!this.isFallFlying() && this.fallFlyTicks == 0) return; // DivineMC - lithium: entity.fast_elytra_check
if (!this.canGlide()) {

View File

@@ -1,13 +1,13 @@
--- a/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -293,6 +_,12 @@
@@ -292,6 +_,12 @@
if (!this.isSilent()) {
level.levelEvent(null, 1027, this.blockPosition(), 0);
}
+
+ // DivineMC start - Fix MC-200418
+ if (villager.isPassenger() && villager.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && villager.isBaby()) {
+ villager.removeVehicle();
+ if (mob.isPassenger() && mob.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && mob.isBaby()) {
+ mob.removeVehicle();
+ }
+ // DivineMC end - Fix MC-200418
// CraftBukkit start

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/player/Player.java
+++ b/net/minecraft/world/entity/player/Player.java
@@ -1806,6 +_,11 @@
@@ -1818,6 +_,11 @@
}
public void causeFoodExhaustion(float exhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason reason) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/BaseCommandBlock.java
+++ b/net/minecraft/world/level/BaseCommandBlock.java
@@ -25,7 +_,7 @@
@@ -22,7 +_,7 @@
import net.minecraft.world.phys.Vec3;
public abstract class BaseCommandBlock implements CommandSource {
@@ -9,7 +9,7 @@
private static final Component DEFAULT_NAME = Component.literal("@");
private static final int NO_LAST_EXECUTION = -1;
private long lastExecution = -1L;
@@ -156,7 +_,7 @@
@@ -150,7 +_,7 @@
public void sendSystemMessage(Component component) {
if (this.trackOutput) {
org.spigotmc.AsyncCatcher.catchOp("sendSystemMessage to a command block"); // Paper - Don't broadcast messages to command blocks

View File

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

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
@@ -270,11 +_,18 @@
@@ -272,11 +_,18 @@
public BlockState getBlockStateFinal(final int x, final int y, final int z) {
// Copied and modified from below
final int sectionIndex = this.getSectionIndex(y);

View File

@@ -175,7 +175,7 @@ index d543b1b107ab8d3eeb1fc3c1cadf489928d2786e..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
index b36e30fd4057a938e4d90cb42a2dca661f16478e..4e29f5f55b9a894099bef6f7c7f11e2a96b02fc8 100644
index 1b0ee48e28aaa68ddb1f28c23d3c5f5f40505c98..4d3518795a238d87ca4f3df0bee074ab5bcc2734 100644
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
@@ -23,15 +23,18 @@ public record ServerBuildInfoImpl(
@@ -201,13 +201,13 @@ index b36e30fd4057a938e4d90cb42a2dca661f16478e..4e29f5f55b9a894099bef6f7c7f11e2a
this(
getManifestAttribute(manifest, ATTRIBUTE_BRAND_ID)
.map(Key::key)
- .orElse(BRAND_PURPUR_ID), // Purpur - Fix pufferfish issues // Purpur - Rebrand
- .orElse(BRAND_PURPUR_ID), // Purpur - Rebrand
+ .orElse(BRAND_DIVINEMC_ID), // DivineMC - Rebrand
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
- .orElse(BRAND_PURPUR_NAME), // Purpur - Fix pufferfish issues // Purpur - Rebrand
- .orElse(BRAND_PURPUR_NAME), // Purpur - Rebrand
+ .orElse(BRAND_DIVINEMC_NAME), // DivineMC - Rebrand
SharedConstants.getCurrentVersion().getId(),
SharedConstants.getCurrentVersion().getName(),
SharedConstants.getCurrentVersion().id(),
SharedConstants.getCurrentVersion().name(),
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
@@ -58,6 +61,7 @@ public record ServerBuildInfoImpl(
getManifestAttribute(manifest, ATTRIBUTE_GIT_BRANCH),
@@ -231,10 +231,10 @@ index 62e2d5704c348955bc8284dc2d54c933b7bcdd06..341f13e57896f03058ea3ec68e69b7cb
public void executeAsync(final Runnable runnable) {
MCUtil.scheduleAsyncTask(this.catching(runnable, "asynchronous"));
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 7091dcb86cad81ed4429f11bf5876b4e192a93f5..81a8076b9bbe94788a682d9ec52dc1a8b779fb83 100644
index c92ae5af5186a7c36f685272a13cfcfad21e8e69..24013949b6646016267132396e61d6cd4af8e374 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -248,7 +248,7 @@ public class Main {
@@ -247,7 +247,7 @@ public class Main {
System.setProperty("library.jansi.version", "Paper"); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows
System.setProperty("jdk.console", "java.base"); // Paper - revert default console provider back to java.base so we can have our own jline
@@ -270,7 +270,7 @@ index 99eb04643fce44c37fd96c99756837ccafe7b559..4aef151bd162c4c99a3eaec1854b5463
if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index db1939eeef1d9de36ead4bba003418a03f8f4231..dffff76bf6df39dd26892edc2b4988fafab282e7 100644
index 39493810336442e74c0fc99fdeb5e073a8f4e95e..dffff76bf6df39dd26892edc2b4988fafab282e7 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -75,14 +75,14 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre

View File

@@ -37,10 +37,10 @@ index 7c79e58f86d113e5e67947e235475beef76e20ab..b26d3a2856ed7bd0a2dcb72f74ee0e15
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 81a8076b9bbe94788a682d9ec52dc1a8b779fb83..d7f9da2e624d3e27aff36d8818adaf735d78a2d9 100644
index cc4f4fbbe1cacce5f0f5500a8dda199aa0bcdf31..03fe7d98252b93f4625359f50552e3cf60e82b9c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -173,6 +173,14 @@ public class Main {
@@ -172,6 +172,14 @@ public class Main {
.describedAs("Yml file");
// Purpur end - Purpur config files
@@ -52,6 +52,6 @@ index 81a8076b9bbe94788a682d9ec52dc1a8b779fb83..d7f9da2e624d3e27aff36d8818adaf73
+ .describedAs("Yml file");
+ // DivineMC end - Configuration
+
acceptsAll(asList("server-name"), "Name of the server")
this.accepts("server-name", "Name of the server")
.withRequiredArg()
.ofType(String.class)

View File

@@ -68,10 +68,10 @@ index c03608fec96b51e1867f43d8f42e5aefb1520e46..eda35b81c36ca8ebe4f9487cb41e2b0c
throw new IllegalStateException("Ticking retired scheduler");
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 395951c968e95adffa97e1851d104faf192744fd..5ffa1f81a2b9c35bb4632f06f88bd0bc1e2f5815 100644
index 834389b78d9342e96b3473c9cb6e40ca6cd4e46f..a18069c7de594a8f4ddef46f9dad48dd29cd4b34 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -85,7 +85,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -93,7 +93,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
// Paper start - Folia shedulers
@@ -80,7 +80,7 @@ index 395951c968e95adffa97e1851d104faf192744fd..5ffa1f81a2b9c35bb4632f06f88bd0bc
private final io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler apiScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaEntityScheduler(this);
@Override
@@ -98,6 +98,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -106,6 +106,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.server = server;
this.entity = entity;
this.entityType = CraftEntityType.minecraftToBukkit(entity.getType());

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize canSee checks
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fcc7bc9098e2544588d8b36dd0cff59e6a2563bd..d9b701e4b53b71e7e430ebab6b24220eac710e0d 100644
index 0d303c3c614142b4183e76f9347e613d7e6db211..e69039ccb6b4d0cc593342a562e4108a78ce2867 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -216,7 +216,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -219,7 +219,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private boolean hasPlayedBefore = false;
private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>();
@@ -17,7 +17,7 @@ index fcc7bc9098e2544588d8b36dd0cff59e6a2563bd..d9b701e4b53b71e7e430ebab6b24220e
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
@@ -2269,9 +2269,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2272,9 +2272,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public boolean canSee(org.bukkit.entity.Entity entity) {

View File

@@ -22,10 +22,10 @@ index d7398b1ecf2660c29fb7d106b48fe02d3736603e..ab499a7eaccdc1578ec64f90f54f79b0
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 5300a513a295d472752d31a6e8af48bb64b06704..399fd8841e9d7c068b4fccb3754b371ec95c2e59 100644
index 98b766d115856dbf3ea11a983c1304591032f1b0..9b9b8b3439cfc0c36009fdb9e5d46b64c3aca393 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1751,6 +1751,26 @@ public class CraftEventFactory {
@@ -1798,6 +1798,26 @@ public class CraftEventFactory {
}
public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags, @Nullable Entity entity, boolean checkSetResult) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Paper PR: Add FillBottleEvents for player and dispenser
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 1b1a2546659863b9224d148ea39cdc6cdf4927a3..a9d23ee8bfe57311e84e50525a49abf09b03896d 100644
index 7e36355090baa1a95369dc4f5323c1024b5f3b4c..b7d816bd22ddd837bce6a1e96c86c25c15ca5111 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2068,4 +2068,18 @@ public class CraftEventFactory {
@@ -2115,4 +2115,18 @@ public class CraftEventFactory {
return event;
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Paper PR: Player standing on position API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 5ffa1f81a2b9c35bb4632f06f88bd0bc1e2f5815..b8755d050230261097e82f064f3fbff2e57e21f2 100644
index a18069c7de594a8f4ddef46f9dad48dd29cd4b34..bc78b10aa4c66fe5a5f0debc55f63019ed2b75ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1334,6 +1334,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1357,6 +1357,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.entity.get(io.papermc.paper.datacomponent.PaperDataComponentType.bukkitToMinecraft(type)) != null;
}

View File

@@ -247,10 +247,10 @@ index ab499a7eaccdc1578ec64f90f54f79b0da3c0e96..6bcb8069de18e8a0f4ee9d5c71b6bdd1
} else if (!event.isAsynchronous() && !this.server.isPrimaryThread() && !this.server.isStopping()) {
// DivineMC start - Multithreaded Tracker
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a42045f06 100644
index 400fa612389c40f36d64ecd1b65f3330c8a9071a..11b43cf197e4b860ea3d93beb0f1b8437c583fc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -447,7 +447,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -465,7 +465,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean unloadChunkRequest(int x, int z) {
@@ -265,7 +265,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
if (this.isChunkLoaded(x, z)) {
this.world.getChunkSource().removeTicketWithRadius(TicketType.PLUGIN, new ChunkPos(x, z), 1);
}
@@ -473,6 +479,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -491,6 +497,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean refreshChunk(int x, int z) {
@@ -273,7 +273,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));
if (playerChunk == null) return false;
@@ -523,7 +530,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -541,7 +548,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
@@ -288,7 +288,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
warnUnsafeChunk("loading a faraway chunk", x, z); // Paper
ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper
@@ -751,6 +764,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -769,6 +782,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
@@ -296,7 +296,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
this.world.captureTreeGeneration = true;
this.world.captureBlockStates = true;
boolean grownTree = this.generateTree(loc, type);
@@ -866,6 +880,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -884,6 +898,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source, Consumer<net.minecraft.world.level.ServerExplosion> configurator) {
// Paper end - expand explosion API
@@ -304,7 +304,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
net.minecraft.world.level.Level.ExplosionInteraction explosionType;
if (!breakBlocks) {
explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks
@@ -957,6 +972,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -975,6 +990,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
@@ -312,7 +312,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
warnUnsafeChunk("getting a faraway chunk", x >> 4, z >> 4); // Paper
// Transient load for this tick
return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
@@ -987,6 +1003,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1005,6 +1021,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setBiome(int x, int y, int z, Holder<net.minecraft.world.level.biome.Biome> bb) {
BlockPos pos = new BlockPos(x, 0, z);
@@ -320,7 +320,7 @@ index 0ea7df63498492e320f98ddec5bdf33b203cc770..7ab2ca6768b59d24bbae993b33d3a72a
if (this.world.hasChunkAt(pos)) {
net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos);
@@ -2295,6 +2312,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2313,6 +2330,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) {
@@ -500,10 +500,10 @@ index a4d5c65edc1db59f3486ce5d3757cc306211a54b..d8f68164b0b4430ccdc7e4a419eace71
this.getNMS().tick(level, this.position, level.random);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 3422970353dcd886934b9ee906467769d39abbde..a313c75ddb2c631b20c8d91a8f7ff3a4b77c1128 100644
index 7232b560aac9fbe48318f7af1c875583e06723ee..3a4393c50712dc735d7db6b4282eb18bcf122f72 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -26,6 +26,25 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
@@ -33,6 +33,25 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
private final T snapshot;
public boolean snapshotDisabled; // Paper
public static boolean DISABLE_SNAPSHOT = false; // Paper
@@ -529,7 +529,7 @@ index 3422970353dcd886934b9ee906467769d39abbde..a313c75ddb2c631b20c8d91a8f7ff3a4
public CraftBlockEntityState(World world, T blockEntity) {
super(world, blockEntity.getBlockPos(), blockEntity.getBlockState());
@@ -34,8 +53,10 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
@@ -41,8 +60,10 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
try { // Paper - Show blockstate location if we failed to read it
// Paper start
@@ -568,7 +568,7 @@ index 196835bdf95ba0e149b2977e9ef41698971f501f..b35dbe2b6e75ec89483aef093474c675
net.minecraft.world.item.ItemStack nms = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(item);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index 2338e7c115037430cefae26a571ded71f77983c4..6d5af7f72158e9e4abbfb6ae650833a66ea7a934 100644
index cc5028cebcd0504635734907c73ee5c9d91f0e71..0a870bfa4aca330973d4e9170a658d75e0e3e833 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -195,14 +195,16 @@ public final class CraftBlockStates {

View File

@@ -30,10 +30,10 @@ index 70413fddd23ca1165cb5090cce4fddcb1bbca93f..ae70b84e6473fa2ed94416bf4bef8849
@SuppressWarnings("unchecked")
java.util.List<Path> files = ((java.util.List<File>) optionSet.valuesOf("add-plugin")).stream().map(File::toPath).toList();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index d7f9da2e624d3e27aff36d8818adaf735d78a2d9..3f3bbc71bc4870cf1271d6c28a77ff78a5e102f8 100644
index 03fe7d98252b93f4625359f50552e3cf60e82b9c..ff350b5744b586cad7c2f5e0a04770e76f039d39 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -181,6 +181,14 @@ public class Main {
@@ -180,6 +180,14 @@ public class Main {
.describedAs("Yml file");
// DivineMC end - Configuration
@@ -45,6 +45,6 @@ index d7f9da2e624d3e27aff36d8818adaf735d78a2d9..3f3bbc71bc4870cf1271d6c28a77ff78
+ .describedAs("Directory");
+ // DivineMC end - Implement loading plugins from external folder
+
acceptsAll(asList("server-name"), "Name of the server")
this.accepts("server-name", "Name of the server")
.withRequiredArg()
.ofType(String.class)

View File

@@ -18,10 +18,10 @@ index e5bf7ea47143cf3f8d4c0f1840698068bb70cbf8..72fcad4a0b5857551221741b9c73fa75
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 31cc4e6e68a9743aaaeb296cb31e64526d3f1f73..ec129ef3e4c292da53a7c823b485c1e277480ec1 100644
index 611847bd7576bb77fdfb734ddb2e3412f3831041..508e5001eb691bd2d8231f8e6365eeacd14371ce 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -3146,8 +3146,8 @@ public class PurpurWorldConfig {
@@ -3169,8 +3169,8 @@ public class PurpurWorldConfig {
public boolean villagerDisplayTradeItem = true;
public int villagerSpawnIronGolemRadius = 0;
public int villagerSpawnIronGolemLimit = 0;

View File

@@ -25,7 +25,7 @@ index 72fcad4a0b5857551221741b9c73fa75596e6981..374af5eb6b55c731535be4e8c242ffc3
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index ec129ef3e4c292da53a7c823b485c1e277480ec1..48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa 100644
index 508e5001eb691bd2d8231f8e6365eeacd14371ce..1e5f301d61da14c93b1cce4ceb3a3b2954435a80 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1189,12 +1189,20 @@ public class PurpurWorldConfig {
@@ -94,7 +94,7 @@ index ec129ef3e4c292da53a7c823b485c1e277480ec1..48ed93bb72bd26f9b7c830e1fbfe9449
}
public boolean ghastRidable = false;
@@ -2907,6 +2933,10 @@ public class PurpurWorldConfig {
@@ -2930,6 +2956,10 @@ public class PurpurWorldConfig {
public double snifferMaxHealth = 14.0D;
public double snifferScale = 1.0D;
public int snifferBreedingTicks = 6000;
@@ -105,7 +105,7 @@ index ec129ef3e4c292da53a7c823b485c1e277480ec1..48ed93bb72bd26f9b7c830e1fbfe9449
private void snifferSettings() {
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
@@ -2914,6 +2944,10 @@ public class PurpurWorldConfig {
@@ -2937,6 +2967,10 @@ public class PurpurWorldConfig {
snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth);
snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D);
snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks);
@@ -116,7 +116,7 @@ index ec129ef3e4c292da53a7c823b485c1e277480ec1..48ed93bb72bd26f9b7c830e1fbfe9449
}
public boolean squidRidable = false;
@@ -3015,10 +3049,20 @@ public class PurpurWorldConfig {
@@ -3038,10 +3072,20 @@ public class PurpurWorldConfig {
public boolean tadpoleRidable = false;
public boolean tadpoleRidableInWater = true;
public boolean tadpoleControllable = true;
@@ -137,7 +137,7 @@ index ec129ef3e4c292da53a7c823b485c1e277480ec1..48ed93bb72bd26f9b7c830e1fbfe9449
}
public boolean traderLlamaRidable = false;
@@ -3252,10 +3296,20 @@ public class PurpurWorldConfig {
@@ -3275,10 +3319,20 @@ public class PurpurWorldConfig {
public boolean wardenRidable = false;
public boolean wardenRidableInWater = true;
public boolean wardenControllable = true;

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable movement speed for entities
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c744152b9 100644
index 1e5f301d61da14c93b1cce4ceb3a3b2954435a80..e22d42be00677804c5548e9d9d6dd880a652f93b 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1641,6 +1641,7 @@ public class PurpurWorldConfig {
@@ -24,7 +24,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
}
public boolean elderGuardianRidable = false;
@@ -2063,6 +2065,7 @@ public class PurpurWorldConfig {
@@ -2086,6 +2088,7 @@ public class PurpurWorldConfig {
public boolean huskJockeyTryExistingChickens = true;
public boolean huskTakeDamageFromWater = false;
public boolean huskAlwaysDropExp = false;
@@ -32,7 +32,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
private void huskSettings() {
huskRidable = getBoolean("mobs.husk.ridable", huskRidable);
huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater);
@@ -2080,6 +2083,7 @@ public class PurpurWorldConfig {
@@ -2103,6 +2106,7 @@ public class PurpurWorldConfig {
huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens);
huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater);
huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp);
@@ -40,7 +40,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
}
public boolean illusionerRidable = false;
@@ -3471,6 +3475,7 @@ public class PurpurWorldConfig {
@@ -3494,6 +3498,7 @@ public class PurpurWorldConfig {
public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false;
public double zombieHeadVisibilityPercent = 0.5D;
@@ -48,7 +48,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -3496,6 +3501,7 @@ public class PurpurWorldConfig {
@@ -3519,6 +3524,7 @@ public class PurpurWorldConfig {
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);
zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent);
@@ -56,7 +56,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
}
public boolean zombieHorseRidable = false;
@@ -3545,6 +3551,7 @@ public class PurpurWorldConfig {
@@ -3568,6 +3574,7 @@ public class PurpurWorldConfig {
public int zombieVillagerCuringTimeMax = 6000;
public boolean zombieVillagerCureEnabled = true;
public boolean zombieVillagerAlwaysDropExp = false;
@@ -64,7 +64,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
private void zombieVillagerSettings() {
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
@@ -3565,6 +3572,7 @@ public class PurpurWorldConfig {
@@ -3588,6 +3595,7 @@ public class PurpurWorldConfig {
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);
zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled);
zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp);
@@ -72,7 +72,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
}
public boolean zombifiedPiglinRidable = false;
@@ -3579,6 +3587,7 @@ public class PurpurWorldConfig {
@@ -3602,6 +3610,7 @@ public class PurpurWorldConfig {
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = false;
public boolean zombifiedPiglinTakeDamageFromWater = false;
public boolean zombifiedPiglinAlwaysDropExp = false;
@@ -80,7 +80,7 @@ index 48ed93bb72bd26f9b7c830e1fbfe94498c4d95aa..98312f137291eba5803234a566c6006c
private void zombifiedPiglinSettings() {
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
@@ -3600,6 +3609,7 @@ public class PurpurWorldConfig {
@@ -3623,6 +3632,7 @@ public class PurpurWorldConfig {
zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry);
zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater);
zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp);

View File

@@ -34,7 +34,7 @@ public final class ResendChunksCommand extends DivineSubCommandPermission {
for (ChunkPos chunkPos : serverPlayer.getBukkitEntity().getSentChunks().stream().map(ResendChunksCommand::bukkitChunk2ChunkPos).collect(Collectors.toSet())) {
chunkSender.dropChunk(serverPlayer, chunkPos);
PlayerChunkSender.sendChunk(serverPlayer.connection, serverPlayer.serverLevel(), serverPlayer.level().getChunk(chunkPos.x, chunkPos.z));
PlayerChunkSender.sendChunk(serverPlayer.connection, serverPlayer.level(), serverPlayer.level().getChunk(chunkPos.x, chunkPos.z));
resent++;
}
serverPlayer.sendSystemMessage(Component.literal("Resent " + resent + " chunks to client"));

View File

@@ -1,9 +1,9 @@
group = org.bxteam.divinemc
version=1.21.5-R0.1-SNAPSHOT
version=1.21.6-R0.1-SNAPSHOT
mcVersion=1.21.5
purpurRef=61d7f5590e79909caba55e9f00cefdd51006d015
experimental=false
mcVersion=1.21.6
purpurRef=46a28b93bdb4a99d5f3eed7401d99665dfcf256d
experimental=true
org.gradle.configuration-cache=true
org.gradle.caching = true