diff --git a/patches/unapplied/server/Add-API-for-resetting-a-single-score.patch b/patches/server/Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/unapplied/server/Add-API-for-resetting-a-single-score.patch rename to patches/server/Add-API-for-resetting-a-single-score.patch diff --git a/patches/unapplied/server/Add-Raw-Byte-Entity-Serialization.patch b/patches/server/Add-Raw-Byte-Entity-Serialization.patch similarity index 100% rename from patches/unapplied/server/Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/Add-Raw-Byte-Entity-Serialization.patch diff --git a/patches/unapplied/server/Add-isCollidable-methods-to-various-places.patch b/patches/server/Add-isCollidable-methods-to-various-places.patch similarity index 100% rename from patches/unapplied/server/Add-isCollidable-methods-to-various-places.patch rename to patches/server/Add-isCollidable-methods-to-various-places.patch diff --git a/patches/unapplied/server/Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch similarity index 99% rename from patches/unapplied/server/Add-paper-mobcaps-and-paper-playermobcaps.patch rename to patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch index d3446f38ad..f267756a38 100644 --- a/patches/unapplied/server/Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java @@ -0,0 +0,0 @@ public final class PaperCommand extends Command { - commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand()); + commands.put(Set.of("fixlight"), new FixLightCommand()); commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand()); commands.put(Set.of("dumpitem"), new DumpItemCommand()); + commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand()); diff --git a/patches/unapplied/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 100% rename from patches/unapplied/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch diff --git a/patches/unapplied/server/Fix-GameProfileCache-concurrency.patch b/patches/server/Fix-GameProfileCache-concurrency.patch similarity index 94% rename from patches/unapplied/server/Fix-GameProfileCache-concurrency.patch rename to patches/server/Fix-GameProfileCache-concurrency.patch index 02c7fbd628..5378aae3f8 100644 --- a/patches/unapplied/server/Fix-GameProfileCache-concurrency.patch +++ b/patches/server/Fix-GameProfileCache-concurrency.patch @@ -30,14 +30,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 GameProfile gameprofile = entry.getProfile(); entry.setLastAccess(this.getNextOperation()); -@@ -0,0 +0,0 @@ public class GameProfileCache { - if (uuid != null) { - this.profilesByUUID.put(uuid, entry); - } + this.profilesByName.put(gameprofile.getName().toLowerCase(Locale.ROOT), entry); + this.profilesByUUID.put(gameprofile.getId(), entry); + } finally { this.stateLock.unlock(); } // Paper - allow better concurrency - } + private static Optional lookupGameProfile(GameProfileRepository repository, String name) { @@ -0,0 +0,0 @@ public class GameProfileCache { // Paper start @@ -79,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } finally { if (stateLocked) { this.stateLock.unlock(); } } // Paper - allow better concurrency } - public void getAsync(String username, Consumer> consumer) { + public CompletableFuture> getAsync(String username) { @@ -0,0 +0,0 @@ public class GameProfileCache { } diff --git a/patches/unapplied/server/Fix-issues-with-mob-conversion.patch b/patches/server/Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/unapplied/server/Fix-issues-with-mob-conversion.patch rename to patches/server/Fix-issues-with-mob-conversion.patch diff --git a/patches/unapplied/server/Goat-ram-API.patch b/patches/server/Goat-ram-API.patch similarity index 86% rename from patches/unapplied/server/Goat-ram-API.patch rename to patches/server/Goat-ram-API.patch index a69d01fd63..468b0c467c 100644 --- a/patches/unapplied/server/Goat-ram-API.patch +++ b/patches/server/Goat-ram-API.patch @@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -0,0 +0,0 @@ public class Goat extends Animal { - public static boolean checkGoatSpawnRules(EntityType entityType, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { - return world.getBlockState(pos.below()).is(BlockTags.GOATS_SPAWNABLE_ON) && isBrightEnoughToSpawn(world, pos); + protected Vector3f getPassengerAttachmentPoint(Entity passenger, EntityDimensions dimensions, float scaleFactor) { + return new Vector3f(0.0F, dimensions.height - 0.1875F * scaleFactor, 0.0F); } + + // Paper start - Goat ram API diff --git a/patches/unapplied/server/Improve-and-expand-AsyncCatcher.patch b/patches/server/Improve-and-expand-AsyncCatcher.patch similarity index 94% rename from patches/unapplied/server/Improve-and-expand-AsyncCatcher.patch rename to patches/server/Improve-and-expand-AsyncCatcher.patch index 8a77f0e125..743f3e2e84 100644 --- a/patches/unapplied/server/Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/Improve-and-expand-AsyncCatcher.patch @@ -20,7 +20,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { // Paper @@ -174,7 +174,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public boolean addPotionEffect(PotionEffect effect, boolean force) { + org.spigotmc.AsyncCatcher.catchOp("effect add"); // Paper - this.getHandle().addEffect(new MobEffectInstance(MobEffect.byId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon + this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon return true; } diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -183,7 +183,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/spigotmc/AsyncCatcher.java @@ -0,0 +0,0 @@ public class AsyncCatcher { - if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system + if ( (AsyncCatcher.enabled || io.papermc.paper.util.TickThread.STRICT_THREAD_CHECKS) && Thread.currentThread() != MinecraftServer.getServer().serverThread ) // Paper { + MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper throw new IllegalStateException( "Asynchronous " + reason + "!" ); diff --git a/patches/unapplied/server/Optimise-general-POI-access.patch b/patches/server/Optimise-general-POI-access.patch similarity index 99% rename from patches/unapplied/server/Optimise-general-POI-access.patch rename to patches/server/Optimise-general-POI-access.patch index 4b433d66f3..c8432453cb 100644 --- a/patches/unapplied/server/Optimise-general-POI-access.patch +++ b/patches/server/Optimise-general-POI-access.patch @@ -976,12 +976,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + private final Map, Set> byType = Maps.newHashMap(); public final Map, Set> getData() { return this.byType; } // Paper - public accessor private final Runnable setDirty; private boolean isValid; - public final Optional noAllocateOptional = Optional.of(this); // Paper - rewrite chunk system + diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/SectionStorage.java -@@ -0,0 +0,0 @@ public class SectionStorage extends RegionFileStorage implements AutoCloseabl +@@ -0,0 +0,0 @@ public class SectionStorage implements AutoCloseable { } @Nullable diff --git a/patches/unapplied/server/Sanitize-ResourceLocation-error-logging.patch b/patches/server/Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/unapplied/server/Sanitize-ResourceLocation-error-logging.patch rename to patches/server/Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/unapplied/server/Vanilla-command-permission-fixes.patch b/patches/server/Vanilla-command-permission-fixes.patch similarity index 100% rename from patches/unapplied/server/Vanilla-command-permission-fixes.patch rename to patches/server/Vanilla-command-permission-fixes.patch diff --git a/patches/unapplied/server/Allow-controlled-flushing-for-network-manager.patch b/patches/unapplied/skipped/Allow-controlled-flushing-for-network-manager.patch similarity index 100% rename from patches/unapplied/server/Allow-controlled-flushing-for-network-manager.patch rename to patches/unapplied/skipped/Allow-controlled-flushing-for-network-manager.patch