diff --git a/patches/unapplied/server/Add-BlockBreakBlockEvent.patch b/patches/server/Add-BlockBreakBlockEvent.patch similarity index 100% rename from patches/unapplied/server/Add-BlockBreakBlockEvent.patch rename to patches/server/Add-BlockBreakBlockEvent.patch diff --git a/patches/unapplied/server/Add-PlayerSetSpawnEvent.patch b/patches/server/Add-PlayerSetSpawnEvent.patch similarity index 99% rename from patches/unapplied/server/Add-PlayerSetSpawnEvent.patch rename to patches/server/Add-PlayerSetSpawnEvent.patch index 0444b5edbf..9a27ae571f 100644 --- a/patches/unapplied/server/Add-PlayerSetSpawnEvent.patch +++ b/patches/server/Add-PlayerSetSpawnEvent.patch @@ -152,7 +152,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return true; // Paper } - public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { + public SectionPos getLastSectionPos() { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/patches/unapplied/server/Add-System.out-err-catcher.patch b/patches/server/Add-System.out-err-catcher.patch similarity index 100% rename from patches/unapplied/server/Add-System.out-err-catcher.patch rename to patches/server/Add-System.out-err-catcher.patch diff --git a/patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/unapplied/server/Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/unapplied/server/Added-EntityDamageItemEvent.patch b/patches/server/Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/unapplied/server/Added-EntityDamageItemEvent.patch rename to patches/server/Added-EntityDamageItemEvent.patch diff --git a/patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/unapplied/server/Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch b/patches/server/Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/unapplied/server/Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch b/patches/server/Clear-bucket-NBT-after-dispense.patch similarity index 90% rename from patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch rename to patches/server/Clear-bucket-NBT-after-dispense.patch index 2d8b8edf63..46112cd13e 100644 --- a/patches/unapplied/server/Clear-bucket-NBT-after-dispense.patch +++ b/patches/server/Clear-bucket-NBT-after-dispense.patch @@ -15,6 +15,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - stack.setItem(Items.BUCKET); - stack.setCount(1); + stack = new ItemStack(item); // Paper - clear tag - } else if (((DispenserBlockEntity) pointer.getEntity()).addItem(new ItemStack(item)) < 0) { + } else if (pointer.blockEntity().addItem(new ItemStack(item)) < 0) { this.defaultDispenseItemBehavior.dispense(pointer, new ItemStack(item)); } diff --git a/patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch b/patches/server/Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/unapplied/server/Config-option-for-Piglins-guarding-chests.patch rename to patches/server/Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/unapplied/server/Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch b/patches/server/Don-t-apply-cramming-damage-to-players.patch similarity index 100% rename from patches/unapplied/server/Don-t-apply-cramming-damage-to-players.patch rename to patches/server/Don-t-apply-cramming-damage-to-players.patch diff --git a/patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/unapplied/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/unapplied/server/Improve-boat-collision-performance.patch b/patches/server/Improve-boat-collision-performance.patch similarity index 99% rename from patches/unapplied/server/Improve-boat-collision-performance.patch rename to patches/server/Improve-boat-collision-performance.patch index d5c7b5a60a..de752ef2e4 100644 --- a/patches/unapplied/server/Improve-boat-collision-performance.patch +++ b/patches/server/Improve-boat-collision-performance.patch @@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { } - if (entity1 != null && !source.is(DamageTypeTags.IS_EXPLOSION)) { + if (entity1 != null && !source.is(DamageTypeTags.NO_KNOCKBACK)) { - double d0 = entity1.getX() - this.getX(); + final boolean far = entity1.distanceToSqr(this) > (200.0 * 200.0); // Paper + double d0 = far ? (Math.random() - Math.random()) : entity1.getX() - this.getX(); // Paper diff --git a/patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch b/patches/server/Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/unapplied/server/Make-EntityUnleashEvent-cancellable.patch rename to patches/server/Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/unapplied/server/Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/unapplied/server/More-CommandBlock-API.patch b/patches/server/More-CommandBlock-API.patch similarity index 100% rename from patches/unapplied/server/More-CommandBlock-API.patch rename to patches/server/More-CommandBlock-API.patch diff --git a/patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch b/patches/server/Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/unapplied/server/Optimize-entity-tracker-passenger-checks.patch rename to patches/server/Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/unapplied/server/Optimize-indirect-passenger-iteration.patch b/patches/server/Optimize-indirect-passenger-iteration.patch similarity index 94% rename from patches/unapplied/server/Optimize-indirect-passenger-iteration.patch rename to patches/server/Optimize-indirect-passenger-iteration.patch index 280f61edfd..c6ac7d02d0 100644 --- a/patches/unapplied/server/Optimize-indirect-passenger-iteration.patch +++ b/patches/server/Optimize-indirect-passenger-iteration.patch @@ -43,8 +43,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return () -> { return this.getIndirectPassengersStream().iterator(); }; -@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { - // Paper end - rewrite chunk system + } public boolean hasExactlyOnePlayerPassenger() { + if (this.passengers.isEmpty()) { return false; } // Paper diff --git a/patches/unapplied/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 74% rename from patches/unapplied/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch index faa1e5f9e1..3d29864f0b 100644 --- a/patches/unapplied/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch +++ b/patches/server/Option-to-prevent-NBT-copy-in-smithing-recipes.patch @@ -14,16 +14,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 final ItemStack result; + final boolean copyNBT; // Paper - public SmithingTransformRecipe(ResourceLocation id, Ingredient template, Ingredient base, Ingredient addition, ItemStack result) { + public SmithingTransformRecipe(Ingredient template, Ingredient base, Ingredient addition, ItemStack result) { + // Paper start -+ this(id, template, base, addition, result, true); ++ this(template, base, addition, result, true); + } -+ public SmithingTransformRecipe(ResourceLocation id, Ingredient template, Ingredient base, Ingredient addition, ItemStack result, boolean copyNBT) { ++ public SmithingTransformRecipe(Ingredient template, Ingredient base, Ingredient addition, ItemStack result, boolean copyNBT) { + this.copyNBT = copyNBT; + // Paper end - this.id = id; this.template = template; this.base = base; + this.addition = addition; @@ -0,0 +0,0 @@ public class SmithingTransformRecipe implements SmithingRecipe { @Override public ItemStack assemble(Container inventory, RegistryAccess registryManager) { @@ -39,11 +39,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return itemstack; } @@ -0,0 +0,0 @@ public class SmithingTransformRecipe implements SmithingRecipe { - public Recipe toBukkitRecipe() { + public Recipe toBukkitRecipe(NamespacedKey id) { CraftItemStack result = CraftItemStack.asCraftMirror(this.result); -- CraftSmithingTransformRecipe recipe = new CraftSmithingTransformRecipe(CraftNamespacedKey.fromMinecraft(this.id), result, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition)); -+ CraftSmithingTransformRecipe recipe = new CraftSmithingTransformRecipe(CraftNamespacedKey.fromMinecraft(this.id), result, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition), this.copyNBT); // Paper +- CraftSmithingTransformRecipe recipe = new CraftSmithingTransformRecipe(id, result, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition)); ++ CraftSmithingTransformRecipe recipe = new CraftSmithingTransformRecipe(id, result, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition), this.copyNBT); // Paper return recipe; } @@ -57,16 +57,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 final Ingredient addition; + final boolean copyNbt; // Paper - public SmithingTrimRecipe(ResourceLocation id, Ingredient template, Ingredient base, Ingredient addition) { + public SmithingTrimRecipe(Ingredient template, Ingredient base, Ingredient addition) { + // Paper start -+ this(id, template, base, addition, true); ++ this(template, base, addition, true); + } + public SmithingTrimRecipe(ResourceLocation id, Ingredient template, Ingredient base, Ingredient addition, boolean copyNbt) { + this.copyNbt = copyNbt; + // Paper end - this.id = id; this.template = template; this.base = base; + this.addition = addition; @@ -0,0 +0,0 @@ public class SmithingTrimRecipe implements SmithingRecipe { return ItemStack.EMPTY; } @@ -79,9 +79,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class SmithingTrimRecipe implements SmithingRecipe { // CraftBukkit start @Override - public Recipe toBukkitRecipe() { -- return new CraftSmithingTrimRecipe(CraftNamespacedKey.fromMinecraft(this.id), CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition)); -+ return new CraftSmithingTrimRecipe(CraftNamespacedKey.fromMinecraft(this.id), CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition), this.copyNbt); // Paper + public Recipe toBukkitRecipe(NamespacedKey id) { +- return new CraftSmithingTrimRecipe(id, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition)); ++ return new CraftSmithingTrimRecipe(id, CraftRecipe.toBukkit(this.template), CraftRecipe.toBukkit(this.base), CraftRecipe.toBukkit(this.addition), this.copyNbt); // Paper } // CraftBukkit end @@ -112,8 +112,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void addToCraftingManager() { ItemStack result = this.getResult(); -- MinecraftServer.getServer().getRecipeManager().addRecipe(new net.minecraft.world.item.crafting.SmithingTransformRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))); -+ MinecraftServer.getServer().getRecipeManager().addRecipe(new net.minecraft.world.item.crafting.SmithingTransformRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyNbt())); // Paper +- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result)))); ++ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyNbt()))); // Paper } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java @@ -141,7 +141,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void addToCraftingManager() { -- MinecraftServer.getServer().getRecipeManager().addRecipe(new net.minecraft.world.item.crafting.SmithingTrimRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true))); -+ MinecraftServer.getServer().getRecipeManager().addRecipe(new net.minecraft.world.item.crafting.SmithingTrimRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), this.willCopyNbt())); // Paper +- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true)))); ++ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), this.willCopyNbt()))); // Paper } } diff --git a/patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/Prevent-AFK-kick-while-watching-end-credits.patch similarity index 93% rename from patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/Prevent-AFK-kick-while-watching-end-credits.patch index d2d0c3192c..da6e8bf395 100644 --- a/patches/unapplied/server/Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/Prevent-AFK-kick-while-watching-end-credits.patch @@ -8,7 +8,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 --this.dropSpamTickCount; } diff --git a/patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 100% rename from patches/unapplied/server/Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/Rate-options-and-timings-for-sensors-and-behaviors.patch diff --git a/patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/server/Stinger-API.patch b/patches/server/Stinger-API.patch similarity index 100% rename from patches/unapplied/server/Stinger-API.patch rename to patches/server/Stinger-API.patch diff --git a/patches/unapplied/server/Add-ItemFactory-getSpawnEgg-API.patch b/patches/unapplied/Add-ItemFactory-getSpawnEgg-API.patch similarity index 100% rename from patches/unapplied/server/Add-ItemFactory-getSpawnEgg-API.patch rename to patches/unapplied/Add-ItemFactory-getSpawnEgg-API.patch diff --git a/patches/unapplied/server/Add-back-EntityPortalExitEvent.patch b/patches/unapplied/Add-back-EntityPortalExitEvent.patch similarity index 100% rename from patches/unapplied/server/Add-back-EntityPortalExitEvent.patch rename to patches/unapplied/Add-back-EntityPortalExitEvent.patch diff --git a/patches/unapplied/server/Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/unapplied/Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 100% rename from patches/unapplied/server/Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/unapplied/Add-methods-to-find-targets-for-lightning-strikes.patch diff --git a/patches/unapplied/server/Add-missing-team-sidebar-display-slots.patch b/patches/unapplied/Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/unapplied/server/Add-missing-team-sidebar-display-slots.patch rename to patches/unapplied/Add-missing-team-sidebar-display-slots.patch diff --git a/patches/unapplied/server/Add-more-advancement-API.patch b/patches/unapplied/Add-more-advancement-API.patch similarity index 100% rename from patches/unapplied/server/Add-more-advancement-API.patch rename to patches/unapplied/Add-more-advancement-API.patch diff --git a/patches/unapplied/server/Get-entity-default-attributes.patch b/patches/unapplied/Get-entity-default-attributes.patch similarity index 100% rename from patches/unapplied/server/Get-entity-default-attributes.patch rename to patches/unapplied/Get-entity-default-attributes.patch diff --git a/patches/unapplied/server/Left-handed-API.patch b/patches/unapplied/Left-handed-API.patch similarity index 100% rename from patches/unapplied/server/Left-handed-API.patch rename to patches/unapplied/Left-handed-API.patch