Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@efd47e3 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9188)
PaperMC/Paper@1edfefd Add option to flush region files on save (#9149)
PaperMC/Paper@9daa019 Added wither vanilla invulnerability API (#9124)
This commit is contained in:
granny
2023-05-12 22:22:02 -07:00
parent 84da84887e
commit 3325421436
79 changed files with 323 additions and 347 deletions

View File

@@ -556,7 +556,7 @@ index 2c23321c826d929981df51f2cc60cdcdb649a43f..0ae45cf5a084fd412305e8b2f5dabe60
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2b82da383452b290ae99197c743e9a6ee5497713..10d602b947edaae6b78efe9d0773021bcb1c35bf 100644
index e7e762bbc096c0e87c3d2513d67fec87807b55a4..86b8485c0fb1dc5cd79c9e24546dc74459822a48 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -654,12 +654,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -768,10 +768,10 @@ index 2b82da383452b290ae99197c743e9a6ee5497713..10d602b947edaae6b78efe9d0773021b
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 15a5ad23531848dce7c6b0be9eefefb70e150608..ac63f8d93048a0e61f1e27abb4cc5e2b5cc5208e 100644
index d6edd8501d044980900ac011e1c4938b7fc4e64d..15ec63fab5468bbfbfeefdf5475305fdf64b2b33 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1197,7 +1197,7 @@ public class ServerPlayer extends Player {
@@ -1199,7 +1199,7 @@ public class ServerPlayer extends Player {
PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver);
if (shapedetectorshape != null) {
@@ -780,7 +780,7 @@ index 15a5ad23531848dce7c6b0be9eefefb70e150608..ac63f8d93048a0e61f1e27abb4cc5e2b
worldserver = shapedetectorshape.world; // CraftBukkit
if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit
@@ -1220,8 +1220,8 @@ public class ServerPlayer extends Player {
@@ -1222,8 +1222,8 @@ public class ServerPlayer extends Player {
worldserver = ((CraftWorld) exit.getWorld()).getHandle();
// CraftBukkit end
@@ -791,7 +791,7 @@ index 15a5ad23531848dce7c6b0be9eefefb70e150608..ac63f8d93048a0e61f1e27abb4cc5e2b
if (true) { // CraftBukkit
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
@@ -1240,7 +1240,7 @@ public class ServerPlayer extends Player {
@@ -1242,7 +1242,7 @@ public class ServerPlayer extends Player {
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
this.connection.resetPosition();
worldserver.addDuringPortalTeleport(this);
@@ -801,10 +801,10 @@ index 15a5ad23531848dce7c6b0be9eefefb70e150608..ac63f8d93048a0e61f1e27abb4cc5e2b
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
playerlist.sendLevelInfo(this, worldserver);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 003e50f2d70ebf4e060a41675cb2f1fcea46f32d..3e304f035b1cd10cc525bfe6e409d61cb47562ee 100644
index 5af28dcdd37d1bbe4d5873957e390016a9961fbb..f3ce7a1b5af187f281e0a3da03494ed323a585f9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -409,7 +409,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -410,7 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.aboveGroundVehicleTickCount = 0;
}
@@ -813,7 +813,7 @@ index 003e50f2d70ebf4e060a41675cb2f1fcea46f32d..3e304f035b1cd10cc525bfe6e409d61c
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
long currentTime = Util.getMillis();
@@ -445,7 +445,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -446,7 +446,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
// Paper end
@@ -1027,10 +1027,10 @@ 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 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe5100cacd 100644
index 3e929ec3fd377b0679ac7070e61378c86d616c92..def4a9fd76b99f4f30fc2f9551cb6b283035cc88 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -823,7 +823,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -824,7 +824,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return;
}
// Pufferfish end - entity TTL
@@ -1039,7 +1039,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
this.feetBlockState = null;
if (this.isPassenger() && this.getVehicle().isRemoved()) {
@@ -884,7 +884,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -885,7 +885,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.firstTick = false;
@@ -1048,7 +1048,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
}
public void setSharedFlagOnFire(boolean onFire) {
@@ -1058,7 +1058,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1059,7 +1059,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
@@ -1057,7 +1057,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1067,7 +1067,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1068,7 +1068,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
// 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);
@@ -1066,7 +1066,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
return;
}
// Paper end
@@ -1088,8 +1088,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1089,8 +1089,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
}
@@ -1077,7 +1077,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
boolean flag = !Mth.equal(movement.x, vec3d1.x);
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
@@ -1108,7 +1108,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1109,7 +1109,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
if (this.isRemoved()) {
@@ -1086,7 +1086,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
} else {
if (this.horizontalCollision) {
Vec3 vec3d2 = this.getDeltaMovement();
@@ -1249,7 +1249,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1250,7 +1250,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setRemainingFireTicks(-this.getFireImmuneTicks());
}
@@ -1095,7 +1095,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
}
}
// Paper start - detailed watchdog information
@@ -2963,7 +2963,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2964,7 +2964,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
@@ -1104,7 +1104,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
this.portalTime = i;
// Paper start
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);
@@ -2981,7 +2981,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2982,7 +2982,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
} // Paper
// CraftBukkit end
@@ -1113,7 +1113,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
}
this.isInsidePortal = false;
@@ -3448,14 +3448,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3449,14 +3449,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// Paper end
if (this.level instanceof ServerLevel && !this.isRemoved()) {
@@ -1130,7 +1130,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
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) {
@@ -3489,7 +3489,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3490,7 +3490,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.unRide();
// CraftBukkit end
@@ -1139,7 +1139,7 @@ index 20221ab20b5589f663b8d26c504578af33adc8f2..55116e7a7b70a6f9db187ac7ef0747fe
// Paper start - Change lead drop timing to prevent dupe
if (this instanceof Mob) {
((Mob) this).dropLeash(true, true); // Paper drop lead
@@ -3512,10 +3512,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3513,10 +3513,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.removeAfterChangingDimensions();
@@ -1694,7 +1694,7 @@ index f40806e7d9c08cf7b85215fbf0c66169eb4dc6ae..69e5b4b6c8d5725bc2fb7cd819219e4f
if ((this.tickCount + this.getId()) % 120 == 0) {
Warden.applyDarknessAround(worldserver, this.position(), this, 20);
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 505411b18989191ffa976283d08b644e11ef3f05..26857b0e5134f56df47115031727e0ad68216bc6 100644
index 6f47f6c785dc8da6b211ac87630a3d83c42d1576..73cdb6b1793b264e1ec8ff51c4f8274366a7d4d7 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -335,7 +335,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@@ -1716,10 +1716,10 @@ index 505411b18989191ffa976283d08b644e11ef3f05..26857b0e5134f56df47115031727e0ad
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 59837144c2c0460aca6e8c349eb3d6528111d1dc..4392336d28aa3cc7a767a2e638e2227c16a597f4 100644
index 185f7b1d4df59f5db7b85b529a2de6402630bf35..735fe36f35330adb10bb097dd011216c864e9584 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -372,7 +372,7 @@ public class Explosion {
@@ -382,7 +382,7 @@ public class Explosion {
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
BlockPos blockposition1 = blockposition.immutable();
@@ -1728,7 +1728,7 @@ index 59837144c2c0460aca6e8c349eb3d6528111d1dc..4392336d28aa3cc7a767a2e638e2227c
if (block.dropFromExplosion(this)) {
Level world = this.level;
@@ -394,7 +394,7 @@ public class Explosion {
@@ -404,7 +404,7 @@ public class Explosion {
this.level.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 3);
block.wasExploded(this.level, blockposition, this);