Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@c1ea550 Remove more outdated config settings (#9358)
PaperMC/Paper@3a03739 Add method to get ungenerated chunk from long key (#9254)
PaperMC/Paper@072b78a Add trail ruins structure set seed in spigot config (#9327)
PaperMC/Paper@faf9a65 Disable BukkitMirrorTest
PaperMC/Paper@873533b Add method to remove all active potion effects (#9361)
PaperMC/Paper@275173e Updated Upstream (Bukkit/CraftBukkit)
PaperMC/Paper@976b95c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338)
PaperMC/Paper@d6d4c78 Move some Folia API to Paper for easy compat (#9360)
PaperMC/Paper@b1fe756 Revert "Move some Folia API to Paper for easy compat (#9360)"
PaperMC/Paper@1f5bec7 Pull Folia API take two
PaperMC/Paper@3756f5b Properly Cancel Usable Items (#9225)
This commit is contained in:
granny
2023-06-20 15:54:20 -07:00
parent fa3166a24d
commit 991719aa9e
52 changed files with 243 additions and 229 deletions

View File

@@ -39,7 +39,7 @@ index 5f6cc8b16af6dce3b74f0c2c662b0ecf84ae8d36..52b06c34d9d3ffb8844556e7b0eaed5a
return b0;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab681b1ab5 100644
index 3a8eeacc042f5af41c6c87169a50009b72045150..b1bbe7bb30ae786ea09ef0e9d949ed043e9c2940 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -341,13 +341,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -154,9 +154,9 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
org.spigotmc.WatchdogThread.tick(); // Spigot
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
}
@@ -1507,11 +1507,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
//MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -1519,11 +1519,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}));
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
- this.profiler.push("commandFunctions");
+ //this.profiler.push("commandFunctions"); // Purpur
@@ -168,7 +168,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
//Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
// CraftBukkit start
@@ -1553,18 +1553,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1565,18 +1565,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
@@ -192,7 +192,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
try {
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
@@ -1590,17 +1590,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1602,17 +1602,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
throw new ReportedException(crashreport);
}
@@ -214,7 +214,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
this.playerList.tick();
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -1608,7 +1608,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1620,7 +1620,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
GameTestTicker.SINGLETON.tick();
}
@@ -223,7 +223,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
for (int i = 0; i < this.tickables.size(); ++i) {
@@ -1616,7 +1616,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1628,7 +1628,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
@@ -232,7 +232,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
}
private void synchronizeTime(ServerLevel world) {
@@ -1624,7 +1624,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1636,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void forceTimeSynchronization() {
@@ -241,7 +241,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
Iterator iterator = this.getAllLevels().iterator();
while (iterator.hasNext()) {
@@ -1633,7 +1633,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1645,7 +1645,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.synchronizeTime(worldserver);
}
@@ -250,7 +250,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
}
public boolean isNetherEnabled() {
@@ -2286,7 +2286,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2298,7 +2298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public ProfilerFiller getProfiler() {
@@ -259,7 +259,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
return this.profiler;
}
@@ -2526,7 +2526,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2538,7 +2538,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
private void startMetricsRecordingTick() {
@@ -268,7 +268,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
this.executeBlocking(() -> {
this.saveDebugReport(path.resolve("server"));
@@ -2536,40 +2536,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2548,40 +2548,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.willStartRecordingMetrics = false;
}
@@ -321,7 +321,7 @@ index 6f3074ff02039a5b7fd139d36f23d3d571c5b7bc..762028f25430013b2ae11caf76405cab
}
public Path getWorldPath(LevelResource worldSavePath) {
@@ -2618,15 +2618,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2630,15 +2630,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public boolean isTimeProfilerRunning() {
@@ -819,7 +819,7 @@ index fe66f37a2b385870bf72f97e73b297b9bc2ef9c3..0540ccd4137b5fb65440e5013d67e349
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 52b9d600409dd4accb78f6eff2ffbaefcae8d322..6ca00bc5da778f3f53f87ec539b8605c4f013e45 100644
index 13f07c874cdf9a8063ce8f72d2402d27e6a1e7e5..4ad3916e687f9f7aa7fb6fe7bb45f236ac20b810 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -410,7 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1045,10 +1045,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 db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339ecf6ce85f 100644
index 0be80982b8bdcbb884aeb9a257693f0035928bef..24d87e62d9722a553944b8d9199209c3688ae865 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -426,7 +426,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -438,7 +438,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // golf score
public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // used where needed
// Pufferfish end
@@ -1057,7 +1057,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
public float getBukkitYaw() {
return this.yRot;
}
@@ -850,7 +850,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -863,7 +863,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return;
}
// Pufferfish end - entity TTL
@@ -1066,7 +1066,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
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()) {
@@ -911,7 +911,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -924,7 +924,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.firstTick = false;
@@ -1075,7 +1075,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
}
public void setSharedFlagOnFire(boolean onFire) {
@@ -1130,7 +1130,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1143,7 +1143,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
}
@@ -1084,7 +1084,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
movement = movement.multiply(this.stuckSpeedMultiplier);
this.stuckSpeedMultiplier = Vec3.ZERO;
@@ -1139,7 +1139,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1152,7 +1152,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);
@@ -1093,7 +1093,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
return;
}
// Paper end
@@ -1160,8 +1160,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1173,8 +1173,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
}
@@ -1104,7 +1104,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
boolean flag = !Mth.equal(movement.x, vec3d1.x);
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
@@ -1180,7 +1180,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1193,7 +1193,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
if (this.isRemoved()) {
@@ -1113,7 +1113,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
} else {
if (this.horizontalCollision) {
Vec3 vec3d2 = this.getDeltaMovement();
@@ -1318,7 +1318,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -1331,7 +1331,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.setRemainingFireTicks(-this.getFireImmuneTicks());
}
@@ -1122,7 +1122,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
}
}
// Paper start - detailed watchdog information
@@ -3104,7 +3104,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3117,7 +3117,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
@@ -1131,7 +1131,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
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);
@@ -3122,7 +3122,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3135,7 +3135,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
} // Paper
// CraftBukkit end
@@ -1140,7 +1140,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
}
this.isInsidePortal = false;
@@ -3593,14 +3593,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3606,14 +3606,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// Paper end
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
@@ -1157,7 +1157,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
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) {
@@ -3634,7 +3634,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3647,7 +3647,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
this.unRide();
// CraftBukkit end
@@ -1166,7 +1166,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
// Paper start - Change lead drop timing to prevent dupe
if (this instanceof Mob) {
((Mob) this).dropLeash(true, true); // Paper drop lead
@@ -3657,10 +3657,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3670,10 +3670,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
this.removeAfterChangingDimensions();
@@ -1180,7 +1180,7 @@ index db30761805fe90279297ea939fba45530d7a5db0..7648d6faf9ef9308c92bdbd481b6339e
}
} else {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 5ad5bc75af60a16b02c9604dd027403b5b6a67e6..5427fb8c2f5a53a8d293fb4c36f6620ca0205e38 100644
index 428c99b98b8161eac82c651a477ba478b4ee0ce7..f8b920d7b7afff39a62c8a8a08512a7c59a23687 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -411,7 +411,7 @@ public abstract class LivingEntity extends Entity implements Attackable {