From da97ab094f3bd64ccdd750b5688f332c46c656fd Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 8 Jun 2022 00:40:34 -0700 Subject: [PATCH] batch o' patches --- .../{unapplied => }/server/Add-Block-isValidTool.patch | 0 .../Add-dropLeash-variable-to-EntityUnleashEvent.patch | 0 ...dd-fast-alternative-constructor-for-Rotations.patch | 0 .../Add-getMainThreadExecutor-to-BukkitScheduler.patch | 0 .../server/Add-recipe-to-cook-events.patch | 5 ++--- .../Add-support-for-hex-color-codes-in-console.patch | 2 +- .../Add-toggle-for-always-placing-the-dragon-egg.patch | 0 .../server/Add-worldborder-events.patch | 0 .../Added-PlayerStonecutterRecipeSelectEvent.patch | 0 .../Allow-adding-items-to-BlockDropItemEvent.patch | 0 ...or-Component-suggestion-tooltips-in-AsyncTabC.patch | 0 .../Allow-using-signs-inside-spawn-protection.patch | 0 .../Don-t-ignore-result-of-PlayerEditBookEvent.patch | 0 ...rop-carried-item-when-player-has-disconnected.patch | 0 ...-console-tab-completions-for-brigadier-comman.patch | 3 ++- .../server/Entity-load-save-limit-per-chunk.patch | 0 patches/{unapplied => }/server/EntityMoveEvent.patch | 0 .../{unapplied => }/server/Expand-world-key-API.patch | 2 +- .../server/Expose-Tracked-Players.patch | 0 .../server/Expose-protocol-version.patch | 0 patches/{unapplied => }/server/Improve-ServerGUI.patch | 0 .../server/Inline-shift-direction-fields.patch | 0 patches/{unapplied => }/server/Item-Rarity-API.patch | 0 ...nt-getRecipes-should-return-an-immutable-list.patch | 0 ...t-despawnTimer-for-Wandering-Traders-spawned-.patch | 0 .../Prevent-grindstones-from-overstacking-items.patch | 0 .../server/Remove-streams-from-SensorNearest.patch | 4 ++-- .../Reset-shield-blocking-on-dimension-change.patch | 0 ...Throw-proper-exception-on-empty-JsonList-file.patch | 0 .../server/add-DragonEggFormEvent.patch | 0 .../server/added-PlayerNameEntityEvent.patch | 0 ...ption-to-disable-pathfinding-updates-on-block.patch | 0 .../server/copy-TESign-isEditable-from-snapshots.patch | 0 .../server/fix-converting-txt-to-json-file.patch | 0 .../server/fix-dead-slime-setSize-invincibility.patch | 0 ...orced-whitelist-use-configurable-kick-message.patch | 10 +--------- .../living-entity-allow-attribute-registration.patch | 0 ...ring-pressure-plate-EntityInteractEvent-for-i.patch | 0 38 files changed, 9 insertions(+), 17 deletions(-) rename patches/{unapplied => }/server/Add-Block-isValidTool.patch (100%) rename patches/{unapplied => }/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch (100%) rename patches/{unapplied => }/server/Add-fast-alternative-constructor-for-Rotations.patch (100%) rename patches/{unapplied => }/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch (100%) rename patches/{unapplied => }/server/Add-recipe-to-cook-events.patch (89%) rename patches/{unapplied => }/server/Add-support-for-hex-color-codes-in-console.patch (99%) rename patches/{unapplied => }/server/Add-toggle-for-always-placing-the-dragon-egg.patch (100%) rename patches/{unapplied => }/server/Add-worldborder-events.patch (100%) rename patches/{unapplied => }/server/Added-PlayerStonecutterRecipeSelectEvent.patch (100%) rename patches/{unapplied => }/server/Allow-adding-items-to-BlockDropItemEvent.patch (100%) rename patches/{unapplied => }/server/Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch (100%) rename patches/{unapplied => }/server/Allow-using-signs-inside-spawn-protection.patch (100%) rename patches/{unapplied => }/server/Don-t-ignore-result-of-PlayerEditBookEvent.patch (100%) rename patches/{unapplied => }/server/Drop-carried-item-when-player-has-disconnected.patch (100%) rename patches/{unapplied => }/server/Enhance-console-tab-completions-for-brigadier-comman.patch (99%) rename patches/{unapplied => }/server/Entity-load-save-limit-per-chunk.patch (100%) rename patches/{unapplied => }/server/EntityMoveEvent.patch (100%) rename patches/{unapplied => }/server/Expand-world-key-API.patch (98%) rename patches/{unapplied => }/server/Expose-Tracked-Players.patch (100%) rename patches/{unapplied => }/server/Expose-protocol-version.patch (100%) rename patches/{unapplied => }/server/Improve-ServerGUI.patch (100%) rename patches/{unapplied => }/server/Inline-shift-direction-fields.patch (100%) rename patches/{unapplied => }/server/Item-Rarity-API.patch (100%) rename patches/{unapplied => }/server/Merchant-getRecipes-should-return-an-immutable-list.patch (100%) rename patches/{unapplied => }/server/Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch (100%) rename patches/{unapplied => }/server/Prevent-grindstones-from-overstacking-items.patch (100%) rename patches/{unapplied => }/server/Remove-streams-from-SensorNearest.patch (97%) rename patches/{unapplied => }/server/Reset-shield-blocking-on-dimension-change.patch (100%) rename patches/{unapplied => }/server/Throw-proper-exception-on-empty-JsonList-file.patch (100%) rename patches/{unapplied => }/server/add-DragonEggFormEvent.patch (100%) rename patches/{unapplied => }/server/added-PlayerNameEntityEvent.patch (100%) rename patches/{unapplied => }/server/added-option-to-disable-pathfinding-updates-on-block.patch (100%) rename patches/{unapplied => }/server/copy-TESign-isEditable-from-snapshots.patch (100%) rename patches/{unapplied => }/server/fix-converting-txt-to-json-file.patch (100%) rename patches/{unapplied => }/server/fix-dead-slime-setSize-invincibility.patch (100%) rename patches/{unapplied => }/server/forced-whitelist-use-configurable-kick-message.patch (65%) rename patches/{unapplied => }/server/living-entity-allow-attribute-registration.patch (100%) rename patches/{unapplied => }/server/stop-firing-pressure-plate-EntityInteractEvent-for-i.patch (100%) diff --git a/patches/unapplied/server/Add-Block-isValidTool.patch b/patches/server/Add-Block-isValidTool.patch similarity index 100% rename from patches/unapplied/server/Add-Block-isValidTool.patch rename to patches/server/Add-Block-isValidTool.patch diff --git a/patches/unapplied/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch similarity index 100% rename from patches/unapplied/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch rename to patches/server/Add-dropLeash-variable-to-EntityUnleashEvent.patch diff --git a/patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch b/patches/server/Add-fast-alternative-constructor-for-Rotations.patch similarity index 100% rename from patches/unapplied/server/Add-fast-alternative-constructor-for-Rotations.patch rename to patches/server/Add-fast-alternative-constructor-for-Rotations.patch diff --git a/patches/unapplied/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch similarity index 100% rename from patches/unapplied/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch rename to patches/server/Add-getMainThreadExecutor-to-BukkitScheduler.patch diff --git a/patches/unapplied/server/Add-recipe-to-cook-events.patch b/patches/server/Add-recipe-to-cook-events.patch similarity index 89% rename from patches/unapplied/server/Add-recipe-to-cook-events.patch rename to patches/server/Add-recipe-to-cook-events.patch index 4585456c82..a9704d6fb5 100644 --- a/patches/unapplied/server/Add-recipe-to-cook-events.patch +++ b/patches/server/Add-recipe-to-cook-events.patch @@ -25,9 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack}); -- ItemStack itemstack1 = (ItemStack) world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world).map((recipecampfire) -> { -+ // Paper start -+ Optional recipe = world.getRecipeManager().getRecipeFor(RecipeType.CAMPFIRE_COOKING, inventorysubcontainer, world); +- ItemStack itemstack1 = (ItemStack) campfire.quickCheck.getRecipeFor(inventorysubcontainer, world).map((recipecampfire) -> { ++ Optional recipe = campfire.quickCheck.getRecipeFor( inventorysubcontainer, world); + ItemStack itemstack1 = (ItemStack) recipe.map((recipecampfire) -> { + // Paper end return recipecampfire.assemble(inventorysubcontainer); diff --git a/patches/unapplied/server/Add-support-for-hex-color-codes-in-console.patch b/patches/server/Add-support-for-hex-color-codes-in-console.patch similarity index 99% rename from patches/unapplied/server/Add-support-for-hex-color-codes-in-console.patch rename to patches/server/Add-support-for-hex-color-codes-in-console.patch index 6e17dee51e..2c3d4d9f46 100644 --- a/patches/unapplied/server/Add-support-for-hex-color-codes-in-console.patch +++ b/patches/server/Add-support-for-hex-color-codes-in-console.patch @@ -276,7 +276,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop optional = list.stream().filter((itemEntity) -> { - return entity.wantsToPickUp(itemEntity.getItem()); - }).filter((itemEntity) -> { -- return itemEntity.closerThan(entity, 9.0D); +- return itemEntity.closerThan(entity, 32.0D); - }).filter(entity::hasLineOfSight).findFirst(); - brain.setMemory(MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, optional); + // Paper start - remove streams in favour of lists + ItemEntity nearest = null; + for (ItemEntity entityItem : list) { -+ if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 9.0D) && entity.hasLineOfSight(entityItem)) { ++ if (entity.wantsToPickUp(entityItem.getItem()) && entityItem.closerThan(entity, 32.0D) && entity.hasLineOfSight(entityItem)) { + nearest = entityItem; + break; + } diff --git a/patches/unapplied/server/Reset-shield-blocking-on-dimension-change.patch b/patches/server/Reset-shield-blocking-on-dimension-change.patch similarity index 100% rename from patches/unapplied/server/Reset-shield-blocking-on-dimension-change.patch rename to patches/server/Reset-shield-blocking-on-dimension-change.patch diff --git a/patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch b/patches/server/Throw-proper-exception-on-empty-JsonList-file.patch similarity index 100% rename from patches/unapplied/server/Throw-proper-exception-on-empty-JsonList-file.patch rename to patches/server/Throw-proper-exception-on-empty-JsonList-file.patch diff --git a/patches/unapplied/server/add-DragonEggFormEvent.patch b/patches/server/add-DragonEggFormEvent.patch similarity index 100% rename from patches/unapplied/server/add-DragonEggFormEvent.patch rename to patches/server/add-DragonEggFormEvent.patch diff --git a/patches/unapplied/server/added-PlayerNameEntityEvent.patch b/patches/server/added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/unapplied/server/added-PlayerNameEntityEvent.patch rename to patches/server/added-PlayerNameEntityEvent.patch diff --git a/patches/unapplied/server/added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/added-option-to-disable-pathfinding-updates-on-block.patch similarity index 100% rename from patches/unapplied/server/added-option-to-disable-pathfinding-updates-on-block.patch rename to patches/server/added-option-to-disable-pathfinding-updates-on-block.patch diff --git a/patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch b/patches/server/copy-TESign-isEditable-from-snapshots.patch similarity index 100% rename from patches/unapplied/server/copy-TESign-isEditable-from-snapshots.patch rename to patches/server/copy-TESign-isEditable-from-snapshots.patch diff --git a/patches/unapplied/server/fix-converting-txt-to-json-file.patch b/patches/server/fix-converting-txt-to-json-file.patch similarity index 100% rename from patches/unapplied/server/fix-converting-txt-to-json-file.patch rename to patches/server/fix-converting-txt-to-json-file.patch diff --git a/patches/unapplied/server/fix-dead-slime-setSize-invincibility.patch b/patches/server/fix-dead-slime-setSize-invincibility.patch similarity index 100% rename from patches/unapplied/server/fix-dead-slime-setSize-invincibility.patch rename to patches/server/fix-dead-slime-setSize-invincibility.patch diff --git a/patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch b/patches/server/forced-whitelist-use-configurable-kick-message.patch similarity index 65% rename from patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch rename to patches/server/forced-whitelist-use-configurable-kick-message.patch index 7c19575581..14b6b3af91 100644 --- a/patches/unapplied/server/forced-whitelist-use-configurable-kick-message.patch +++ b/patches/server/forced-whitelist-use-configurable-kick-message.patch @@ -8,19 +8,11 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -0,0 +0,0 @@ import net.minecraft.gametest.framework.GameTestTicker; - import net.minecraft.nbt.Tag; - import net.minecraft.network.chat.Component; - import net.minecraft.network.chat.TextComponent; --import net.minecraft.network.chat.TranslatableComponent; - import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket; - import net.minecraft.network.protocol.game.ClientboundSetTimePacket; - import net.minecraft.network.protocol.status.ServerStatus; @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop