9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2026-01-04 15:31:43 +00:00

Updated Upstream (Purpur)

Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@eb0ba67d Updated Upstream (Paper)
PurpurMC/Purpur@7c6502dc Updated Upstream (Paper)
This commit is contained in:
NONPLAYT
2025-06-09 00:02:15 +03:00
parent 757141112b
commit 74c199a9f0
7 changed files with 60 additions and 48 deletions

View File

@@ -115,18 +115,18 @@
options.isDocFilesSubDirs = true
options.links(
- "https://guava.dev/releases/33.3.1-jre/api/docs/",
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
- // "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
+ "https://guava.dev/releases/33.4.0-jre/api/docs/", // DivineMC - Bump dependencies
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.3/", // DivineMC - Bump dependencies
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
"https://javadoc.io/doc/org.joml/joml/1.10.8/",
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
+ // "https://javadoc.io/doc/org.yaml/snakeyaml/2.3/", // DivineMC - Bump dependencies
// "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/",
// "https://javadoc.io/doc/org.joml/joml/1.10.8/",
// "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
@@ -199,7 +_,7 @@
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
// "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.22", // DivineMC - Bump dependencies
- // "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
+ // "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.9.22", // DivineMC - Bump dependencies
)
options.tags("apiNote:a:API Note:")

View File

@@ -4008,7 +4008,7 @@ index 39a604c9a53930b53d959b1d2eb504aa964e9a58..0d0380e3955836ce125f777841477503
@Override
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa 100644
index de389a4db6faf229dad599366d26feff63497126..63d619270b98d49c36fba918571d889ac48e8380 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -82,8 +82,6 @@ import net.minecraft.tags.FluidTags;
@@ -4020,7 +4020,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.Nameable;
@@ -844,8 +842,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -848,8 +846,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end
public void baseTick() {
@@ -4029,7 +4029,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
this.inBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) {
@@ -902,8 +898,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -906,8 +902,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (this.level() instanceof ServerLevel serverLevelx && this instanceof Leashable) {
Leashable.tickLeash(serverLevelx, (Entity & Leashable)this);
}
@@ -4038,7 +4038,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
}
public void setSharedFlagOnFire(boolean isOnFire) {
@@ -1124,8 +1118,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1128,8 +1122,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@@ -4047,7 +4047,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1134,7 +1126,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1138,7 +1130,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper start - ignore movement changes while inactive.
if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && type == MoverType.SELF) {
setDeltaMovement(Vec3.ZERO);
@@ -4055,7 +4055,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
return;
}
// Paper end
@@ -1169,8 +1160,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1173,8 +1164,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setPos(vec31);
}
@@ -4064,7 +4064,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
boolean flag = !Mth.equal(movement.x, vec3.x);
boolean flag1 = !Mth.equal(movement.z, vec3.z);
this.horizontalCollision = flag || flag1;
@@ -1193,7 +1182,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1197,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
if (this.isRemoved()) {
@@ -4073,7 +4073,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
} else {
if (this.horizontalCollision) {
Vec3 deltaMovement = this.getDeltaMovement();
@@ -1237,7 +1226,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1241,7 +1230,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
float blockSpeedFactor = this.getBlockSpeedFactor();
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
@@ -4081,7 +4081,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
}
}
// Paper start - detailed watchdog information
@@ -3274,8 +3262,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3278,8 +3266,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.processPortalCooldown();
if (this.portalProcess != null) {
if (this.portalProcess.processPortalTeleportation(serverLevel, this, this.canUsePortal(false))) {
@@ -4090,7 +4090,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
this.setPortalCooldown();
TeleportTransition portalDestination = this.portalProcess.getPortalDestination(serverLevel, this);
if (portalDestination != null) {
@@ -3285,8 +3271,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3289,8 +3275,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.teleport(portalDestination);
}
}
@@ -4099,7 +4099,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
} else if (this.portalProcess.hasExpired()) {
this.portalProcess = null;
}
@@ -3841,15 +3825,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3845,15 +3829,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
entity.teleport(this.calculatePassengerTransition(teleportTransition, entity));
}
@@ -4115,7 +4115,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
return this;
}
@@ -3865,11 +3846,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3869,11 +3850,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
@@ -4127,7 +4127,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
return null;
} else {
// Paper start - Fix item duplication and teleport issues
@@ -3888,7 +3866,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3892,7 +3870,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
level.resetEmptyTime();
teleportTransition.postTeleportTransition().onTransition(entityx);
@@ -4136,7 +4136,7 @@ index 8a319e381e93c0ac1c375fd5d3fa965d0413b44b..6b50a3fc0476f4b9941f1e66fb3f2a79
}
}
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index b427d3283a6c197203ab0ffed902bca33e0e0017..352421829e24284e4832a168c278233b780a58a2 100644
index 7cb5bb3e9cc5e519647a429a91afae06f2f1cec6..f3706dfb6aeb5035cbf0a8bf6b4d9a5243aaaa17 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -70,8 +70,6 @@ import net.minecraft.tags.FluidTags;
@@ -4246,7 +4246,7 @@ index b427d3283a6c197203ab0ffed902bca33e0e0017..352421829e24284e4832a168c278233b
// Purpur start - Ridables
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index e9344f61a943d610dfabe4918c227ddba166f17f..5bcbebf35eb726a43b957aca5b8b7a1dca7648cd 100644
index 09b4e592255aa2dc49dbd82be35f2f87e0b9b6ba..a58133b53a19e90d4386f57891ee41a5c03228c2 100644
--- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java
@@ -30,8 +30,6 @@ import net.minecraft.sounds.SoundEvent;
@@ -4761,7 +4761,7 @@ index 252a6469cab202bcc612b4d52a5027c615029a21..0644f425cddebe8e5a65e69acae57db8
if (this.isConverting()) {
this.timeInOverworld++;
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
index 54ab9593b39051d47f1dd8bddf210064768382be..73049e486fbf8411819551b43e3ca641ed7a5578 100644
index a77d06f945292e379c80d24a58257fc6aeb1aa77..ce0dca4f8cd903037f6fe011d34a17d08ff5a907 100644
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
@@ -17,8 +17,6 @@ import net.minecraft.tags.ItemTags;
@@ -4835,7 +4835,7 @@ index 8d61d5347896481f250a18d04d17fd4d2088f633..60a8d79306755e9483ba9e93a07939b7
if ((this.tickCount + this.getId()) % 120 == 0) {
applyDarknessAround(level, this.position(), this, 20);
diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java
index 5b52bbac242a7fbb8eaea7e41b7265a1a859ff7c..a08818450ed6fd78bb429743ee044726fc7994e7 100644
index b2fa235d9d7a32d9fbf32b00e6596e0ca09f9971..aace211c23ab9026792a77e5ed5c5eac4311f391 100644
--- a/net/minecraft/world/entity/npc/Villager.java
+++ b/net/minecraft/world/entity/npc/Villager.java
@@ -36,8 +36,6 @@ import net.minecraft.stats.Stats;
@@ -4895,7 +4895,7 @@ index b857e811b4b7a25eaec6dceaae5528d2ec0a1c45..bf69cef9b8ade11a1c08199cdd6c723e
LOGGER.info("Loaded {} recipes", object.values().size());
}
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index 38ddadf551c039202c68c44d740f23a08b58d003..2e90bb96ed90f3debbe5803856ed41a5c08003f8 100644
index 269011e6ba70c9da42f2bc7c902fed5ab6994042..aef9af80b1e04c75c60f04bca188abbe81ddf0c7 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -35,8 +35,6 @@ import net.minecraft.util.AbortableIterationConsumer;

View File

@@ -465,7 +465,7 @@ 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 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd220a1878 100644
index 63d619270b98d49c36fba918571d889ac48e8380..f825964c5e7a06d54af68c68d3bf2da0535b51d6 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
@@ -477,7 +477,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
// Paper start - replace random
private static final class RandomRandomSource extends ca.spottedleaf.moonrise.common.util.ThreadUnsafeRandom {
public RandomRandomSource() {
@@ -1082,28 +1082,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1086,28 +1086,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.onGround;
}
@@ -506,7 +506,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
@@ -1228,13 +1209,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -1232,13 +1213,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
}
}
@@ -520,7 +520,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
}
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
@@ -4519,10 +4493,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -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) {
@@ -531,7 +531,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
final AABB boundingBox = this.getBoundingBox().deflate(1.0E-3);
final Level world = this.level;
@@ -4558,7 +4528,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -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) {
@@ -544,7 +544,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
// bound y
for (int currChunkY = minChunkY; currChunkY <= maxChunkY; ++currChunkY) {
@@ -4715,9 +4689,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4719,9 +4693,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void setDeltaMovement(Vec3 deltaMovement) {
@@ -554,7 +554,7 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
}
public void addDeltaMovement(Vec3 addend) {
@@ -4825,9 +4797,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4829,9 +4801,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) {
@@ -564,6 +564,18 @@ index 6b50a3fc0476f4b9941f1e66fb3f2a79042e33aa..1fdbd88841993e377ea2e14b40d059dd
int floor = Mth.floor(x);
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
--- a/net/minecraft/world/entity/ExperienceOrb.java
+++ b/net/minecraft/world/entity/ExperienceOrb.java
@@ -166,6 +166,7 @@ public class ExperienceOrb extends Entity {
if (this.age >= 6000) {
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}
+ if (this.count == 0) this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // DivineMC - discard when count is 0
}
}
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
index a58133b53a19e90d4386f57891ee41a5c03228c2..a65c86b411c15bbdfd431dac00e510d2262e65e1 100644
--- a/net/minecraft/world/entity/Mob.java

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 1fdbd88841993e377ea2e14b40d059dd220a1878..5bddb09d1b822251fc7106d22c1e26bf5abcbd3c 100644
index f825964c5e7a06d54af68c68d3bf2da0535b51d6..d80f5b6039a4e49ddbf5598f68137e7c17b388c5 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3952,6 +3952,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3956,6 +3956,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public boolean canTeleport(Level fromLevel, Level toLevel) {

View File

@@ -404,10 +404,10 @@ index 9f3afab438199dbaf40fa1a64b6ecdae74c0a34d..8923a30daf515262e4bdbfbd55e3cb82
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 d31e4f190cee68883ca48b94524fb356738a4125..28fc134b5a567b53024bc2cdc6fc363eb14c37ff 100644
index abcaa8a1f9daf4557bb24e2161e9afa01f0b7211..a1d92ad83f47bec3e07e6603103e423620a0b84c 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3239,14 +3239,34 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3243,14 +3243,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,7 +448,7 @@ index d31e4f190cee68883ca48b94524fb356738a4125..28fc134b5a567b53024bc2cdc6fc363e
} else if (this.portalProcess.hasExpired()) {
this.portalProcess = null;
}
@@ -3811,6 +3831,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3815,6 +3835,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
private Entity teleportCrossDimension(ServerLevel level, TeleportTransition teleportTransition) {
@@ -549,7 +549,7 @@ index 3614551856c594f3c0cfee984fcf03fad672b007..6add256046e392d8eb797e3fa9d1cbe7
});
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 abf7308a41e7c28e1d9fd82d5f86022a80159bff..b68dfb81974e8cc8537c1f42add6a9c6e57fe40d 100644
index 2e2745cd8e3383455656c95214779754cc890b33..c2796f90e4e9c57244d41ea6cbe8d1b87432ba88 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
@@ -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 4eedfc61c7e682a44858703b462eecad17a48904..c01463194470624ecd84209100fdbdc851028fb7 100644
index 3e6874f9e9a24e21f6fbfb0852d63fa6f4f4d603..5ebdd5d2b49f2165c8fbbee5e7615cc2398bea75 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

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Clump experience orbs
diff --git a/net/minecraft/world/entity/ExperienceOrb.java b/net/minecraft/world/entity/ExperienceOrb.java
index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e8a73a1f4 100644
index ff4648b3be103446ab401d36c14cc80b48840cab..18ccbb1344875dd7a2f2f8084102d341b2a9597e 100644
--- a/net/minecraft/world/entity/ExperienceOrb.java
+++ b/net/minecraft/world/entity/ExperienceOrb.java
@@ -47,6 +47,10 @@ public class ExperienceOrb extends Entity {
@@ -19,7 +19,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
private void loadPaperNBT(CompoundTag tag) {
CompoundTag expData = tag.getCompoundOrEmpty("Paper.ExpData");
@@ -244,6 +248,28 @@ public class ExperienceOrb extends Entity {
@@ -245,6 +249,28 @@ public class ExperienceOrb extends Entity {
}
private static boolean tryMergeToExisting(ServerLevel level, Vec3 pos, int amount) {
@@ -48,7 +48,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
// Paper - TODO some other event for this kind of merge
AABB aabb = AABB.ofSize(pos, 1.0, 1.0, 1.0);
int randomInt = level.getRandom().nextInt(io.papermc.paper.configuration.GlobalConfiguration.get().misc.xpOrbGroupsPerArea.or(ORB_GROUPS_PER_AREA)); // Paper - Configure how many orb groups per area
@@ -259,11 +285,11 @@ public class ExperienceOrb extends Entity {
@@ -260,11 +286,11 @@ public class ExperienceOrb extends Entity {
}
private boolean canMerge(ExperienceOrb orb) {
@@ -62,7 +62,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
}
private void merge(ExperienceOrb orb) {
@@ -272,6 +298,18 @@ public class ExperienceOrb extends Entity {
@@ -273,6 +299,18 @@ public class ExperienceOrb extends Entity {
return;
}
// Paper end - call orb merge event
@@ -81,7 +81,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
this.count = this.count + orb.count;
this.age = Math.min(this.age, orb.age);
orb.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
@@ -313,6 +351,13 @@ public class ExperienceOrb extends Entity {
@@ -314,6 +352,13 @@ public class ExperienceOrb extends Entity {
compound.putInt("Value", this.getValue()); // Paper - save as Integer
compound.putInt("Count", this.count);
this.savePaperNBT(compound); // Paper
@@ -95,7 +95,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
}
@Override
@@ -322,10 +367,53 @@ public class ExperienceOrb extends Entity {
@@ -323,10 +368,53 @@ public class ExperienceOrb extends Entity {
this.setValue(compound.getIntOr("Value", 0)); // Paper - load as Integer
this.count = compound.read("Count", ExtraCodecs.POSITIVE_INT).orElse(1);
this.loadPaperNBT(compound); // Paper
@@ -149,7 +149,7 @@ index 81aa1a91a2ecda3053b22c2eb9e59f0ea2faf7b5..e441aac80736910dfa726788ee34fb1e
if (entity instanceof ServerPlayer serverPlayer) {
if (entity.takeXpDelay == 0 && new com.destroystokyo.paper.event.player.PlayerPickupExperienceEvent(serverPlayer.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) this.getBukkitEntity()).callEvent()) { // Paper - PlayerPickupExperienceEvent
entity.takeXpDelay = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerXpCooldownEvent(entity, this.level().purpurConfig.playerExpPickupDelay, org.bukkit.event.player.PlayerExpCooldownChangeEvent.ChangeReason.PICKUP_ORB).getNewCooldown(); // CraftBukkit - entityhuman.takeXpDelay = 2; // Purpur - Configurable player pickup exp delay
@@ -343,10 +431,60 @@ public class ExperienceOrb extends Entity {
@@ -344,10 +432,60 @@ public class ExperienceOrb extends Entity {
}
}

View File

@@ -2,7 +2,7 @@ group = org.bxteam.divinemc
version=1.21.5-R0.1-SNAPSHOT
mcVersion=1.21.5
purpurRef=916df1a858c46e240fa966540cf1cc819cfb3c36
purpurRef=7c6502dc1372c8522ea62ec2e2bd8f9e12a26d67
experimental=false
org.gradle.configuration-cache=true