From 9811c737bb3249b22e41dc417ce782e477a3e4e3 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Tue, 5 Dec 2023 15:21:44 -0700 Subject: [PATCH] some more patches --- ...-replace-OfflinePlayer-getLastPlayed.patch | 0 .../server/Add-Heightmap-API.patch | 0 .../Add-LivingEntity-getTargetEntity.patch | 0 .../Add-PlayerConnectionCloseEvent.patch | 0 .../server/Add-more-Witch-API.patch | 0 .../server/Add-more-Zombie-API.patch | 0 ...event-players-from-moving-into-unloa.patch | 10 +++--- .../server/Add-sun-related-API.patch | 0 .../Allow-Saving-of-Oversized-Chunks.patch | 0 .../server/Async-command-map-building.patch | 0 ...-remove-from-being-called-on-Players.patch | 0 .../server/BlockDestroyEvent.patch | 0 .../server/Book-Size-Limits.patch | 0 ...oggleEvent-when-whitelist-is-toggled.patch | 0 ...tator-target-events-and-improve-impl.patch | 0 ...arseException-in-Entity-and-TE-names.patch | 0 ...owned-for-Villager-Aggression-Config.patch | 0 ...le-Keep-Spawn-Loaded-range-per-world.patch | 8 ++--- ...ble-connection-throttle-kick-message.patch | 0 ...gurable-projectile-relative-velocity.patch | 0 ...t-allow-digging-into-unloaded-chunks.patch | 0 ...-after-profile-lookups-if-not-needed.patch | 0 .../server/Entity-getEntitySpawnReason.patch | 8 ++--- .../Expose-the-internal-current-tick.patch | 0 .../server/Fire-event-on-GS4-query.patch | 0 ...l-to-changed-postToMainThread-method.patch | 0 .../Fix-SpongeAbsortEvent-handling.patch | 0 .../Fix-World-isChunkGenerated-calls.patch | 0 ...n-item-frames-are-modified-MC-123450.patch | 0 ...e-Large-Packets-disconnecting-client.patch | 0 ...le-Oversized-Tile-Entities-in-chunks.patch | 0 .../server/Honor-EntityAgeable.ageLock.patch | 0 .../server/Hook-into-CB-plugin-rewrites.patch | 0 .../Implement-Brigadier-Mojang-API.patch | 6 ++-- .../Implement-CraftBlockSoundGroup.patch | 0 .../Implement-PlayerPostRespawnEvent.patch | 0 ...-for-CanPlaceOn-and-CanDestroy-NBT-v.patch | 0 ...nt-furnace-cook-speed-multiplier-API.patch | 0 ...er-Thread-Pool-and-Thread-Priorities.patch | 13 +++---- ...rove-exact-choice-recipe-ingredients.patch | 8 ++--- .../Limit-Client-Sign-length-more.patch | 2 +- ...ther-worlds-for-shooter-of-projectil.patch | 34 +++++++++---------- ...ault-permission-message-configurable.patch | 0 .../server/Mob-Spawner-API-Enhancements.patch | 0 ...al-Spawned-mobs-towards-natural-spaw.patch | 0 .../Optimize-Captured-TileEntity-Lookup.patch | 0 ...-Manager-and-add-advanced-packet-sup.patch | 0 .../server/Optimize-World-Time-Updates.patch | 0 .../PlayerDeathEvent-getItemsToKeep.patch | 0 .../server/PreSpawnerSpawnEvent.patch | 0 ...Prevent-Enderman-from-loading-chunks.patch | 0 ...ent-Mob-AI-Rules-from-Loading-Chunks.patch | 0 ...ent-chunk-loading-from-Fluid-Flowing.patch | 0 ...wning-from-loading-generating-chunks.patch | 0 ...Prevent-rayTrace-from-loading-chunks.patch | 0 .../Reset-players-airTicks-on-respawn.patch | 0 ...store-custom-InventoryHolder-support.patch | 0 .../server/Server-Tick-Events.patch | 6 ++-- ...ate-location-if-we-failed-to-read-it.patch | 0 .../{unapplied => }/server/Turtle-API.patch | 0 .../server/Use-Vanilla-Minecart-Speeds.patch | 2 +- ...vehicle-tracking-issue-on-disconnect.patch | 0 ...-for-pickupDelay-breaks-picking-up-i.patch | 0 ...entity-dismount-during-teleportation.patch | 8 ++--- .../server/offset-item-frame-ticking.patch | 0 65 files changed, 53 insertions(+), 52 deletions(-) rename patches/{unapplied => }/server/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch (100%) rename patches/{unapplied => }/server/Add-Heightmap-API.patch (100%) rename patches/{unapplied => }/server/Add-LivingEntity-getTargetEntity.patch (100%) rename patches/{unapplied => }/server/Add-PlayerConnectionCloseEvent.patch (100%) rename patches/{unapplied => }/server/Add-more-Witch-API.patch (100%) rename patches/{unapplied => }/server/Add-more-Zombie-API.patch (100%) rename patches/{unapplied => }/server/Add-option-to-prevent-players-from-moving-into-unloa.patch (91%) rename patches/{unapplied => }/server/Add-sun-related-API.patch (100%) rename patches/{unapplied => }/server/Allow-Saving-of-Oversized-Chunks.patch (100%) rename patches/{unapplied => }/server/Async-command-map-building.patch (100%) rename patches/{unapplied => }/server/Block-Entity-remove-from-being-called-on-Players.patch (100%) rename patches/{unapplied => }/server/BlockDestroyEvent.patch (100%) rename patches/{unapplied => }/server/Book-Size-Limits.patch (100%) rename patches/{unapplied => }/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch (100%) rename patches/{unapplied => }/server/Call-player-spectator-target-events-and-improve-impl.patch (100%) rename patches/{unapplied => }/server/Catch-JsonParseException-in-Entity-and-TE-names.patch (100%) rename patches/{unapplied => }/server/Check-Drowned-for-Villager-Aggression-Config.patch (100%) rename patches/{unapplied => }/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch (96%) rename patches/{unapplied => }/server/Configurable-connection-throttle-kick-message.patch (100%) rename patches/{unapplied => }/server/Configurable-projectile-relative-velocity.patch (100%) rename patches/{unapplied => }/server/Don-t-allow-digging-into-unloaded-chunks.patch (100%) rename patches/{unapplied => }/server/Don-t-sleep-after-profile-lookups-if-not-needed.patch (100%) rename patches/{unapplied => }/server/Entity-getEntitySpawnReason.patch (97%) rename patches/{unapplied => }/server/Expose-the-internal-current-tick.patch (100%) rename patches/{unapplied => }/server/Fire-event-on-GS4-query.patch (100%) rename patches/{unapplied => }/server/Fix-CB-call-to-changed-postToMainThread-method.patch (100%) rename patches/{unapplied => }/server/Fix-SpongeAbsortEvent-handling.patch (100%) rename patches/{unapplied => }/server/Fix-World-isChunkGenerated-calls.patch (100%) rename patches/{unapplied => }/server/Fix-sounds-when-item-frames-are-modified-MC-123450.patch (100%) rename patches/{unapplied => }/server/Handle-Large-Packets-disconnecting-client.patch (100%) rename patches/{unapplied => }/server/Handle-Oversized-Tile-Entities-in-chunks.patch (100%) rename patches/{unapplied => }/server/Honor-EntityAgeable.ageLock.patch (100%) rename patches/{unapplied => }/server/Hook-into-CB-plugin-rewrites.patch (100%) rename patches/{unapplied => }/server/Implement-Brigadier-Mojang-API.patch (96%) rename patches/{unapplied => }/server/Implement-CraftBlockSoundGroup.patch (100%) rename patches/{unapplied => }/server/Implement-PlayerPostRespawnEvent.patch (100%) rename patches/{unapplied => }/server/Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch (100%) rename patches/{unapplied => }/server/Implement-furnace-cook-speed-multiplier-API.patch (100%) rename patches/{unapplied => }/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch (89%) rename patches/{unapplied => }/server/Improve-exact-choice-recipe-ingredients.patch (99%) rename patches/{unapplied => }/server/Limit-Client-Sign-length-more.patch (96%) rename patches/{unapplied => }/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch (54%) rename patches/{unapplied => }/server/Make-the-default-permission-message-configurable.patch (100%) rename patches/{unapplied => }/server/Mob-Spawner-API-Enhancements.patch (100%) rename patches/{unapplied => }/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch (100%) rename patches/{unapplied => }/server/Optimize-Captured-TileEntity-Lookup.patch (100%) rename patches/{unapplied => }/server/Optimize-Network-Manager-and-add-advanced-packet-sup.patch (100%) rename patches/{unapplied => }/server/Optimize-World-Time-Updates.patch (100%) rename patches/{unapplied => }/server/PlayerDeathEvent-getItemsToKeep.patch (100%) rename patches/{unapplied => }/server/PreSpawnerSpawnEvent.patch (100%) rename patches/{unapplied => }/server/Prevent-Enderman-from-loading-chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-chunk-loading-from-Fluid-Flowing.patch (100%) rename patches/{unapplied => }/server/Prevent-mob-spawning-from-loading-generating-chunks.patch (100%) rename patches/{unapplied => }/server/Prevent-rayTrace-from-loading-chunks.patch (100%) rename patches/{unapplied => }/server/Reset-players-airTicks-on-respawn.patch (100%) rename patches/{unapplied => }/server/Restore-custom-InventoryHolder-support.patch (100%) rename patches/{unapplied => }/server/Server-Tick-Events.patch (91%) rename patches/{unapplied => }/server/Show-blockstate-location-if-we-failed-to-read-it.patch (100%) rename patches/{unapplied => }/server/Turtle-API.patch (100%) rename patches/{unapplied => }/server/Use-Vanilla-Minecart-Speeds.patch (93%) rename patches/{unapplied => }/server/Workaround-for-vehicle-tracking-issue-on-disconnect.patch (100%) rename patches/{unapplied => }/server/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch (100%) rename patches/{unapplied => }/server/force-entity-dismount-during-teleportation.patch (97%) rename patches/{unapplied => }/server/offset-item-frame-ticking.patch (100%) diff --git a/patches/unapplied/server/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 100% rename from patches/unapplied/server/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to patches/server/Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch diff --git a/patches/unapplied/server/Add-Heightmap-API.patch b/patches/server/Add-Heightmap-API.patch similarity index 100% rename from patches/unapplied/server/Add-Heightmap-API.patch rename to patches/server/Add-Heightmap-API.patch diff --git a/patches/unapplied/server/Add-LivingEntity-getTargetEntity.patch b/patches/server/Add-LivingEntity-getTargetEntity.patch similarity index 100% rename from patches/unapplied/server/Add-LivingEntity-getTargetEntity.patch rename to patches/server/Add-LivingEntity-getTargetEntity.patch diff --git a/patches/unapplied/server/Add-PlayerConnectionCloseEvent.patch b/patches/server/Add-PlayerConnectionCloseEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerConnectionCloseEvent.patch rename to patches/server/Add-PlayerConnectionCloseEvent.patch diff --git a/patches/unapplied/server/Add-more-Witch-API.patch b/patches/server/Add-more-Witch-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-Witch-API.patch rename to patches/server/Add-more-Witch-API.patch diff --git a/patches/unapplied/server/Add-more-Zombie-API.patch b/patches/server/Add-more-Zombie-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-Zombie-API.patch rename to patches/server/Add-more-Zombie-API.patch diff --git a/patches/unapplied/server/Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 91% rename from patches/unapplied/server/Add-option-to-prevent-players-from-moving-into-unloa.patch rename to patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch index 85eae89587..86287757a3 100644 --- a/patches/unapplied/server/Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -53,9 +53,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - } else { - speed = this.player.getAbilities().walkingSpeed * 10f; - } + } else { + speed = this.player.getAbilities().walkingSpeed * 10f; + } + // Paper start - Prevent moving into unloaded chunks + if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) { + this.internalTeleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot(), Collections.emptySet()); @@ -63,5 +63,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // Paper end - if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { - float f2 = this.player.isFallFlying() ? 300.0F : 100.0F; + if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { + float f2 = this.player.isFallFlying() ? 300.0F : 100.0F; diff --git a/patches/unapplied/server/Add-sun-related-API.patch b/patches/server/Add-sun-related-API.patch similarity index 100% rename from patches/unapplied/server/Add-sun-related-API.patch rename to patches/server/Add-sun-related-API.patch diff --git a/patches/unapplied/server/Allow-Saving-of-Oversized-Chunks.patch b/patches/server/Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from patches/unapplied/server/Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/Allow-Saving-of-Oversized-Chunks.patch diff --git a/patches/unapplied/server/Async-command-map-building.patch b/patches/server/Async-command-map-building.patch similarity index 100% rename from patches/unapplied/server/Async-command-map-building.patch rename to patches/server/Async-command-map-building.patch diff --git a/patches/unapplied/server/Block-Entity-remove-from-being-called-on-Players.patch b/patches/server/Block-Entity-remove-from-being-called-on-Players.patch similarity index 100% rename from patches/unapplied/server/Block-Entity-remove-from-being-called-on-Players.patch rename to patches/server/Block-Entity-remove-from-being-called-on-Players.patch diff --git a/patches/unapplied/server/BlockDestroyEvent.patch b/patches/server/BlockDestroyEvent.patch similarity index 100% rename from patches/unapplied/server/BlockDestroyEvent.patch rename to patches/server/BlockDestroyEvent.patch diff --git a/patches/unapplied/server/Book-Size-Limits.patch b/patches/server/Book-Size-Limits.patch similarity index 100% rename from patches/unapplied/server/Book-Size-Limits.patch rename to patches/server/Book-Size-Limits.patch diff --git a/patches/unapplied/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from patches/unapplied/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/patches/unapplied/server/Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/Call-player-spectator-target-events-and-improve-impl.patch similarity index 100% rename from patches/unapplied/server/Call-player-spectator-target-events-and-improve-impl.patch rename to patches/server/Call-player-spectator-target-events-and-improve-impl.patch diff --git a/patches/unapplied/server/Catch-JsonParseException-in-Entity-and-TE-names.patch b/patches/server/Catch-JsonParseException-in-Entity-and-TE-names.patch similarity index 100% rename from patches/unapplied/server/Catch-JsonParseException-in-Entity-and-TE-names.patch rename to patches/server/Catch-JsonParseException-in-Entity-and-TE-names.patch diff --git a/patches/unapplied/server/Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/Check-Drowned-for-Villager-Aggression-Config.patch similarity index 100% rename from patches/unapplied/server/Check-Drowned-for-Villager-Aggression-Config.patch rename to patches/server/Check-Drowned-for-Villager-Aggression-Config.patch diff --git a/patches/unapplied/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch similarity index 96% rename from patches/unapplied/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch rename to patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch index 4742ce1f2a..7dc9754b37 100644 --- a/patches/unapplied/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -26,13 +26,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - ServerChunkCache chunkproviderserver = worldserver.getChunkSource(); + //ChunkProviderServer chunkproviderserver = worldserver.getChunkProvider(); // Paper - move up - this.nextTickTime = Util.getMillis(); + this.nextTickTimeNanos = Util.getNanos(); - // CraftBukkit start - if (worldserver.getWorld().getKeepSpawnInMemory()) { - chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(blockposition), 11, Unit.INSTANCE); - - while (chunkproviderserver.getTickingGenerated() != 441) { -- // this.nextTickTime = SystemUtils.getMillis() + 10L; +- // this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS; - this.executeModerately(); - } - } @@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + worldserver.addTicketsForSpawn(radiusBlocks, blockposition); + // Paper end - // this.nextTickTime = SystemUtils.getMillis() + 10L; + // this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS; this.executeModerately(); // Iterator iterator = this.levels.values().iterator(); + } @@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (true) { ServerLevel worldserver1 = worldserver; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, SharedSuggestionProvider { ++public class CommandSourceStack implements ExecutionCommandSource, SharedSuggestionProvider, com.destroystokyo.paper.brigadier.BukkitBrigadierCommandSource { // Paper public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player")); public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity")); -@@ -0,0 +0,0 @@ public class CommandSourceStack implements SharedSuggestionProvider { +@@ -0,0 +0,0 @@ public class CommandSourceStack implements ExecutionCommandSource { -- ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(forkJoinPool) { -+ executorService = new java.util.concurrent.ThreadPoolExecutor(i, i,0L, TimeUnit.MILLISECONDS, new java.util.concurrent.LinkedBlockingQueue(), target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier)); +- AtomicInteger atomicInteger = new AtomicInteger(1); +- executorService = new ForkJoinPool(i, (pool) -> { +- ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(pool) { ++ executorService = new java.util.concurrent.ThreadPoolExecutor(i, i,0L, TimeUnit.MILLISECONDS, new java.util.concurrent.LinkedBlockingQueue<>(), target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier)); + } + /* @Override diff --git a/patches/unapplied/server/Improve-exact-choice-recipe-ingredients.patch b/patches/server/Improve-exact-choice-recipe-ingredients.patch similarity index 99% rename from patches/unapplied/server/Improve-exact-choice-recipe-ingredients.patch rename to patches/server/Improve-exact-choice-recipe-ingredients.patch index e1e9d9e85e..e46e02064e 100644 --- a/patches/unapplied/server/Improve-exact-choice-recipe-ingredients.patch +++ b/patches/server/Improve-exact-choice-recipe-ingredients.patch @@ -342,16 +342,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 -public class ShapedRecipe implements CraftingRecipe { +public class ShapedRecipe extends io.papermc.paper.inventory.recipe.RecipeBookExactChoiceRecipe implements CraftingRecipe { // Paper - improve exact recipe choices - final int width; - final int height; + final ShapedRecipePattern pattern; + final ItemStack result; @@ -0,0 +0,0 @@ public class ShapedRecipe implements CraftingRecipe { - this.recipeItems = ingredients; + this.pattern = raw; this.result = result; this.showNotification = showNotification; + this.checkExactIngredients(); // Paper - improve exact recipe choices } - public ShapedRecipe(String group, CraftingBookCategory category, int width, int height, NonNullList ingredients, ItemStack result) { + public ShapedRecipe(String group, CraftingBookCategory category, ShapedRecipePattern raw, ItemStack result) { diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java diff --git a/patches/unapplied/server/Limit-Client-Sign-length-more.patch b/patches/server/Limit-Client-Sign-length-more.patch similarity index 96% rename from patches/unapplied/server/Limit-Client-Sign-length-more.patch rename to patches/server/Limit-Client-Sign-length-more.patch index d16fc9a632..9c0f7b2508 100644 --- a/patches/unapplied/server/Limit-Client-Sign-length-more.patch +++ b/patches/server/Limit-Client-Sign-length-more.patch @@ -26,7 +26,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- 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 extends ServerCommonPacketListenerImpl - private final MessageSignatureCache messageSignatureCache; + private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault(); private final FutureChain chatMessageChain; private boolean waitingForSwitchToConfig; + private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper diff --git a/patches/unapplied/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/patches/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 54% rename from patches/unapplied/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to patches/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index fe56c8876e..59d3d0a9cb 100644 --- a/patches/unapplied/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/patches/server/MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -15,21 +15,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -0,0 +0,0 @@ public abstract class Projectile extends Entity implements TraceableEntity { - return this.cachedOwner; - } else if (this.ownerUUID != null && this.level() instanceof ServerLevel) { - this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID); -+ // Paper start - check all worlds -+ if (this.cachedOwner == null) { -+ for (final ServerLevel level : this.level().getServer().getAllLevels()) { -+ if (level == this.level()) continue; -+ final Entity entity = level.getEntity(this.ownerUUID); -+ if (entity != null) { -+ this.cachedOwner = entity; -+ break; + ServerLevel worldserver = (ServerLevel) world; + + this.cachedOwner = worldserver.getEntity(this.ownerUUID); ++ // Paper start - check all worlds ++ if (this.cachedOwner == null) { ++ for (final ServerLevel level : this.level().getServer().getAllLevels()) { ++ if (level == this.level()) continue; ++ final Entity entity = level.getEntity(this.ownerUUID); ++ if (entity != null) { ++ this.cachedOwner = entity; ++ break; ++ } ++ } + } -+ } -+ } -+ // Paper end - return this.cachedOwner; - } else { - return null; ++ // Paper end + return this.cachedOwner; + } + } diff --git a/patches/unapplied/server/Make-the-default-permission-message-configurable.patch b/patches/server/Make-the-default-permission-message-configurable.patch similarity index 100% rename from patches/unapplied/server/Make-the-default-permission-message-configurable.patch rename to patches/server/Make-the-default-permission-message-configurable.patch diff --git a/patches/unapplied/server/Mob-Spawner-API-Enhancements.patch b/patches/server/Mob-Spawner-API-Enhancements.patch similarity index 100% rename from patches/unapplied/server/Mob-Spawner-API-Enhancements.patch rename to patches/server/Mob-Spawner-API-Enhancements.patch diff --git a/patches/unapplied/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 100% rename from patches/unapplied/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch diff --git a/patches/unapplied/server/Optimize-Captured-TileEntity-Lookup.patch b/patches/server/Optimize-Captured-TileEntity-Lookup.patch similarity index 100% rename from patches/unapplied/server/Optimize-Captured-TileEntity-Lookup.patch rename to patches/server/Optimize-Captured-TileEntity-Lookup.patch diff --git a/patches/unapplied/server/Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/unapplied/server/Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/unapplied/server/Optimize-World-Time-Updates.patch b/patches/server/Optimize-World-Time-Updates.patch similarity index 100% rename from patches/unapplied/server/Optimize-World-Time-Updates.patch rename to patches/server/Optimize-World-Time-Updates.patch diff --git a/patches/unapplied/server/PlayerDeathEvent-getItemsToKeep.patch b/patches/server/PlayerDeathEvent-getItemsToKeep.patch similarity index 100% rename from patches/unapplied/server/PlayerDeathEvent-getItemsToKeep.patch rename to patches/server/PlayerDeathEvent-getItemsToKeep.patch diff --git a/patches/unapplied/server/PreSpawnerSpawnEvent.patch b/patches/server/PreSpawnerSpawnEvent.patch similarity index 100% rename from patches/unapplied/server/PreSpawnerSpawnEvent.patch rename to patches/server/PreSpawnerSpawnEvent.patch diff --git a/patches/unapplied/server/Prevent-Enderman-from-loading-chunks.patch b/patches/server/Prevent-Enderman-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-Enderman-from-loading-chunks.patch rename to patches/server/Prevent-Enderman-from-loading-chunks.patch diff --git a/patches/unapplied/server/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/patches/server/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to patches/server/Prevent-Mob-AI-Rules-from-Loading-Chunks.patch diff --git a/patches/unapplied/server/Prevent-chunk-loading-from-Fluid-Flowing.patch b/patches/server/Prevent-chunk-loading-from-Fluid-Flowing.patch similarity index 100% rename from patches/unapplied/server/Prevent-chunk-loading-from-Fluid-Flowing.patch rename to patches/server/Prevent-chunk-loading-from-Fluid-Flowing.patch diff --git a/patches/unapplied/server/Prevent-mob-spawning-from-loading-generating-chunks.patch b/patches/server/Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-mob-spawning-from-loading-generating-chunks.patch rename to patches/server/Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/patches/unapplied/server/Prevent-rayTrace-from-loading-chunks.patch b/patches/server/Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/Prevent-rayTrace-from-loading-chunks.patch rename to patches/server/Prevent-rayTrace-from-loading-chunks.patch diff --git a/patches/unapplied/server/Reset-players-airTicks-on-respawn.patch b/patches/server/Reset-players-airTicks-on-respawn.patch similarity index 100% rename from patches/unapplied/server/Reset-players-airTicks-on-respawn.patch rename to patches/server/Reset-players-airTicks-on-respawn.patch diff --git a/patches/unapplied/server/Restore-custom-InventoryHolder-support.patch b/patches/server/Restore-custom-InventoryHolder-support.patch similarity index 100% rename from patches/unapplied/server/Restore-custom-InventoryHolder-support.patch rename to patches/server/Restore-custom-InventoryHolder-support.patch diff --git a/patches/unapplied/server/Server-Tick-Events.patch b/patches/server/Server-Tick-Events.patch similarity index 91% rename from patches/unapplied/server/Server-Tick-Events.patch rename to patches/server/Server-Tick-Events.patch index 7d6efaba5f..835f4a20c2 100644 --- a/patches/unapplied/server/Server-Tick-Events.patch +++ b/patches/server/Server-Tick-Events.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper ++this.tickCount; - this.tickChildren(shouldKeepTicking); + this.tickRateManager.tick(); @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop