Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@31699ae Updated Upstream (Bukkit/CraftBukkit) (#10242)
This commit is contained in:
granny
2024-02-11 21:56:58 -08:00
parent 425889dc45
commit 70a76c42bf
77 changed files with 356 additions and 375 deletions

View File

@@ -836,7 +836,7 @@ index b4b256721b7a5d25deec717123501a163fcfd8fe..75b3de5c1e26815aa04dba3f09f2ef78
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 620b7937b03ba178b3fc70b542962b12ce0d3bac..a3b3d85ff56a050219d2997955d088724132e988 100644
index c0543808d13453f9d1f56ef83b9ab16db2edd5bf..46c9cfa78fff65c24137792826c7f68483a39876 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1240,7 +1240,7 @@ public class ServerPlayer extends Player {
@@ -1095,7 +1095,7 @@ index 2e6e8eac987c4ef6b2dcd3de592d8a51d2b29792..863343a87fe34d72f04af89d75268b47
};
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e624126191 100644
index 03f6b992aae18679845e04c6c0f70bacac11d996..2d997b91636aba8c71ae543253cde7376e99a822 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -848,7 +848,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1116,7 +1116,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
}
public void setSharedFlagOnFire(boolean onFire) {
@@ -1129,7 +1129,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1128,7 +1128,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
@@ -1125,7 +1125,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1138,7 +1138,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1137,7 +1137,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Paper start - ignore movement changes while inactive.
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
setDeltaMovement(Vec3.ZERO);
@@ -1134,7 +1134,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
return;
}
// Paper end
@@ -1159,8 +1159,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1158,8 +1158,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
}
@@ -1145,7 +1145,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
boolean flag = !Mth.equal(movement.x, vec3d1.x);
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
@@ -1179,7 +1179,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1178,7 +1178,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
if (this.isRemoved()) {
@@ -1154,7 +1154,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
} else {
if (this.horizontalCollision) {
Vec3 vec3d2 = this.getDeltaMovement();
@@ -1317,7 +1317,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1316,7 +1316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setRemainingFireTicks(-this.getFireImmuneTicks());
}
@@ -1163,7 +1163,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
}
}
// Paper start - detailed watchdog information
@@ -3185,7 +3185,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3189,7 +3189,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
@@ -1172,7 +1172,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
this.portalTime = i;
// Paper start - Add EntityPortalReadyEvent
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
@@ -3203,7 +3203,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3207,7 +3207,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
} // Paper - Add EntityPortalReadyEvent
// CraftBukkit end
@@ -1181,7 +1181,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
}
this.isInsidePortal = false;
@@ -3678,14 +3678,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3681,14 +3681,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// Paper end - Fix item duplication and teleport issues
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
@@ -1198,7 +1198,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
if (shapedetectorshape == null) {
@@ -3724,7 +3724,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3727,7 +3727,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.unRide();
// CraftBukkit end
@@ -1207,7 +1207,7 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
// Paper start - Fix item duplication and teleport issues
if (this instanceof Mob) {
((Mob) this).dropLeash(true, true); // Paper drop lead
@@ -3751,10 +3751,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3754,10 +3754,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
this.removeAfterChangingDimensions();
@@ -1221,10 +1221,10 @@ index 2c8cc87353450e2d99c80bcefaf30bc5819a6061..b58a9ea6ec03d6cd434923d2354061e6
}
} else {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af513ab471d1 100644
index 1b58cc6ee449cfb655b7179be9d3bf8d48a86c4e..5c667328f76688d6b557452319117734aaa861a6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -408,7 +408,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -409,7 +409,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
super.baseTick();
@@ -1233,7 +1233,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
if (this.fireImmune() || this.level().isClientSide) {
this.clearFire();
}
@@ -511,7 +511,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -512,7 +512,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.yHeadRotO = this.yHeadRot;
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
@@ -1242,7 +1242,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
}
public boolean canSpawnSoulSpeedParticle() {
@@ -3166,10 +3166,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3179,10 +3179,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.run += (f3 - this.run) * 0.3F;
@@ -1256,7 +1256,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
// Paper start - stop large pitch and yaw changes from crashing the server
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
@@ -3181,7 +3181,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3194,7 +3194,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
// Paper end
@@ -1265,7 +1265,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
this.animStep += f2;
if (this.isFallFlying()) {
++this.fallFlyTicks;
@@ -3476,19 +3476,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3489,19 +3489,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.setDeltaMovement(d0, d1, d2);
@@ -1290,7 +1290,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
if (this.jumping && this.isAffectedByFluids()) {
double d3;
@@ -3515,8 +3515,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3528,8 +3528,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.noJumpDelay = 0;
}
@@ -1301,7 +1301,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
this.xxa *= 0.98F;
this.zza *= 0.98F;
this.updateFallFlying();
@@ -3543,8 +3543,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3556,8 +3556,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travel(vec3d1);
}
@@ -1312,7 +1312,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
if (!this.level().isClientSide && !this.isDeadOrDying() && !this.freezeLocked) { // Paper - Freeze Tick Lock API
int i = this.getTicksFrozen();
@@ -3561,15 +3561,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3574,15 +3574,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurt(this.damageSources().freeze(), 1.0F);
}
@@ -1332,7 +1332,7 @@ index 38c639d0c38e07908ac26a9c998ff06f28a09089..4fe150e70b5ecd74263f67a343a5af51
// Purpur start
if (this.xo != this.getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 2cf0d698b341d418d0ac4760f95e3ea52c193098..11062e250657cb839ca046d6c224647915d3ee7b 100644
index 8588f230724e7fec2093b0b5c8c80b3d1944ce47..94c43de94a7ec7982046cf1e110b8a2230a72b19 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -367,13 +367,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
@@ -1568,7 +1568,7 @@ index e73d7b47327da59dbf49c2160acd0b3ebb2a4232..472b76d6ec721fa46857097589aa879f
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index d1ada87d222e5b35c2df5a0e7b0075ec3413fa66..fb50a3f3665cca4bb2e586fbd73c580a5d691f69 100644
index a654c26742d8aa5e4c58a6391ad2fc5fe917ed3a..41773acc8e8e27daa1fe43726939b2d95da92c30 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -158,13 +158,13 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
@@ -1799,10 +1799,10 @@ index 857d1d80afd35d30a2947b0a6f953e5af1516048..18f92478f07de7c941ff8bbe0ec2ef2f
this.assignProfessionWhenSpawned = false;
}
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index 28ef910885dbd48965fba6f08cec412697b1b7f0..02dae407069a0200e271cc9c6f3ec6ff80f79025 100644
index f0fbde839a527481314f54a1aefa0fc317ba2221..2feebcd1b6ca062f027acf02c15c36c810942980 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -659,7 +659,7 @@ public class Explosion {
@@ -665,7 +665,7 @@ public class Explosion {
}
if (flag1) {
@@ -1811,7 +1811,7 @@ index 28ef910885dbd48965fba6f08cec412697b1b7f0..02dae407069a0200e271cc9c6f3ec6ff
List<Pair<ItemStack, BlockPos>> list = new ArrayList();
Util.shuffle(this.toBlow, this.level.random);
@@ -735,7 +735,7 @@ public class Explosion {
@@ -741,7 +741,7 @@ public class Explosion {
Block.popResource(this.level, (BlockPos) pair.getSecond(), (ItemStack) pair.getFirst());
}