diff --git a/patches/server/0612-Missing-Entity-API.patch b/patches/server/0612-Missing-Entity-API.patch index f6c3195d8e..41f60f2611 100644 --- a/patches/server/0612-Missing-Entity-API.patch +++ b/patches/server/0612-Missing-Entity-API.patch @@ -585,6 +585,47 @@ index fa0bf7db880063427ba12df1df1c72240fff93e9..63e6b07e3b159c74d9ef17be20b5ab43 public CraftCod(CraftServer server, net.minecraft.world.entity.animal.Cod entity) { super(server, entity); +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java +index af432f9a1d255a56c31c3b97aeb4457d17f37e3e..f93f8f6509b12eb9b1e07c829278bb0822dd7988 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java +@@ -18,4 +18,36 @@ public class CraftDolphin extends CraftWaterMob implements Dolphin { + public String toString() { + return "CraftDolphin"; + } ++ ++ // Paper start - Missing Dolphin API ++ @Override ++ public int getMoistness() { ++ return this.getHandle().getMoistnessLevel(); ++ } ++ ++ @Override ++ public void setMoistness(int moistness) { ++ this.getHandle().setMoisntessLevel(moistness); ++ } ++ ++ @Override ++ public void setHasFish(boolean hasFish) { ++ this.getHandle().setGotFish(hasFish); ++ } ++ ++ @Override ++ public boolean hasFish() { ++ return this.getHandle().gotFish(); ++ } ++ ++ @Override ++ public org.bukkit.Location getTreasureLocation() { ++ return io.papermc.paper.util.MCUtil.toLocation(this.getHandle().level(), this.getHandle().getTreasurePos()); ++ } ++ ++ @Override ++ public void setTreasureLocation(org.bukkit.Location location) { ++ this.getHandle().setTreasurePos(io.papermc.paper.util.MCUtil.toBlockPosition(location)); ++ } ++ // Paper end - Missing Dolphin API + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java index 21dc209e6f98b6306833b41e2763e746047d5a94..983b9d6ddb58eff297e96e5c8b28ec427efa267d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java diff --git a/patches/server/0700-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0700-Remove-client-side-code-using-deprecated-for-removal.patch index 41ae87a8e9..c9d518a9bb 100644 --- a/patches/server/0700-Remove-client-side-code-using-deprecated-for-removal.patch +++ b/patches/server/0700-Remove-client-side-code-using-deprecated-for-removal.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Remove client-side code using deprecated for removal Fixes warnings on build diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 7be16ce8c8582d8587c4d1cb4c099fa6fe5f1324..22dfe70df68b35e313f94b17a87e4121392b17b4 100644 +index 7be16ce8c8582d8587c4d1cb4c099fa6fe5f1324..646afa849148cdd5bc9812a1ebd9cb5d15c39311 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -955,17 +955,7 @@ public class Util { @@ -25,7 +25,7 @@ index 7be16ce8c8582d8587c4d1cb4c099fa6fe5f1324..22dfe70df68b35e313f94b17a87e4121 - Util.LOGGER.error("Couldn't open url '{}'", url, var3); - } - -+ throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper ++ throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper - Fix warnings on build by removing client-only code } public void openUri(URI uri) { diff --git a/patches/server/0701-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0701-Fix-removing-recipes-from-RecipeIterator.patch index c57379be37..fb78c572eb 100644 --- a/patches/server/0701-Fix-removing-recipes-from-RecipeIterator.patch +++ b/patches/server/0701-Fix-removing-recipes-from-RecipeIterator.patch @@ -7,14 +7,14 @@ Subject: [PATCH] Fix removing recipes from RecipeIterator public net.minecraft.world.item.crafting.RecipeManager byName diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java -index 65b12eaab871019def074bf17257772ff7f09806..692d9abd715988c96934888b492b93efa64ecce4 100644 +index 65b12eaab871019def074bf17257772ff7f09806..5217e9f7e78e5d4d5751bba51554ff46666b77dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java @@ -13,6 +13,7 @@ import org.bukkit.inventory.Recipe; public class RecipeIterator implements Iterator { private final Iterator, Object2ObjectLinkedOpenHashMap>>> recipes; private Iterator> current; -+ private Recipe currentRecipe; // Paper - fix removing recipes ++ private Recipe currentRecipe; // Paper - fix removing recipes from RecipeIterator public RecipeIterator() { this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.entrySet().iterator(); @@ -23,28 +23,28 @@ index 65b12eaab871019def074bf17257772ff7f09806..692d9abd715988c96934888b492b93ef if (this.current == null || !this.current.hasNext()) { this.current = this.recipes.next().getValue().values().iterator(); - return this.next(); -+ // Paper start - fix removing recipes ++ // Paper start - fix removing recipes from RecipeIterator + this.currentRecipe = this.next(); + return this.currentRecipe; -+ // Paper end ++ // Paper end - fix removing recipes from RecipeIterator } - return this.current.next().toBukkitRecipe(); -+ // Paper start - fix removing recipes ++ // Paper start - fix removing recipes from RecipeIterator + this.currentRecipe = this.current.next().toBukkitRecipe(); + return this.currentRecipe; -+ // Paper end ++ // Paper end - fix removing recipes from RecipeIterator } @Override public void remove() { Preconditions.checkState(this.current != null, "next() not yet called"); + -+ // Paper start - fix removing recipes ++ // Paper start - fix removing recipes from RecipeIterator + if (this.currentRecipe instanceof org.bukkit.Keyed keyed) { + MinecraftServer.getServer().getRecipeManager().byName.remove(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(keyed.getKey())); + } -+ // Paper end ++ // Paper end - fix removing recipes from RecipeIterator this.current.remove(); } } diff --git a/patches/server/0702-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0702-Prevent-sending-oversized-item-data-in-equipment-and.patch index 9258abcc59..74dfc70c85 100644 --- a/patches/server/0702-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0702-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -18,7 +18,7 @@ index f9e15908143f4453c2a5817b412e8a13554553f0..06498788c169133bd563c5a87192b718 @Override diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index e0802f1cb73a80b08482832c2b269ac8485d5c1a..8d2870c780c4c253f6570c7ef73f6e7c2ccc46ad 100644 +index e0802f1cb73a80b08482832c2b269ac8485d5c1a..945a0317e9e49a159a1f42882a0a267a2141e86d 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -335,7 +335,10 @@ public class ServerEntity { @@ -29,12 +29,12 @@ index e0802f1cb73a80b08482832c2b269ac8485d5c1a..8d2870c780c4c253f6570c7ef73f6e7c + // Paper start - prevent oversized data + final ItemStack sanitized = LivingEntity.sanitizeItemStack(itemstack.copy(), false); + list.add(Pair.of(enumitemslot, sanitized)); -+ // Paper end ++ // Paper end - prevent oversized data } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ffc999a3a398bc73fffa7a68805baa1da7504750..3de3e938195c79c65b7e11438ca92585aaccf529 100644 +index ffc999a3a398bc73fffa7a68805baa1da7504750..d1210e8cd501f0f3be92189d129f1d354ddb00cb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3188,7 +3188,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -45,7 +45,7 @@ index ffc999a3a398bc73fffa7a68805baa1da7504750..3de3e938195c79c65b7e11438ca92585 + // Paper start - prevent oversized data + ItemStack toSend = sanitizeItemStack(itemstack1, true); + list.add(Pair.of(enumitemslot, toSend)); -+ // Paper end ++ // Paper end - prevent oversized data switch (enumitemslot.getType()) { case HAND: this.setLastHandItem(enumitemslot, itemstack1); @@ -79,7 +79,7 @@ index ffc999a3a398bc73fffa7a68805baa1da7504750..3de3e938195c79c65b7e11438ca92585 + } + return copy; + } -+ // Paper end ++ // Paper end - prevent oversized data + private ItemStack getLastArmorItem(EquipmentSlot slot) { return (ItemStack) this.lastArmorItemStacks.get(slot.getIndex()); diff --git a/patches/server/0703-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0703-Hide-unnecessary-itemmeta-from-clients.patch index 2279e31033..633b91c07d 100644 --- a/patches/server/0703-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0703-Hide-unnecessary-itemmeta-from-clients.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Hide unnecessary itemmeta from clients diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 8d2870c780c4c253f6570c7ef73f6e7c2ccc46ad..0cbb5dd17c5b37ad90ce11a31b64470722026d06 100644 +index 945a0317e9e49a159a1f42882a0a267a2141e86d..e9fd9590e90e58fd4c31985a704a4511b2663096 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -337,7 +337,7 @@ public class ServerEntity { @@ -13,12 +13,12 @@ index 8d2870c780c4c253f6570c7ef73f6e7c2ccc46ad..0cbb5dd17c5b37ad90ce11a31b644707 // Paper start - prevent oversized data final ItemStack sanitized = LivingEntity.sanitizeItemStack(itemstack.copy(), false); - list.add(Pair.of(enumitemslot, sanitized)); -+ list.add(Pair.of(enumitemslot, ((LivingEntity) this.entity).stripMeta(sanitized, false))); // Paper - remove unnecessary item meta - // Paper end ++ list.add(Pair.of(enumitemslot, ((LivingEntity) this.entity).stripMeta(sanitized, false))); // Paper - Hide unnecessary item meta + // Paper end - prevent oversized data } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 648530ce3183362ed71cbd2de534471da65ab787..1e519cdd673a4d4beb53ae84822e7b85c25a5e97 100644 +index 648530ce3183362ed71cbd2de534471da65ab787..bfbbb0f6e73e9d59e73944b77e08802132f2a739 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2566,8 +2566,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -27,13 +27,13 @@ index 648530ce3183362ed71cbd2de534471da65ab787..1e519cdd673a4d4beb53ae84822e7b85 // SPIGOT-7136 - Allays - if (entity instanceof Allay) { - ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); -+ if (entity instanceof Allay allay) { // Paper -+ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta ++ if (entity instanceof Allay allay) { // Paper - Hide unnecessary item meta ++ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - Hide unnecessary item meta ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote(); } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3de3e938195c79c65b7e11438ca92585aaccf529..cf91a4b9d2aab2ed32d7d53e5d3bd97838b7a8a4 100644 +index d1210e8cd501f0f3be92189d129f1d354ddb00cb..1a16dc3ac00c2756f1ea7154c38345393f3d5a96 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3190,7 +3190,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -41,15 +41,15 @@ index 3de3e938195c79c65b7e11438ca92585aaccf529..cf91a4b9d2aab2ed32d7d53e5d3bd978 // Paper start - prevent oversized data ItemStack toSend = sanitizeItemStack(itemstack1, true); - list.add(Pair.of(enumitemslot, toSend)); -+ list.add(Pair.of(enumitemslot, stripMeta(toSend, toSend == itemstack1))); // Paper - hide unnecessary item meta - // Paper end ++ list.add(Pair.of(enumitemslot, stripMeta(toSend, toSend == itemstack1))); // Paper - Hide unnecessary item meta + // Paper end - prevent oversized data switch (enumitemslot.getType()) { case HAND: @@ -3204,6 +3204,77 @@ public abstract class LivingEntity extends Entity implements Attackable { ((ServerLevel) this.level()).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list)); } -+ // Paper start - hide unnecessary item meta ++ // Paper start - Hide unnecessary item meta + public ItemStack stripMeta(final ItemStack itemStack, final boolean copyItemStack) { + if (itemStack.isEmpty() || (!itemStack.hasTag() && itemStack.getCount() < 2)) { + return itemStack; @@ -118,7 +118,7 @@ index 3de3e938195c79c65b7e11438ca92585aaccf529..cf91a4b9d2aab2ed32d7d53e5d3bd978 + + return copy; + } -+ // Paper end ++ // Paper end - Hide unnecessary item meta + // Paper start - prevent oversized data public static ItemStack sanitizeItemStack(final ItemStack itemStack, final boolean copyItemStack) { diff --git a/patches/server/0704-Fix-Spigot-growth-modifiers.patch b/patches/server/0704-Fix-Spigot-growth-modifiers.patch index 08d4226379..9add019b72 100644 --- a/patches/server/0704-Fix-Spigot-growth-modifiers.patch +++ b/patches/server/0704-Fix-Spigot-growth-modifiers.patch @@ -13,45 +13,46 @@ Co-authored-by: Noah van der Aa Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java -index 95f897b9ef73c880aff1cfe35fe490683badfd44..54916c80720f219bf747250a2ff9a875f180c7a2 100644 +index 95f897b9ef73c880aff1cfe35fe490683badfd44..788d8a04398482fdfd0fe89e519b2a6c57410ec3 100644 --- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java -@@ -51,9 +51,17 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl +@@ -51,9 +51,18 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl return to.setValue(BERRIES, from.getValue(BERRIES)); } ++ // Paper start - Fix Spigot growth modifiers + @Override + protected BlockState getGrowIntoState(BlockState state, RandomSource random, @javax.annotation.Nullable Level level) { + final boolean value = random.nextFloat() < (level != null ? (0.11F * (level.spigotConfig.glowBerryModifier / 100.0F)) : 0.11F); + return (BlockState) super.getGrowIntoState(state, random).setValue(CaveVinesBlock.BERRIES, value); + } -+ // Paper end ++ // Paper end - Fix Spigot growth modifiers + @Override protected BlockState getGrowIntoState(BlockState state, RandomSource random) { - return super.getGrowIntoState(state, random).setValue(BERRIES, Boolean.valueOf(random.nextFloat() < 0.11F)); -+ // Paper start ++ // Paper start - Fix Spigot growth modifiers + return this.getGrowIntoState(state, random, null); } @Override diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java -index 76c12b34aac276fc9375135dac1c2018fdd7d756..9550ce8588c6aa3ba4cbbbb86912eae2b452eb01 100644 +index 76c12b34aac276fc9375135dac1c2018fdd7d756..a0b48e5270e2523fa7c7237d5cfef5a13a45a430 100644 --- a/src/main/java/net/minecraft/world/level/block/CropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java @@ -91,6 +91,10 @@ public class CropBlock extends BushBlock implements BonemealableBlock { modifier = world.spigotConfig.carrotModifier; } else if (this == Blocks.POTATOES) { modifier = world.spigotConfig.potatoModifier; -+ // Paper start ++ // Paper start - Fix Spigot growth modifiers + } else if (this == Blocks.TORCHFLOWER_CROP) { + modifier = world.spigotConfig.torchFlowerModifier; -+ // Paper end ++ // Paper end - Fix Spigot growth modifiers } else { modifier = world.spigotConfig.wheatModifier; } diff --git a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java -index b74e61064926a7c7fb03286651ea52c150f86107..4ebdc4918131a15a1c91b45e8ceb1392bca20a81 100644 +index b74e61064926a7c7fb03286651ea52c150f86107..30300ef3ec839dfa944c992ab50db4d3859bb02e 100644 --- a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +++ b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java @@ -60,12 +60,18 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements @@ -59,23 +60,23 @@ index b74e61064926a7c7fb03286651ea52c150f86107..4ebdc4918131a15a1c91b45e8ceb1392 if (this.canGrowInto(world.getBlockState(blockposition1))) { - org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, this.getGrowIntoState(state, world.random)); // CraftBukkit -+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, this.getGrowIntoState(state, world.random, world)); // CraftBukkit // Paper ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, this.getGrowIntoState(state, world.random, world)); // CraftBukkit // Paper - Fix Spigot growth modifiers } } } -+ // Paper start ++ // Paper start - Fix Spigot growth modifiers + protected BlockState getGrowIntoState(BlockState state, RandomSource random, @javax.annotation.Nullable Level level) { + return this.getGrowIntoState(state, random); + } -+ // Paper end ++ // Paper end - Fix Spigot growth modifiers + protected BlockState getGrowIntoState(BlockState state, RandomSource random) { return (BlockState) state.cycle(GrowingPlantHeadBlock.AGE); } diff --git a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java -index 3c0b0732cdea6c98c58c9639be3a6971575df85b..7ee8832820dd3f0c97fc68cab40d23f58ed21c31 100644 +index 3c0b0732cdea6c98c58c9639be3a6971575df85b..d5257272ac8b0cf36e9f92e32a4a4ae6782f770c 100644 --- a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java +++ b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java @@ -100,7 +100,7 @@ public class MangrovePropaguleBlock extends SaplingBlock implements SimpleWaterl @@ -83,12 +84,12 @@ index 3c0b0732cdea6c98c58c9639be3a6971575df85b..7ee8832820dd3f0c97fc68cab40d23f5 public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { if (!isHanging(state)) { - if (random.nextInt(7) == 0) { -+ if (random.nextFloat() < (world.spigotConfig.saplingModifier / (100.0F * 7))) { // Paper ++ if (random.nextFloat() < (world.spigotConfig.saplingModifier / (100.0F * 7))) { // Paper - Fix Spigot growth modifiers this.advanceTree(world, pos, state, random); } diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java -index c80a3ee02f3af146926a3611779fd0af298a8ac1..ba94ff948ccaddc16d3452306722759c115bb90a 100644 +index c80a3ee02f3af146926a3611779fd0af298a8ac1..73d9ad9e24727a81c5ff1645316aee003600c0cc 100644 --- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java @@ -119,7 +119,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl @@ -96,7 +97,7 @@ index c80a3ee02f3af146926a3611779fd0af298a8ac1..ba94ff948ccaddc16d3452306722759c public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { float f = CropBlock.getGrowthSpeed(this, world, pos); - boolean bl = random.nextInt((int)(25.0F / f) + 1) == 0; -+ boolean bl = random.nextFloat() < (world.spigotConfig.pitcherPlantModifier / (100.0F * (Math.floor(25.0F / f) + 1))); // Paper ++ boolean bl = random.nextFloat() < (world.spigotConfig.pitcherPlantModifier / (100.0F * (Math.floor(25.0F / f) + 1))); // Paper - Fix Spigot growth modifiers if (bl) { this.grow(world, state, pos, 1); } diff --git a/patches/server/0705-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0705-Prevent-ContainerOpenersCounter-openCount-from-going.patch index 62a65ff130..9dbace63bd 100644 --- a/patches/server/0705-Prevent-ContainerOpenersCounter-openCount-from-going.patch +++ b/patches/server/0705-Prevent-ContainerOpenersCounter-openCount-from-going.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Prevent ContainerOpenersCounter openCount from going negative diff --git a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java -index ba06184bad7e8ae55cb2d55f6196e8f990d2811d..3e4b3eecc788c564f81b7929bfab7d2fdb6e307d 100644 +index ba06184bad7e8ae55cb2d55f6196e8f990d2811d..7eccacb978f047a4774e58b11bc3f9ab3959b049 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java +++ b/src/main/java/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java @@ -64,6 +64,7 @@ public abstract class ContainerOpenersCounter { public void decrementOpeners(Player player, Level world, BlockPos pos, BlockState state) { int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added -+ if (this.openCount == 0) return; // Paper ++ if (this.openCount == 0) return; // Paper - Prevent ContainerOpenersCounter openCount from going negative int i = this.openCount--; // CraftBukkit start - Call redstone event diff --git a/patches/server/0706-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0706-Add-PlayerItemFrameChangeEvent.patch index c1cf489efd..e46cc3be4c 100644 --- a/patches/server/0706-Add-PlayerItemFrameChangeEvent.patch +++ b/patches/server/0706-Add-PlayerItemFrameChangeEvent.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add PlayerItemFrameChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -index 8289ea080aa297f75cdbc8d591d6efa6a0def0ea..63ef00eb6f93a471de1e9c2355099d9dd3a71dd9 100644 +index 8289ea080aa297f75cdbc8d591d6efa6a0def0ea..3ff1ae5ae705cd8d5c8529e1dcdd5ccaed908830 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -3,6 +3,7 @@ package net.minecraft.world.entity.decoration; import com.mojang.logging.LogUtils; import java.util.OptionalInt; import javax.annotation.Nullable; -+import io.papermc.paper.event.player.PlayerItemFrameChangeEvent; // Paper ++import io.papermc.paper.event.player.PlayerItemFrameChangeEvent; // Paper - Add PlayerItemFrameChangeEvent import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; @@ -20,13 +20,13 @@ index 8289ea080aa297f75cdbc8d591d6efa6a0def0ea..63ef00eb6f93a471de1e9c2355099d9d return true; } // CraftBukkit end -+ // Paper start - call PlayerItemFrameChangeEvent ++ // Paper start - Add PlayerItemFrameChangeEvent + if (source.getEntity() instanceof Player player) { + var event = new PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), this.getItem().asBukkitCopy(), PlayerItemFrameChangeEvent.ItemFrameChangeAction.REMOVE); + if (!event.callEvent()) return true; // return true here because you aren't cancelling the damage, just the change + this.setItem(ItemStack.fromBukkitCopy(event.getItemStack()), false); + } -+ // Paper end ++ // Paper end - Add PlayerItemFrameChangeEvent this.dropItem(source.getEntity(), false); this.gameEvent(GameEvent.BLOCK_CHANGE, source.getEntity()); this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F); @@ -35,26 +35,26 @@ index 8289ea080aa297f75cdbc8d591d6efa6a0def0ea..63ef00eb6f93a471de1e9c2355099d9d } - this.setItem(itemstack); -+ // Paper start - call PlayerItemFrameChangeEvent ++ // Paper start - Add PlayerItemFrameChangeEvent + PlayerItemFrameChangeEvent event = new PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), itemstack.asBukkitCopy(), PlayerItemFrameChangeEvent.ItemFrameChangeAction.PLACE); + if (!event.callEvent()) { + return InteractionResult.FAIL; + } + this.setItem(ItemStack.fromBukkitCopy(event.getItemStack())); -+ // Paper end ++ // Paper end - Add PlayerItemFrameChangeEvent this.gameEvent(GameEvent.BLOCK_CHANGE, player); if (!player.getAbilities().instabuild) { itemstack.shrink(1); } } } else { -+ // Paper start - call PlayerItemFrameChangeEvent ++ // Paper start - Add PlayerItemFrameChangeEvent + PlayerItemFrameChangeEvent event = new PlayerItemFrameChangeEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.ItemFrame) this.getBukkitEntity(), this.getItem().asBukkitCopy(), PlayerItemFrameChangeEvent.ItemFrameChangeAction.ROTATE); + if (!event.callEvent()) { + return InteractionResult.FAIL; + } + setItem(ItemStack.fromBukkitCopy(event.getItemStack()), false, false); -+ // Paper end ++ // Paper end - Add PlayerItemFrameChangeEvent this.playSound(this.getRotateItemSound(), 1.0F, 1.0F); this.setRotation(this.getRotation() + 1); this.gameEvent(GameEvent.BLOCK_CHANGE, player); diff --git a/patches/server/0707-Optimize-HashMapPalette.patch b/patches/server/0707-Optimize-HashMapPalette.patch index 9e2b26701e..a8cf001da1 100644 --- a/patches/server/0707-Optimize-HashMapPalette.patch +++ b/patches/server/0707-Optimize-HashMapPalette.patch @@ -24,7 +24,7 @@ to corrupted data. This is also something that Anti-Xray is currently relying on. diff --git a/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java b/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java -index 26e093243c70313b777483d9555fb1557443c9b8..7b7b614e5c3a30be89eeea2d25112fc9bcb3052c 100644 +index 26e093243c70313b777483d9555fb1557443c9b8..92c360f02ef6be77c6c8eee3226947468194ec23 100644 --- a/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java +++ b/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java @@ -20,7 +20,7 @@ public class HashMapPalette implements Palette { @@ -32,7 +32,7 @@ index 26e093243c70313b777483d9555fb1557443c9b8..7b7b614e5c3a30be89eeea2d25112fc9 public HashMapPalette(IdMap idList, int indexBits, PaletteResize listener) { - this(idList, indexBits, listener, CrudeIncrementalIntIdentityHashBiMap.create(1 << indexBits)); -+ this(idList, indexBits, listener, CrudeIncrementalIntIdentityHashBiMap.create((1 << indexBits) + 1)); // Paper - Avoid unnecessary resize operation in CrudeIncrementalIntIdentityHashBiMap ++ this(idList, indexBits, listener, CrudeIncrementalIntIdentityHashBiMap.create((1 << indexBits) + 1)); // Paper - Perf: Avoid unnecessary resize operation in CrudeIncrementalIntIdentityHashBiMap } private HashMapPalette(IdMap idList, int indexBits, PaletteResize listener, CrudeIncrementalIntIdentityHashBiMap map) { @@ -42,7 +42,7 @@ index 26e093243c70313b777483d9555fb1557443c9b8..7b7b614e5c3a30be89eeea2d25112fc9 if (i == -1) { - i = this.values.add(object); - if (i >= 1 << this.bits) { -+ // Paper start - Avoid unnecessary resize operation in CrudeIncrementalIntIdentityHashBiMap and optimize ++ // Paper start - Perf: Avoid unnecessary resize operation in CrudeIncrementalIntIdentityHashBiMap and optimize + // We use size() instead of the result from add(K) + // This avoids adding another object unnecessarily + // Without this change, + 2 would be required in the constructor @@ -51,7 +51,7 @@ index 26e093243c70313b777483d9555fb1557443c9b8..7b7b614e5c3a30be89eeea2d25112fc9 + } else { + i = this.values.add(object); } -+ // Paper end ++ // Paper end - Perf: Avoid unnecessary resize operation in CrudeIncrementalIntIdentityHashBiMap and optimize } return i; diff --git a/patches/server/0708-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0708-Allow-delegation-to-vanilla-chunk-gen.patch index d83e71ed44..474a8bb6f3 100644 --- a/patches/server/0708-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0708-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8f61efe32500ebe47e13d96fd96df646adb3dd5b..36a620d44140edac72e20b83a2cee2860e09deec 100644 +index 8f61efe32500ebe47e13d96fd96df646adb3dd5b..9f9492f0f5bc9c39f4c0021956e3240a466f3085 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2459,6 +2459,88 @@ public final class CraftServer implements Server { return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters } -+ // Paper start ++ // Paper start - Allow delegation to vanilla chunk gen + private static final List VANILLA_GEN_STATUSES = List.of( + net.minecraft.world.level.chunk.ChunkStatus.EMPTY, + net.minecraft.world.level.chunk.ChunkStatus.STRUCTURE_STARTS, @@ -92,13 +92,13 @@ index 8f61efe32500ebe47e13d96fd96df646adb3dd5b..36a620d44140edac72e20b83a2cee286 + // hooray! + return data; + } -+ // Paper end ++ // Paper end - Allow delegation to vanilla chunk gen + @Override public BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag... flags) { return new CraftBossBar(title, color, style, flags); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java -index 03eb35d5c67f125c44cf46595c93d124ac7892b8..f9f5fd5087a2e335384aa18b226b1f8d8a6748ee 100644 +index 03eb35d5c67f125c44cf46595c93d124ac7892b8..44a010590e830fd238cf6fdda443e28b72022e66 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java @@ -23,7 +23,7 @@ import org.bukkit.material.MaterialData; @@ -106,7 +106,7 @@ index 03eb35d5c67f125c44cf46595c93d124ac7892b8..f9f5fd5087a2e335384aa18b226b1f8d private final int minHeight; private final int maxHeight; - private final LevelChunkSection[] sections; -+ private LevelChunkSection[] sections; // Paper ++ private LevelChunkSection[] sections; // Paper - Allow delegation to vanilla chunk gen private final Registry biomes; private Set tiles; private final Set lights = new HashSet<>(); @@ -115,13 +115,13 @@ index 03eb35d5c67f125c44cf46595c93d124ac7892b8..f9f5fd5087a2e335384aa18b226b1f8d } - Set getLights() { -+ public Set getLights() { // Paper ++ public Set getLights() { // Paper - Allow delegation to vanilla chunk gen return this.lights; } + -+ // Paper start ++ // Paper start - Allow delegation to vanilla chunk gen + public void setRawChunkData(LevelChunkSection[] sections) { + this.sections = sections; + } -+ // Paper end ++ // Paper end - Allow delegation to vanilla chunk gen } diff --git a/patches/server/0711-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0711-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch index c92ed9b709..e5b19cc588 100644 --- a/patches/server/0711-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch +++ b/patches/server/0711-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 6dc7e23e96aaffb912611a9dbd41459cb8489056..b6716f2b0037d12fb9956d7d1d0fab9b86cf4433 100644 +index 6dc7e23e96aaffb912611a9dbd41459cb8489056..fd702027e62eb38d51fb7c46ef268e9bb94e1e92 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -291,13 +291,17 @@ public class CraftChunk implements Chunk { @@ -20,14 +20,14 @@ index 6dc7e23e96aaffb912611a9dbd41459cb8489056..b6716f2b0037d12fb9956d7d1d0fab9b - data.put("block_states", ChunkSerializer.BLOCK_STATE_CODEC.encodeStart(NbtOps.INSTANCE, cs[i].getStates()).get().left().get()); - sectionBlockIDs[i] = ChunkSerializer.BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, data.getCompound("block_states")).get().left().get(); -+ // Paper start -+ sectionEmpty[i] = cs[i].hasOnlyAir(); // Paper - fix sectionEmpty array not being filled ++ // Paper start - Fix ChunkSnapshot#isSectionEmpty(int); and remove codec usage ++ sectionEmpty[i] = cs[i].hasOnlyAir(); // fix sectionEmpty array not being filled + if (!sectionEmpty[i]) { -+ sectionBlockIDs[i] = cs[i].getStates().copy(); // Paper - use copy instead of round tripping with codecs ++ sectionBlockIDs[i] = cs[i].getStates().copy(); // use copy instead of round tripping with codecs + } else { -+ sectionBlockIDs[i] = CraftChunk.emptyBlockIDs; // Paper - use cached instance for empty block sections ++ sectionBlockIDs[i] = CraftChunk.emptyBlockIDs; // use cached instance for empty block sections + } -+ // Paper end ++ // Paper end - Fix ChunkSnapshot#isSectionEmpty(int) LevelLightEngine lightengine = this.worldServer.getLightEngine(); DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(this.x, chunk.getSectionYFromSectionIndex(i), this.z)); // SPIGOT-7498: Convert section index @@ -37,7 +37,7 @@ index 6dc7e23e96aaffb912611a9dbd41459cb8489056..b6716f2b0037d12fb9956d7d1d0fab9b if (biome != null) { - data.put("biomes", biomeCodec.encodeStart(NbtOps.INSTANCE, cs[i].getBiomes()).get().left().get()); - biome[i] = biomeCodec.parse(NbtOps.INSTANCE, data.getCompound("biomes")).get().left().get(); -+ biome[i] = ((PalettedContainer>) cs[i].getBiomes()).copy(); // Paper - use copy instead of round tripping with codecs ++ biome[i] = ((PalettedContainer>) cs[i].getBiomes()).copy(); // Paper - Perf: use copy instead of round tripping with codecs } } diff --git a/patches/server/0712-Add-more-Campfire-API.patch b/patches/server/0712-Add-more-Campfire-API.patch index 537d2a264f..c211e5932f 100644 --- a/patches/server/0712-Add-more-Campfire-API.patch +++ b/patches/server/0712-Add-more-Campfire-API.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add more Campfire API diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17fff178a1d 100644 +index f776289eea00bd741ad55bb9bc338dd2c05c8b39..423550424e82ed74e0b38cbafd89649539cc1012 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java @@ -42,6 +42,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { public final int[] cookingProgress; public final int[] cookingTime; private final RecipeManager.CachedCheck quickCheck; -+ public final boolean[] stopCooking; // Paper ++ public final boolean[] stopCooking; // Paper - Add more Campfire API public CampfireBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.CAMPFIRE, pos, state); @@ -20,7 +20,7 @@ index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17f this.cookingProgress = new int[4]; this.cookingTime = new int[4]; this.quickCheck = RecipeManager.createCheck(RecipeType.CAMPFIRE_COOKING); -+ this.stopCooking = new boolean[4]; // Paper ++ this.stopCooking = new boolean[4]; // Paper - Add more Campfire API } public static void cookTick(Level world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) { @@ -28,9 +28,9 @@ index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17f if (!itemstack.isEmpty()) { flag = true; -+ if (!campfire.stopCooking[i]) { // Paper ++ if (!campfire.stopCooking[i]) { // Paper - Add more Campfire API int j = campfire.cookingProgress[i]++; -+ } // Paper ++ } // Paper - Add more Campfire API if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack}); @@ -38,7 +38,7 @@ index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17f System.arraycopy(aint, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, aint.length)); } -+ // Paper start ++ // Paper start - Add more Campfire API + if (nbt.contains("Paper.StopCooking", org.bukkit.craftbukkit.util.CraftMagicNumbers.NBT.TAG_BYTE_ARRAY)) { + byte[] abyte = nbt.getByteArray("Paper.StopCooking"); + boolean[] cookingState = new boolean[4]; @@ -47,7 +47,7 @@ index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17f + } + System.arraycopy(cookingState, 0, this.stopCooking, 0, Math.min(this.stopCooking.length, abyte.length)); + } -+ // Paper end ++ // Paper end - Add more Campfire API } @Override @@ -55,13 +55,13 @@ index f776289eea00bd741ad55bb9bc338dd2c05c8b39..18d3cb828f85e17ec27dbb5b33c6f17f ContainerHelper.saveAllItems(nbt, this.items, true); nbt.putIntArray("CookingTimes", this.cookingProgress); nbt.putIntArray("CookingTotalTimes", this.cookingTime); -+ // Paper start ++ // Paper start - Add more Campfire API + byte[] cookingState = new byte[4]; + for (int index = 0; index < cookingState.length; index++) { + cookingState[index] = (byte) (this.stopCooking[index] ? 1 : 0); + } + nbt.putByteArray("Paper.StopCooking", cookingState); -+ // Paper end ++ // Paper end - Add more Campfire API } @Override diff --git a/patches/server/0713-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0713-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch index e813969283..118bc88750 100644 --- a/patches/server/0713-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch +++ b/patches/server/0713-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch @@ -8,7 +8,7 @@ This ensures at least a valid version of the chunk exists on disk, even if outdated diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 98c8b676fc5b2add44d6ddf5d32f85bc07ea22cb..84b2fd9db39e0cdf3e1cbe6444579f7ca839bc45 100644 +index 98c8b676fc5b2add44d6ddf5d32f85bc07ea22cb..83966430240d375e7618e13c75676d510a222c37 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -1003,6 +1003,9 @@ public class RegionFile implements AutoCloseable { @@ -41,13 +41,13 @@ index 98c8b676fc5b2add44d6ddf5d32f85bc07ea22cb..84b2fd9db39e0cdf3e1cbe6444579f7c + } + super.write(b, off, len); + } -+ // Paper end ++ // Paper end - don't write garbage data to disk if writing serialization fails + public void close() throws IOException { ByteBuffer bytebuffer = ByteBuffer.wrap(this.buf, 0, this.count); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index a2794ec3d846136da64b6888d846587499a5f635..6eaeb2db0da59611501f2b1a63b5b48816a0ba48 100644 +index a2794ec3d846136da64b6888d846587499a5f635..6bec4549fbcfb68a053300451e25babf8ff38e99 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -342,10 +342,17 @@ public class RegionFileStorage implements AutoCloseable { @@ -77,7 +77,7 @@ index a2794ec3d846136da64b6888d846587499a5f635..6eaeb2db0da59611501f2b1a63b5b488 - if (dataoutputstream != null) { - dataoutputstream.close(); - } -+ // Paper - move into try block to only write if successfully serialized ++ // Paper - don't write garbage data to disk if writing serialization fails; move into try block to only write if successfully serialized } // Paper start return; @@ -86,12 +86,12 @@ index a2794ec3d846136da64b6888d846587499a5f635..6eaeb2db0da59611501f2b1a63b5b488 } + -+ // Paper start ++ // Paper start - don't write garbage data to disk if writing serialization fails + public static final class RegionFileSizeException extends RuntimeException { + + public RegionFileSizeException(String message) { + super(message); + } + } -+ // Paper end ++ // Paper end - don't write garbage data to disk if writing serialization fails } diff --git a/patches/server/0714-Fix-tripwire-state-inconsistency.patch b/patches/server/0714-Fix-tripwire-state-inconsistency.patch index 4433ab45c4..93bece80f7 100644 --- a/patches/server/0714-Fix-tripwire-state-inconsistency.patch +++ b/patches/server/0714-Fix-tripwire-state-inconsistency.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix tripwire state inconsistency This patch prevents updating and re-setting the tripwire when being removed in certain conditions diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -index bbb7d1b03c78758d608e89129aacec151242831c..1a0c5fb62e80681604110e95c1ae7b3684c21946 100644 +index bbb7d1b03c78758d608e89129aacec151242831c..634a8d25fede36f848cf621bdada71eb4b32c67e 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java @@ -87,7 +87,7 @@ public class TripWireBlock extends Block { @@ -14,7 +14,7 @@ index bbb7d1b03c78758d608e89129aacec151242831c..1a0c5fb62e80681604110e95c1ae7b36 public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { if (!moved && !state.is(newState.getBlock())) { - this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true)); -+ this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix state inconsistency ++ this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix tripwire state inconsistency } } @@ -22,12 +22,12 @@ index bbb7d1b03c78758d608e89129aacec151242831c..1a0c5fb62e80681604110e95c1ae7b36 } private void updateSource(Level world, BlockPos pos, BlockState state) { -+ // Paper start - fix state inconsistency ++ // Paper start - fix tripwire state inconsistency + this.updateSource(world, pos, state, false); + } + + private void updateSource(Level world, BlockPos pos, BlockState state, boolean beingRemoved) { -+ // Paper end ++ // Paper end - fix tripwire state inconsistency Direction[] aenumdirection = new Direction[]{Direction.SOUTH, Direction.WEST}; int i = aenumdirection.length; int j = 0; @@ -36,12 +36,12 @@ index bbb7d1b03c78758d608e89129aacec151242831c..1a0c5fb62e80681604110e95c1ae7b36 if (iblockdata1.is(this.hook)) { if (iblockdata1.getValue(TripWireHookBlock.FACING) == enumdirection.getOpposite()) { - TripWireHookBlock.calculateState(world, blockposition1, iblockdata1, false, true, k, state); -+ TripWireHookBlock.calculateState(world, blockposition1, iblockdata1, false, true, k, state, beingRemoved); // Paper - fix state inconsistency ++ TripWireHookBlock.calculateState(world, blockposition1, iblockdata1, false, true, k, state, beingRemoved); // Paper - fix tripwire state inconsistency } } else if (iblockdata1.is((Block) this)) { ++k; diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..a3cef4ac925d09ad8789a59b46df134cf25c282a 100644 +index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..0f6ea0adb4b99d934e1a3fcb92562dffb2a45f63 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java @@ -118,7 +118,13 @@ public class TripWireHookBlock extends Block { @@ -50,12 +50,12 @@ index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..a3cef4ac925d09ad8789a59b46df134c - public static void calculateState(Level world, BlockPos pos, BlockState state, boolean flag, boolean flag1, int i, @Nullable BlockState iblockdata1) { + public static void calculateState(Level world, BlockPos pos, BlockState state, boolean beingRemoved, boolean flag1, int i, @Nullable BlockState iblockdata1) { -+ // Paper start - fix tripwire inconsistency ++ // Paper start - fix tripwire state inconsistency + calculateState(world, pos, state, beingRemoved, flag1, i, iblockdata1, false); + } + + public static void calculateState(Level world, BlockPos pos, BlockState state, boolean beingRemoved, boolean flag1, int i, @Nullable BlockState iblockdata1, boolean tripWireBeingRemoved) { -+ // Paper end ++ // Paper end - fix tripwire state inconsistency Optional optional = state.getOptionalValue(TripWireHookBlock.FACING); if (optional.isPresent()) { @@ -64,7 +64,7 @@ index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..a3cef4ac925d09ad8789a59b46df134c boolean flag3 = (Boolean) state.getOptionalValue(TripWireHookBlock.POWERED).orElse(false); Block block = state.getBlock(); - boolean flag4 = !flag; -+ boolean flag4 = !beingRemoved; // Paper ++ boolean flag4 = !beingRemoved; // Paper - fix tripwire state inconsistency boolean flag5 = false; int j = 0; BlockState[] aiblockdata = new BlockState[42]; @@ -72,7 +72,7 @@ index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..a3cef4ac925d09ad8789a59b46df134c boolean flag7 = (Boolean) iblockdata2.getValue(TripWireBlock.POWERED); flag5 |= flag6 && flag7; -+ if (k != i || !tripWireBeingRemoved || !flag6) // Paper - don't update the tripwire again if being removed and not disarmed ++ if (k != i || !tripWireBeingRemoved || !flag6) // Paper - fix tripwire state inconsistency; don't update the tripwire again if being removed and not disarmed aiblockdata[k] = iblockdata2; if (k == i) { world.scheduleTick(pos, block, 10); @@ -81,7 +81,7 @@ index 02b62ac13d4968f80cb0ae3702755d0f1d95e692..a3cef4ac925d09ad8789a59b46df134c TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3); - if (!flag) { -+ if (!beingRemoved) { // Paper ++ if (!beingRemoved) { // Paper - fix tripwire state inconsistency if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); if (flag1) { diff --git a/patches/server/0715-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0715-Forward-CraftEntity-in-teleport-command.patch index 0133abe04e..ca6fe40d41 100644 --- a/patches/server/0715-Forward-CraftEntity-in-teleport-command.patch +++ b/patches/server/0715-Forward-CraftEntity-in-teleport-command.patch @@ -5,20 +5,20 @@ Subject: [PATCH] Forward CraftEntity in teleport command diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 519e3f0e376198fb399819f4587ccf935b93ea1a..4ffd551e6ea540cff14eaba0e95ed2c7c0bca513 100644 +index 519e3f0e376198fb399819f4587ccf935b93ea1a..449601d6a8e89ae4f225407d7e00efedbe6eb6c9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3531,6 +3531,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public void restoreFrom(Entity original) { -+ // Paper start ++ // Paper start - Forward CraftEntity in teleport command + CraftEntity bukkitEntity = original.bukkitEntity; + if (bukkitEntity != null) { + bukkitEntity.setHandle(this); + this.bukkitEntity = bukkitEntity; + } -+ // Paper end ++ // Paper end - Forward CraftEntity in teleport command CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag()); nbttagcompound.remove("Dimension"); @@ -30,7 +30,7 @@ index 519e3f0e376198fb399819f4587ccf935b93ea1a..4ffd551e6ea540cff14eaba0e95ed2c7 - this.getBukkitEntity().setHandle(entity); - entity.bukkitEntity = this.getBukkitEntity(); - // CraftBukkit end -+ // // CraftBukkit start - Forward the CraftEntity to the new entity // Paper - moved to Entity#restoreFrom ++ // // CraftBukkit start - Forward the CraftEntity to the new entity // Paper - Forward CraftEntity in teleport command; moved to Entity#restoreFrom + // this.getBukkitEntity().setHandle(entity); + // entity.bukkitEntity = this.getBukkitEntity(); + // // CraftBukkit end diff --git a/patches/server/0719-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0719-Fix-entity-type-tags-suggestions-in-selectors.patch index 225dce154f..5c935836f8 100644 --- a/patches/server/0719-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0719-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -10,14 +10,14 @@ when if this was fixed on the client, that wouldn't be needed. Mojira Issue: https://bugs.mojang.com/browse/MC-235045 diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 79732086bc4cdbca8364d78eb60d68c758055966..82ca6267bca684a8f04ca37d40816686677a852a 100644 +index 79732086bc4cdbca8364d78eb60d68c758055966..e65d7980b7ebed60786bc31e2f8156fda3b59556 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java @@ -447,4 +447,20 @@ public class CommandSourceStack implements ExecutionCommandSource getSelectedEntities() { + if (io.papermc.paper.configuration.GlobalConfiguration.get().commands.fixTargetSelectorTagCompletion && this.source instanceof ServerPlayer player) { @@ -32,7 +32,7 @@ index 79732086bc4cdbca8364d78eb60d68c758055966..82ca6267bca684a8f04ca37d40816686 + } + return SharedSuggestionProvider.super.getSelectedEntities(); + } -+ // Paper end ++ // Paper end - tell clients to ask server for suggestions for EntityArguments } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java index bc0f9bf88de8f79f8e2aa2261d5a8bdc9dd1f53a..c2bd7eea15437f3526da37ce1c8642084a26406b 100644 @@ -60,7 +60,7 @@ index bc0f9bf88de8f79f8e2aa2261d5a8bdc9dd1f53a..c2bd7eea15437f3526da37ce1c864208 } diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a71726cee91fb406875a4540c9fb7c0ecf757294 100644 +index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..d93698fd814683d451a3c8e8bcbb9cd475c79515 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java @@ -128,7 +128,7 @@ public class EntityArgument implements ArgumentType { @@ -68,7 +68,7 @@ index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a71726cee91fb406875a4540c9fb7c0e stringreader.setCursor(suggestionsbuilder.getStart()); - EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2)); -+ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2), true); // Paper ++ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2), true); // Paper - tell clients to ask server for suggestions for EntityArguments try { argumentparserselector.parse(); @@ -77,7 +77,7 @@ index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a71726cee91fb406875a4540c9fb7c0e return argumentparserselector.fillSuggestions(suggestionsbuilder, (suggestionsbuilder1) -> { - Collection collection = icompletionprovider.getOnlinePlayerNames(); -+ // Paper start ++ // Paper start - tell clients to ask server for suggestions for EntityArguments + final Collection collection; + if (icompletionprovider instanceof CommandSourceStack commandSourceStack && commandSourceStack.getEntity() instanceof ServerPlayer sourcePlayer) { + collection = new java.util.ArrayList<>(); @@ -89,43 +89,43 @@ index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a71726cee91fb406875a4540c9fb7c0e + } else { + collection = icompletionprovider.getOnlinePlayerNames(); + } -+ // Paper end ++ // Paper end - tell clients to ask server for suggestions for EntityArguments Iterable iterable = this.playersOnly ? collection : Iterables.concat(collection, icompletionprovider.getSelectedEntities()); SharedSuggestionProvider.suggest((Iterable) iterable, suggestionsbuilder1); diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -index 3d897ec6920eff6176ddac9f0442a997b9ef14fd..489b2ba7d4ef9c52a60db0c7e3fdd36226f5672d 100644 +index 3d897ec6920eff6176ddac9f0442a997b9ef14fd..abaf1ea340c69c8bee80e64567b44b5ce66d5fa3 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java @@ -113,12 +113,19 @@ public class EntitySelectorParser { private boolean hasScores; private boolean hasAdvancements; private boolean usesSelectors; -+ public boolean parsingEntityArgumentSuggestions; // Paper - track when parsing EntityArgument suggestions ++ public boolean parsingEntityArgumentSuggestions; // Paper - tell clients to ask server for suggestions for EntityArguments public EntitySelectorParser(StringReader reader) { this(reader, true); } public EntitySelectorParser(StringReader reader, boolean atAllowed) { -+ // Paper start ++ // Paper start - tell clients to ask server for suggestions for EntityArguments + this(reader, atAllowed, false); + } + public EntitySelectorParser(StringReader reader, boolean atAllowed, boolean parsingEntityArgumentSuggestions) { + this.parsingEntityArgumentSuggestions = parsingEntityArgumentSuggestions; -+ // Paper end ++ // Paper end - tell clients to ask server for suggestions for EntityArguments this.distance = MinMaxBounds.Doubles.ANY; this.level = MinMaxBounds.Ints.ANY; this.rotX = WrappedMinMaxBounds.ANY; diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -index 7863833c9a761a2b9364ff572ec909ec5a4538c3..0b36bd0a02082e8ec0ebef537656547ee3f1d748 100644 +index 7863833c9a761a2b9364ff572ec909ec5a4538c3..36e26929306c04af7a44012fd7fc9902027e9ea2 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java @@ -69,6 +69,19 @@ public class EntitySelectorOptions { public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> { return Component.translatableEscape("argument.entity.options.type.invalid", entity); }); -+ // Paper start ++ // Paper start - tell clients to ask server for suggestions for EntityArguments + public static final DynamicCommandExceptionType ERROR_ENTITY_TAG_INVALID = new DynamicCommandExceptionType((object) -> { + return io.papermc.paper.adventure.PaperAdventure + .asVanilla(net.kyori.adventure.text.Component @@ -137,7 +137,7 @@ index 7863833c9a761a2b9364ff572ec909ec5a4538c3..0b36bd0a02082e8ec0ebef537656547e + ) + ); + }); -+ // Paper end ++ // Paper end - tell clients to ask server for suggestions for EntityArguments private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate condition, Component description) { OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description)); @@ -145,12 +145,12 @@ index 7863833c9a761a2b9364ff572ec909ec5a4538c3..0b36bd0a02082e8ec0ebef537656547e if (reader.isTag()) { TagKey> tagKey = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.read(reader.getReader())); -+ // Paper start - throw error if invalid entity tag (only on suggestions to keep cmd success behavior) ++ // Paper start - tell clients to ask server for suggestions for EntityArguments; throw error if invalid entity tag (only on suggestions to keep cmd success behavior) + if (reader.parsingEntityArgumentSuggestions && io.papermc.paper.configuration.GlobalConfiguration.get().commands.fixTargetSelectorTagCompletion && net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getTag(tagKey).isEmpty()) { + reader.getReader().setCursor(i); + throw ERROR_ENTITY_TAG_INVALID.createWithContext(reader.getReader(), tagKey); + } -+ // Paper end ++ // Paper end - tell clients to ask server for suggestions for EntityArguments reader.addPredicate((entity) -> { return entity.getType().is(tagKey) != bl; }); diff --git a/patches/server/0720-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0720-Configurable-max-block-light-for-monster-spawning.patch index c7f4c136fd..deae03d87c 100644 --- a/patches/server/0720-Configurable-max-block-light-for-monster-spawning.patch +++ b/patches/server/0720-Configurable-max-block-light-for-monster-spawning.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable max block light for monster spawning diff --git a/src/main/java/net/minecraft/world/entity/monster/Monster.java b/src/main/java/net/minecraft/world/entity/monster/Monster.java -index 036d79baf372f4900681fee366bcd91c99474e5f..127a344f35e194fc7b1a0783c75291fab929fe19 100644 +index 036d79baf372f4900681fee366bcd91c99474e5f..fbca4d6bc84e8be359b989ef089469838f896910 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Monster.java +++ b/src/main/java/net/minecraft/world/entity/monster/Monster.java @@ -93,7 +93,7 @@ public abstract class Monster extends PathfinderMob implements Enemy { @@ -13,7 +13,7 @@ index 036d79baf372f4900681fee366bcd91c99474e5f..127a344f35e194fc7b1a0783c75291fa } else { DimensionType dimensionType = world.dimensionType(); - int i = dimensionType.monsterSpawnBlockLightLimit(); -+ int i = world.getLevel().paperConfig().entities.spawning.monsterSpawnMaxLightLevel.or(dimensionType.monsterSpawnBlockLightLimit()); // Paper ++ int i = world.getLevel().paperConfig().entities.spawning.monsterSpawnMaxLightLevel.or(dimensionType.monsterSpawnBlockLightLimit()); // Paper - Configurable max block light for monster spawning if (i < 15 && world.getBrightness(LightLayer.BLOCK, pos) > i) { return false; } else { diff --git a/patches/server/0721-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0721-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch index 8e2d63bd62..b1fd3d5079 100644 --- a/patches/server/0721-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch +++ b/patches/server/0721-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch @@ -27,7 +27,7 @@ Co-authored-by: Zach Brown Co-authored-by: Madeline Miller diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index cda90023ad662e8875365eac98ec69f476dcb42d..b9025fcc6a4db9533cdc42034c9e77323d0785fa 100644 +index cda90023ad662e8875365eac98ec69f476dcb42d..470495903a9f0f8b925ddc4fb3d8213c556fccd9 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -159,15 +159,15 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -43,7 +43,7 @@ index cda90023ad662e8875365eac98ec69f476dcb42d..b9025fcc6a4db9533cdc42034c9e7732 - return; - } - } -+ // if (!this.isSticky) { // Paper - Move further down ++ // if (!this.isSticky) { // Paper - Fix sticky pistons and BlockPistonRetractEvent; Move further down + // org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()); + // BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.of(), CraftBlock.notchToBlockFace(enumdirection)); + // world.getCraftServer().getPluginManager().callEvent(event); @@ -59,13 +59,13 @@ index cda90023ad662e8875365eac98ec69f476dcb42d..b9025fcc6a4db9533cdc42034c9e7732 BlockState iblockdata2 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); -+ // Paper start - Move empty piston retract call to fix multiple event fires ++ // Paper start - Fix sticky pistons and BlockPistonRetractEvent; Move empty piston retract call to fix multiple event fires + if (!this.isSticky) { + if (!new BlockPistonRetractEvent(CraftBlock.at(world, pos), java.util.Collections.emptyList(), CraftBlock.notchToBlockFace(enumdirection)).callEvent()) { + return false; + } + } -+ // Paper end ++ // Paper end - Fix sticky pistons and BlockPistonRetractEvent world.setBlock(pos, iblockdata2, 20); world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata2, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); // Paper - diff on change world.blockUpdated(pos, iblockdata2.getBlock()); @@ -73,13 +73,13 @@ index cda90023ad662e8875365eac98ec69f476dcb42d..b9025fcc6a4db9533cdc42034c9e7732 if (type == 1 && !iblockdata3.isAir() && PistonBaseBlock.isPushable(iblockdata3, world, blockposition1, enumdirection.getOpposite(), false, enumdirection) && (iblockdata3.getPistonPushReaction() == PushReaction.NORMAL || iblockdata3.is(Blocks.PISTON) || iblockdata3.is(Blocks.STICKY_PISTON))) { this.moveBlocks(world, pos, enumdirection, false); } else { -+ // Paper start - fire BlockPistonRetractEvent for sticky pistons retracting nothing (air) ++ // Paper start - Fix sticky pistons and BlockPistonRetractEvent; fire BlockPistonRetractEvent for sticky pistons retracting nothing (air) + if (type == TRIGGER_CONTRACT && iblockdata2.isAir()) { + if (!new BlockPistonRetractEvent(CraftBlock.at(world, pos), java.util.Collections.emptyList(), CraftBlock.notchToBlockFace(enumdirection)).callEvent()) { + return false; + } + } -+ // Paper end ++ // Paper end - Fix sticky pistons and BlockPistonRetractEvent world.removeBlock(pos.relative(enumdirection), false); } } diff --git a/patches/server/0724-Fix-bees-aging-inside-hives.patch b/patches/server/0724-Fix-bees-aging-inside-hives.patch index 6adfc7fc04..275679e177 100644 --- a/patches/server/0724-Fix-bees-aging-inside-hives.patch +++ b/patches/server/0724-Fix-bees-aging-inside-hives.patch @@ -7,7 +7,7 @@ Fixes bees incorrectly being aged up due to upstream's resetting the ticks inside hive on a failed release diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index 8c4fba5369e5e25f144291c43e086b7417b013aa..dfd364ac4b7551a13c4c6c100b5e62c0dfb10595 100644 +index 8c4fba5369e5e25f144291c43e086b7417b013aa..3ba04d615fae9748c144b3dc7e7442be2e5a659f 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java @@ -328,7 +328,7 @@ public class BeehiveBlockEntity extends BlockEntity { @@ -15,7 +15,7 @@ index 8c4fba5369e5e25f144291c43e086b7417b013aa..dfd364ac4b7551a13c4c6c100b5e62c0 for (Iterator iterator = bees.iterator(); iterator.hasNext(); ++tileentitybeehive_hivebee.ticksInHive) { tileentitybeehive_hivebee = (BeehiveBlockEntity.BeeData) iterator.next(); - if (tileentitybeehive_hivebee.ticksInHive > tileentitybeehive_hivebee.minOccupationTicks) { -+ if (tileentitybeehive_hivebee.exitTickCounter > tileentitybeehive_hivebee.minOccupationTicks) { // Paper - use exitTickCounter ++ if (tileentitybeehive_hivebee.exitTickCounter > tileentitybeehive_hivebee.minOccupationTicks) { // Paper - Fix bees aging inside hives; use exitTickCounter BeehiveBlockEntity.BeeReleaseStatus tileentitybeehive_releasestatus = tileentitybeehive_hivebee.entityData.getBoolean("HasNectar") ? BeehiveBlockEntity.BeeReleaseStatus.HONEY_DELIVERED : BeehiveBlockEntity.BeeReleaseStatus.BEE_RELEASED; if (BeehiveBlockEntity.releaseOccupant(world, pos, state, tileentitybeehive_hivebee, (List) null, tileentitybeehive_releasestatus, flowerPos)) { @@ -24,11 +24,11 @@ index 8c4fba5369e5e25f144291c43e086b7417b013aa..dfd364ac4b7551a13c4c6c100b5e62c0 // CraftBukkit start } else { - tileentitybeehive_hivebee.ticksInHive = tileentitybeehive_hivebee.minOccupationTicks / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable -+ tileentitybeehive_hivebee.exitTickCounter = tileentitybeehive_hivebee.minOccupationTicks / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable // Paper - use exitTickCounter to keep actual bee life ++ tileentitybeehive_hivebee.exitTickCounter = tileentitybeehive_hivebee.minOccupationTicks / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable // Paper - Fix bees aging inside hives; use exitTickCounter to keep actual bee life // CraftBukkit end } } -+ tileentitybeehive_hivebee.exitTickCounter++; // Paper ++ tileentitybeehive_hivebee.exitTickCounter++; // Paper - Fix bees aging inside hives } if (flag) { @@ -36,14 +36,14 @@ index 8c4fba5369e5e25f144291c43e086b7417b013aa..dfd364ac4b7551a13c4c6c100b5e62c0 final CompoundTag entityData; int ticksInHive; -+ int exitTickCounter; // Paper - separate counter for checking if bee should exit to reduce exit attempts ++ int exitTickCounter; // Paper - Fix bees aging inside hives; separate counter for checking if bee should exit to reduce exit attempts final int minOccupationTicks; BeeData(CompoundTag entityData, int ticksInHive, int minOccupationTicks) { BeehiveBlockEntity.removeIgnoredBeeTags(entityData); this.entityData = entityData; this.ticksInHive = ticksInHive; -+ this.exitTickCounter = ticksInHive; // Paper ++ this.exitTickCounter = ticksInHive; // Paper - Fix bees aging inside hives this.minOccupationTicks = minOccupationTicks; } } diff --git a/patches/server/0726-Validate-usernames.patch b/patches/server/0726-Validate-usernames.patch index f683c7e5ed..0c5d204b61 100644 --- a/patches/server/0726-Validate-usernames.patch +++ b/patches/server/0726-Validate-usernames.patch @@ -39,7 +39,7 @@ index 8f0d1e9e8a191a2049f3ad2d9b4ffdbd15c45d9f..1038bdb761c4b413cb92e08aa7ef634b } } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index bce494bb7bc1ce20809ac7d355f04aa7aad78308..7a984f531d3ebb6e055f07227b2ef8247fb3a842 100644 +index bce494bb7bc1ce20809ac7d355f04aa7aad78308..6ab0c3116a4238a4c5369cc33452fed594149ea4 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -2340,9 +2340,23 @@ public abstract class Player extends LivingEntity { @@ -49,7 +49,7 @@ index bce494bb7bc1ce20809ac7d355f04aa7aad78308..7a984f531d3ebb6e055f07227b2ef824 - return name.length() > 16 ? false : name.chars().filter((i) -> { - return i <= 32 || i >= 127; - }).findAny().isEmpty(); -+ // Paper start ++ // Paper start - username validation overriding + if (name == null || name.isEmpty() || name.length() > 16) { + return false; + } @@ -65,7 +65,7 @@ index bce494bb7bc1ce20809ac7d355f04aa7aad78308..7a984f531d3ebb6e055f07227b2ef824 + } + + return true; -+ // Paper end ++ // Paper end - username validation overriding } public static float getPickRange(boolean creative) { diff --git a/patches/server/0727-Make-water-animal-spawn-height-configurable.patch b/patches/server/0727-Make-water-animal-spawn-height-configurable.patch index 697ffe061e..e523ed36f4 100644 --- a/patches/server/0727-Make-water-animal-spawn-height-configurable.patch +++ b/patches/server/0727-Make-water-animal-spawn-height-configurable.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Make water animal spawn height configurable diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java -index 27624b080e025d943b9c99627568f7dd66165548..827912174ee08cd19249797d351887149b25c880 100644 +index 27624b080e025d943b9c99627568f7dd66165548..9b897cf53f4bb5d366e6ac88dbed93c59d8fe541 100644 --- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java @@ -73,6 +73,10 @@ public abstract class WaterAnimal extends PathfinderMob { public static boolean checkSurfaceWaterAnimalSpawnRules(EntityType type, LevelAccessor world, MobSpawnType reason, BlockPos pos, RandomSource random) { int i = world.getSeaLevel(); int j = i - 13; -+ // Paper start ++ // Paper start - Make water animal spawn height configurable + i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i); + j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j); -+ // Paper end ++ // Paper end - Make water animal spawn height configurable return pos.getY() >= j && pos.getY() <= i && world.getFluidState(pos.below()).is(FluidTags.WATER) && world.getBlockState(pos.above()).is(Blocks.WATER); } } diff --git a/patches/server/0728-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0728-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index eba8718684..32e655a2ae 100644 --- a/patches/server/0728-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0728-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 6873036e7d24a2b8e85ab7ae270eec63bd7e7b5b..ac4d96345c985284a1306055b164a74a483cb444 100644 +index 6873036e7d24a2b8e85ab7ae270eec63bd7e7b5b..70adb35d0f267666e44c61ac0578a12f107f65b7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -596,7 +596,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop players, ClientboundSetPlayerTeamPacket.Action operation) { + return new ClientboundSetPlayerTeamPacket(team.getName(), operation == ClientboundSetPlayerTeamPacket.Action.ADD ? 3 : 4, Optional.empty(), players); + } -+ // Paper end ++ // Paper end - Multiple Entries with Scoreboards + public ClientboundSetPlayerTeamPacket(FriendlyByteBuf buf) { this.name = buf.readUtf(); this.method = buf.readByte(); diff --git a/src/main/java/net/minecraft/server/ServerScoreboard.java b/src/main/java/net/minecraft/server/ServerScoreboard.java -index c4904b358fc2f493e6a9572a84b8110a927da208..5cc8173e845bf8d3414ac3347d25e1f6d0c65ce9 100644 +index c4904b358fc2f493e6a9572a84b8110a927da208..76d67d01388ecc1af6b43212e018edc678e84d72 100644 --- a/src/main/java/net/minecraft/server/ServerScoreboard.java +++ b/src/main/java/net/minecraft/server/ServerScoreboard.java @@ -104,6 +104,25 @@ public class ServerScoreboard extends Scoreboard { } } -+ // Paper start ++ // Paper start - Multiple Entries with Scoreboards + public boolean addPlayersToTeam(java.util.Collection players, PlayerTeam team) { + boolean anyAdded = false; + for (String playerName : players) { @@ -46,7 +46,7 @@ index c4904b358fc2f493e6a9572a84b8110a927da208..5cc8173e845bf8d3414ac3347d25e1f6 + return false; + } + } -+ // Paper end ++ // Paper end - Multiple Entries with Scoreboards + @Override public void removePlayerFromTeam(String scoreHolderName, PlayerTeam team) { @@ -55,7 +55,7 @@ index c4904b358fc2f493e6a9572a84b8110a927da208..5cc8173e845bf8d3414ac3347d25e1f6 this.setDirty(); } -+ // Paper start ++ // Paper start - Multiple Entries with Scoreboards + public void removePlayersFromTeam(java.util.Collection players, PlayerTeam team) { + for (String playerName : players) { + super.removePlayerFromTeam(playerName, team); @@ -64,20 +64,20 @@ index c4904b358fc2f493e6a9572a84b8110a927da208..5cc8173e845bf8d3414ac3347d25e1f6 + this.broadcastAll(ClientboundSetPlayerTeamPacket.createMultiplePlayerPacket(team, players, ClientboundSetPlayerTeamPacket.Action.REMOVE)); + this.setDirty(); + } -+ // Paper end ++ // Paper end - Multiple Entries with Scoreboards + @Override public void onObjectiveAdded(Objective objective) { super.onObjectiveAdded(objective); diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java -index 27219bf2f16aed64c78623d44c3cc84aa9f47065..fd86c1d43cccd036f60cb270b56fd33f95707720 100644 +index 27219bf2f16aed64c78623d44c3cc84aa9f47065..2b335c750ce5f9ccc2651a8701497ca9b8f46704 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -229,6 +229,21 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { scoreboard.board.addPlayerToTeam(entry, this.team); } -+ // Paper start ++ // Paper start - Multiple Entries with Scoreboards + @Override + public void addEntities(java.util.Collection entities) throws IllegalStateException, IllegalArgumentException { + this.addEntries(entities.stream().map(entity -> ((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandle().getScoreboardName()).toList()); @@ -90,7 +90,7 @@ index 27219bf2f16aed64c78623d44c3cc84aa9f47065..fd86c1d43cccd036f60cb270b56fd33f + + ((net.minecraft.server.ServerScoreboard) scoreboard.board).addPlayersToTeam(entries, this.team); + } -+ // Paper end ++ // Paper end - Multiple Entries with Scoreboards + @Override public boolean removePlayer(OfflinePlayer player) { @@ -99,7 +99,7 @@ index 27219bf2f16aed64c78623d44c3cc84aa9f47065..fd86c1d43cccd036f60cb270b56fd33f return true; } -+ // Paper start ++ // Paper start - Multiple Entries with Scoreboards + @Override + public boolean removeEntities(java.util.Collection entities) throws IllegalStateException, IllegalArgumentException { + return this.removeEntries(entities.stream().map(entity -> ((org.bukkit.craftbukkit.entity.CraftEntity) entity).getHandle().getScoreboardName()).toList()); @@ -119,7 +119,7 @@ index 27219bf2f16aed64c78623d44c3cc84aa9f47065..fd86c1d43cccd036f60cb270b56fd33f + + return false; + } -+ // Paper end ++ // Paper end - Multiple Entries with Scoreboards + @Override public boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException { diff --git a/patches/server/0732-Reset-placed-block-on-exception.patch b/patches/server/0732-Reset-placed-block-on-exception.patch index 308089d693..cfe724425f 100644 --- a/patches/server/0732-Reset-placed-block-on-exception.patch +++ b/patches/server/0732-Reset-placed-block-on-exception.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Reset placed block on exception diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index e68b7a1b03783e4f9de24c5ae8773fc359bd2d37..e581dc10f3c805f7f8b6e4c842092609e7e1a0f8 100644 +index e68b7a1b03783e4f9de24c5ae8773fc359bd2d37..daf093518f1daf598c858cfaf48357255a1fb0cf 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java @@ -80,6 +80,7 @@ public class BlockItem extends Item { if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) { blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); } -+ final org.bukkit.block.BlockState oldBlockstate = blockstate != null ? blockstate : org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); // Paper ++ final org.bukkit.block.BlockState oldBlockstate = blockstate != null ? blockstate : org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); // Paper - Reset placed block on exception // CraftBukkit end if (iblockdata == null) { @@ -20,7 +20,7 @@ index e68b7a1b03783e4f9de24c5ae8773fc359bd2d37..e581dc10f3c805f7f8b6e4c842092609 if (iblockdata1.is(iblockdata.getBlock())) { iblockdata1 = this.updateBlockStateFromTag(blockposition, world, itemstack, iblockdata1); -+ // Paper start - reset block on exception ++ // Paper start - Reset placed block on exception + try { this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1); + } catch (Exception e) { @@ -32,7 +32,7 @@ index e68b7a1b03783e4f9de24c5ae8773fc359bd2d37..e581dc10f3c805f7f8b6e4c842092609 + } + throw e; // Rethrow exception if not placed by a player + } -+ // Paper end ++ // Paper end - Reset placed block on exception iblockdata1.getBlock().setPlacedBy(world, blockposition, iblockdata1, entityhuman, itemstack); // CraftBukkit start if (blockstate != null) { diff --git a/patches/server/0733-Add-configurable-height-for-slime-spawn.patch b/patches/server/0733-Add-configurable-height-for-slime-spawn.patch index c105ef61b0..0f64c61861 100644 --- a/patches/server/0733-Add-configurable-height-for-slime-spawn.patch +++ b/patches/server/0733-Add-configurable-height-for-slime-spawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add configurable height for slime spawn diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 37724831ba9db2d0fb2e7756816e0355bc760815..cd964e5cded6a74cb9dcf27b4134f944764062cd 100644 +index 37724831ba9db2d0fb2e7756816e0355bc760815..0ce75b221241b412fe7d8873bdc4a49370b6410b 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java @@ -336,7 +336,11 @@ public class Slime extends Mob implements Enemy { @@ -17,7 +17,7 @@ index 37724831ba9db2d0fb2e7756816e0355bc760815..cd964e5cded6a74cb9dcf27b4134f944 + final double maxHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.maximum; + final double minHeightSwamp = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.surfaceBiome.minimum; + if (world.getBiome(pos).is(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS) && pos.getY() > minHeightSwamp && pos.getY() < maxHeightSwamp && random.nextFloat() < 0.5F && random.nextFloat() < world.getMoonBrightness() && world.getMaxLocalRawBrightness(pos) <= random.nextInt(8)) { -+ // Paper end ++ // Paper end - Replace rules for Height in Swamp Biome return checkMobSpawnRules(type, world, spawnReason, pos, random); } @@ -29,7 +29,7 @@ index 37724831ba9db2d0fb2e7756816e0355bc760815..cd964e5cded6a74cb9dcf27b4134f944 + // Paper start - Replace rules for Height in Slime Chunks + final double maxHeightSlimeChunk = world.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.slimeChunk.maximum; + if (random.nextInt(10) == 0 && flag && pos.getY() < maxHeightSlimeChunk) { -+ // Paper end ++ // Paper end - Replace rules for Height in Swamp Biome return checkMobSpawnRules(type, world, spawnReason, pos, random); } } diff --git a/patches/server/0734-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0734-Fix-xp-reward-for-baby-zombies.patch index ed685b8f6b..0ff008ba0c 100644 --- a/patches/server/0734-Fix-xp-reward-for-baby-zombies.patch +++ b/patches/server/0734-Fix-xp-reward-for-baby-zombies.patch @@ -9,7 +9,7 @@ so this resets it after each call to Zombie#getExperienceReward diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index b31f6b267693c409d58eee688a3b79a1cf14e391..753defa8f8b48d004a2a53b2fc322fd9c083d95e 100644 +index b31f6b267693c409d58eee688a3b79a1cf14e391..ab41bd0f1810207a83ed506d6d1aa0289508d09a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -175,11 +175,16 @@ public class Zombie extends Monster { @@ -22,11 +22,11 @@ index b31f6b267693c409d58eee688a3b79a1cf14e391..753defa8f8b48d004a2a53b2fc322fd9 } - return super.getExperienceReward(); -+ // Paper start - only change the XP reward for the calculations in the super method ++ // Paper start - store previous value to reset after calculating XP reward + int reward = super.getExperienceReward(); + this.xpReward = previousReward; + return reward; -+ // Paper end ++ // Paper end - store previous value to reset after calculating XP reward } @Override diff --git a/patches/server/0735-Multi-Block-Change-API-Implementation.patch b/patches/server/0735-Multi-Block-Change-API-Implementation.patch index 59ce227273..61988ad9d0 100644 --- a/patches/server/0735-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0735-Multi-Block-Change-API-Implementation.patch @@ -5,20 +5,20 @@ Subject: [PATCH] Multi Block Change API Implementation diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java -index f96d61bdeb556665d6e6e5023f9d77fd82204e89..e3f355c85eb7cc8c1683e3009502c10a5ed32daa 100644 +index f96d61bdeb556665d6e6e5023f9d77fd82204e89..ccdc2345465313991f065e1176b58fb7d5e8722f 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java @@ -59,6 +59,14 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet blockChanges) { + this.sectionPos = sectionPos; + this.positions = blockChanges.keySet().toShortArray(); + this.states = blockChanges.values().toArray(new BlockState[0]); + } -+ // Paper end ++ // Paper end - Multi Block Change API + @Override public void write(FriendlyByteBuf buf) { diff --git a/patches/server/0736-Fix-NotePlayEvent.patch b/patches/server/0736-Fix-NotePlayEvent.patch index 5385ce97b2..85437cdf17 100644 --- a/patches/server/0736-Fix-NotePlayEvent.patch +++ b/patches/server/0736-Fix-NotePlayEvent.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix NotePlayEvent public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum; diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index 43fbdca9422b679c210bc556e2d48ad37babbe8b..f32334f9e0f13a227bef8ffb135dda82b2ec39f2 100644 +index 43fbdca9422b679c210bc556e2d48ad37babbe8b..92a24cf02f15f3ab893eb9a793770d9819e4f600 100644 --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java @@ -93,11 +93,12 @@ public class NoteBlock extends Block { @@ -23,7 +23,7 @@ index 43fbdca9422b679c210bc556e2d48ad37babbe8b..f32334f9e0f13a227bef8ffb135dda82 + // return; + // } // CraftBukkit end -+ // Paper - TODO any way to cancel the game event? ++ // Paper - move NotePlayEvent call to fix instrument/note changes; TODO any way to cancel the game event? world.blockEvent(pos, this, 0, 0); world.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, pos); } @@ -34,12 +34,12 @@ index 43fbdca9422b679c210bc556e2d48ad37babbe8b..f32334f9e0f13a227bef8ffb135dda82 + // Paper start - move NotePlayEvent call to fix instrument/note changes + org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, blockpropertyinstrument, state.getValue(NOTE)); + if (event.isCancelled()) return false; -+ // Paper end ++ // Paper end - move NotePlayEvent call to fix instrument/note changes float f; if (blockpropertyinstrument.isTunable()) { - int k = (Integer) state.getValue(NoteBlock.NOTE); -+ int k = event.getNote().getId(); // Paper ++ int k = event.getNote().getId(); // Paper - move NotePlayEvent call to fix instrument/note changes f = NoteBlock.getPitchFromNote(k); world.addParticle(ParticleTypes.NOTE, (double) pos.getX() + 0.5D, (double) pos.getY() + 1.2D, (double) pos.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); @@ -48,7 +48,7 @@ index 43fbdca9422b679c210bc556e2d48ad37babbe8b..f32334f9e0f13a227bef8ffb135dda82 holder = Holder.direct(SoundEvent.createVariableRangeEvent(minecraftkey)); } else { - holder = blockpropertyinstrument.getSoundEvent(); -+ holder = org.bukkit.craftbukkit.block.data.CraftBlockData.toNMS(event.getInstrument(), NoteBlockInstrument.class).getSoundEvent(); // Paper ++ holder = org.bukkit.craftbukkit.block.data.CraftBlockData.toNMS(event.getInstrument(), NoteBlockInstrument.class).getSoundEvent(); // Paper - move NotePlayEvent call to fix instrument/note changes } world.playSeededSound((Player) null, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, holder, SoundSource.RECORDS, 3.0F, f, world.random.nextLong()); diff --git a/patches/server/0738-Dolphin-API.patch b/patches/server/0738-Dolphin-API.patch deleted file mode 100644 index e971f87322..0000000000 --- a/patches/server/0738-Dolphin-API.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Tue, 7 Dec 2021 19:34:23 -0500 -Subject: [PATCH] Dolphin API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java -index af432f9a1d255a56c31c3b97aeb4457d17f37e3e..f93f8f6509b12eb9b1e07c829278bb0822dd7988 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java -@@ -18,4 +18,36 @@ public class CraftDolphin extends CraftWaterMob implements Dolphin { - public String toString() { - return "CraftDolphin"; - } -+ -+ // Paper start - Missing Dolphin API -+ @Override -+ public int getMoistness() { -+ return this.getHandle().getMoistnessLevel(); -+ } -+ -+ @Override -+ public void setMoistness(int moistness) { -+ this.getHandle().setMoisntessLevel(moistness); -+ } -+ -+ @Override -+ public void setHasFish(boolean hasFish) { -+ this.getHandle().setGotFish(hasFish); -+ } -+ -+ @Override -+ public boolean hasFish() { -+ return this.getHandle().gotFish(); -+ } -+ -+ @Override -+ public org.bukkit.Location getTreasureLocation() { -+ return io.papermc.paper.util.MCUtil.toLocation(this.getHandle().level(), this.getHandle().getTreasurePos()); -+ } -+ -+ @Override -+ public void setTreasureLocation(org.bukkit.Location location) { -+ this.getHandle().setTreasurePos(io.papermc.paper.util.MCUtil.toBlockPosition(location)); -+ } -+ // Paper end - Missing Dolphin API - } diff --git a/patches/server/0739-More-PotionEffectType-API.patch b/patches/server/0738-More-PotionEffectType-API.patch similarity index 100% rename from patches/server/0739-More-PotionEffectType-API.patch rename to patches/server/0738-More-PotionEffectType-API.patch diff --git a/patches/server/0740-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0739-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 84% rename from patches/server/0740-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0739-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch index 42598199e1..1b86e32b63 100644 --- a/patches/server/0740-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch +++ b/patches/server/0739-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache fixes a CME due to this collection being shared across threads diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 75ba5a7fe002b5834f12e3a1159c15e6166c9c28..b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc 100644 +index 75ba5a7fe002b5834f12e3a1159c15e6166c9c28..be8aab51a1b92a3a0cc94976975fc3aabc46f0b4 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java @@ -852,7 +852,7 @@ public class StructureTemplate { @@ -14,7 +14,7 @@ index 75ba5a7fe002b5834f12e3a1159c15e6166c9c28..b2139e5f7a051cdea2a7ed6e98ba8be7 private final List blocks; - private final Map> cache = Maps.newHashMap(); -+ private final Map> cache = Maps.newConcurrentMap(); // Paper ++ private final Map> cache = Maps.newConcurrentMap(); // Paper - Fix CME due to this collection being shared across threads Palette(List infos) { this.blocks = infos; diff --git a/patches/server/0741-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0740-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 98% rename from patches/server/0741-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0740-API-for-creating-command-sender-which-forwards-feedb.patch index f0732e3393..f7945e5795 100644 --- a/patches/server/0741-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0740-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e2308ca7bd457ada1e5c0535d10e97affef65612..3aa82952cfd0415288b434a6462123504e4dab99 100644 +index 6e1ebb33413018d0cd2275eb76a7bdfbf8542da1..d53abb73ab61151a14baef8ce5cdf40ff8709238 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2110,6 +2110,13 @@ public final class CraftServer implements Server { diff --git a/patches/server/0742-Add-missing-structure-set-seed-configs.patch b/patches/server/0741-Add-missing-structure-set-seed-configs.patch similarity index 88% rename from patches/server/0742-Add-missing-structure-set-seed-configs.patch rename to patches/server/0741-Add-missing-structure-set-seed-configs.patch index ec96884a3b..9df945ead5 100644 --- a/patches/server/0742-Add-missing-structure-set-seed-configs.patch +++ b/patches/server/0741-Add-missing-structure-set-seed-configs.patch @@ -20,7 +20,7 @@ seeds/salts to the frequency reducer which has a similar effect. Co-authored-by: William Blake Galbreath diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index 996a49e1ccf827edf28ca92e947014517b7dad6e..e9239f90e59d1429fc7a2618e0fd3b8a57633b87 100644 +index 996a49e1ccf827edf28ca92e947014517b7dad6e..65db282b32dfec041579812f9b7275d8c0b99a0d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -568,7 +568,7 @@ public abstract class ChunkGenerator { @@ -28,19 +28,19 @@ index 996a49e1ccf827edf28ca92e947014517b7dad6e..e9239f90e59d1429fc7a2618e0fd3b8a } - if (structureplacement.isStructureChunk(placementCalculator, chunkcoordintpair.x, chunkcoordintpair.z)) { -+ if (structureplacement.isStructureChunk(placementCalculator, chunkcoordintpair.x, chunkcoordintpair.z, structureplacement instanceof net.minecraft.world.level.chunk.ChunkGeneratorStructureState.KeyedRandomSpreadStructurePlacement keyed ? keyed.key : null)) { // Paper - add missing structure set configs ++ if (structureplacement.isStructureChunk(placementCalculator, chunkcoordintpair.x, chunkcoordintpair.z, structureplacement instanceof net.minecraft.world.level.chunk.ChunkGeneratorStructureState.KeyedRandomSpreadStructurePlacement keyed ? keyed.key : null)) { // Paper - Add missing structure set seed configs if (list.size() == 1) { this.tryGenerateStructure((StructureSet.StructureSelectionEntry) list.get(0), structureAccessor, registryManager, randomstate, structureTemplateManager, placementCalculator.getLevelSeed(), chunk, chunkcoordintpair, sectionposition); } else { diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java -index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f34d8d3ccd 100644 +index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..798e22fb4d685b5845ebf687e8004e94f13a9751 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java @@ -50,13 +50,14 @@ public class ChunkGeneratorStructureState { private final Map>> ringPositions = new Object2ObjectArrayMap(); private boolean hasGeneratedPositions; private final List> possibleStructureSets; -+ public final SpigotWorldConfig conf; // Paper ++ public final SpigotWorldConfig conf; // Paper - Add missing structure set seed configs public static ChunkGeneratorStructureState createForFlat(RandomState randomstate, long i, BiomeSource worldchunkmanager, Stream> stream, SpigotWorldConfig conf) { // Spigot List> list = stream.filter((holder) -> { @@ -59,7 +59,7 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 - return new ChunkGeneratorStructureState(randomstate, worldchunkmanager, i, i, ChunkGeneratorStructureState.injectSpigot(list, conf)); // Spigot + return new ChunkGeneratorStructureState(randomstate, worldchunkmanager, i, i, ChunkGeneratorStructureState.injectSpigot(list, conf), conf); // Spigot } -+ // Paper start - horrible hack because spigot creates a ton of direct Holders which lose track of the identifying key ++ // Paper start - Add missing structure set seed configs; horrible hack because spigot creates a ton of direct Holders which lose track of the identifying key + public static final class KeyedRandomSpreadStructurePlacement extends RandomSpreadStructurePlacement { + public final net.minecraft.resources.ResourceKey key; + public KeyedRandomSpreadStructurePlacement(net.minecraft.resources.ResourceKey key, net.minecraft.core.Vec3i locateOffset, FrequencyReductionMethod frequencyReductionMethod, float frequency, int salt, java.util.Optional exclusionZone, int spacing, int separation, net.minecraft.world.level.levelgen.structure.placement.RandomSpreadType spreadType) { @@ -67,15 +67,15 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 + this.key = key; + } + } -+ // Paper end ++ // Paper end - Add missing structure set seed configs // Spigot start private static List> injectSpigot(List> list, SpigotWorldConfig conf) { return list.stream().map((holder) -> { StructureSet structureset = holder.value(); - if (structureset.placement() instanceof RandomSpreadStructurePlacement randomConfig) { -+ final Holder newHolder; // Paper -+ if (structureset.placement() instanceof RandomSpreadStructurePlacement randomConfig && holder.unwrapKey().orElseThrow().location().getNamespace().equals(net.minecraft.resources.ResourceLocation.DEFAULT_NAMESPACE)) { // Paper - check namespace cause datapacks could add structure sets with the same path ++ final Holder newHolder; // Paper - Add missing structure set seed configs ++ if (structureset.placement() instanceof RandomSpreadStructurePlacement randomConfig && holder.unwrapKey().orElseThrow().location().getNamespace().equals(net.minecraft.resources.ResourceLocation.DEFAULT_NAMESPACE)) { // Paper - Add missing structure set seed configs; check namespace cause datapacks could add structure sets with the same path String name = holder.unwrapKey().orElseThrow().location().getPath(); int seed = randomConfig.salt; @@ -83,7 +83,7 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 case "villages": seed = conf.villageSeed; break; -+ // Paper start ++ // Paper start - Add missing structure set seed configs + case "ancient_cities": + seed = conf.ancientCitySeed; + break; @@ -93,11 +93,11 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 + case "trial_chambers": + seed = conf.trialChambersSeed; + break; -+ // Paper end ++ // Paper end - Add missing structure set seed configs } - structureset = new StructureSet(structureset.structures(), new RandomSpreadStructurePlacement(randomConfig.locateOffset, randomConfig.frequencyReductionMethod, randomConfig.frequency, seed, randomConfig.exclusionZone, randomConfig.spacing(), randomConfig.separation(), randomConfig.spreadType())); -+ // Paper start ++ // Paper start - Add missing structure set seed configs + structureset = new StructureSet(structureset.structures(), new KeyedRandomSpreadStructurePlacement(holder.unwrapKey().orElseThrow(), randomConfig.locateOffset, randomConfig.frequencyReductionMethod, randomConfig.frequency, seed, randomConfig.exclusionZone, randomConfig.spacing(), randomConfig.separation(), randomConfig.spreadType())); + newHolder = Holder.direct(structureset); // I really wish we didn't have to do this here + } else { @@ -105,7 +105,7 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 } - return Holder.direct(structureset); + return newHolder; -+ // Paper end ++ // Paper end - Add missing structure set seed configs }).collect(Collectors.toUnmodifiableList()); } // Spigot end @@ -114,13 +114,13 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 } - private ChunkGeneratorStructureState(RandomState noiseConfig, BiomeSource biomeSource, long structureSeed, long concentricRingSeed, List> structureSets) { -+ private ChunkGeneratorStructureState(RandomState noiseConfig, BiomeSource biomeSource, long structureSeed, long concentricRingSeed, List> structureSets, SpigotWorldConfig conf) { // Paper ++ private ChunkGeneratorStructureState(RandomState noiseConfig, BiomeSource biomeSource, long structureSeed, long concentricRingSeed, List> structureSets, SpigotWorldConfig conf) { // Paper - Add missing structure set seed configs this.randomState = noiseConfig; this.levelSeed = structureSeed; this.biomeSource = biomeSource; this.concentricRingsSeed = concentricRingSeed; this.possibleStructureSets = structureSets; -+ this.conf = conf; // Paper ++ this.conf = conf; // Paper - Add missing structure set seed configs } public List> possibleStructureSets() { @@ -128,13 +128,13 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 HolderSet holderset = placement.preferredBiomes(); RandomSource randomsource = RandomSource.create(); -+ // Paper start ++ // Paper start - Add missing structure set seed configs + if (this.conf.strongholdSeed != null && structureSetEntry.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) { + randomsource.setSeed(this.conf.strongholdSeed); + } else { -+ // Paper end ++ // Paper end - Add missing structure set seed configs randomsource.setSeed(this.concentricRingsSeed); -+ } // Paper ++ } // Paper - Add missing structure set seed configs double d0 = randomsource.nextDouble() * 3.141592653589793D * 2.0D; int l = 0; int i1 = 0; @@ -143,21 +143,21 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..5d3d9164a05efbecc59ace6175f449f3 for (int l = centerChunkX - chunkCount; l <= centerChunkX + chunkCount; ++l) { for (int i1 = centerChunkZ - chunkCount; i1 <= centerChunkZ + chunkCount; ++i1) { - if (structureplacement.isStructureChunk(this, l, i1)) { -+ if (structureplacement.isStructureChunk(this, l, i1, structureplacement instanceof KeyedRandomSpreadStructurePlacement keyed ? keyed.key : null)) { // Paper - add missing structure set configs ++ if (structureplacement.isStructureChunk(this, l, i1, structureplacement instanceof KeyedRandomSpreadStructurePlacement keyed ? keyed.key : null)) { // Paper - Add missing structure set seed configs return true; } } diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java b/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java -index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..594a2dd3b1d4c29c969d1992b8e93795da00e682 100644 +index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d762b67d2 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java @@ -59,10 +59,24 @@ public abstract class StructurePlacement { return this.exclusionZone; } -+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper ++ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - Add missing structure set seed configs public boolean isStructureChunk(ChunkGeneratorStructureState calculator, int chunkX, int chunkZ) { -+ // Paper start - add missing structure set configs ++ // Paper start - Add missing structure set seed configs + return this.isStructureChunk(calculator, chunkX, chunkZ, null); + } + public boolean isStructureChunk(ChunkGeneratorStructureState calculator, int chunkX, int chunkZ, @org.jetbrains.annotations.Nullable net.minecraft.resources.ResourceKey structureSetKey) { @@ -169,11 +169,11 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..594a2dd3b1d4c29c969d1992b8e93795 + saltOverride = calculator.conf.buriedTreasureSeed; + } + } -+ // Paper end ++ // Paper end - Add missing structure set seed configs if (!this.isPlacementChunk(calculator, chunkX, chunkZ)) { return false; - } else if (this.frequency < 1.0F && !this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency)) { -+ } else if (this.frequency < 1.0F && !this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency, saltOverride)) { // Paper ++ } else if (this.frequency < 1.0F && !this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency, saltOverride)) { // Paper - Add missing structure set seed configs return false; } else { return !this.exclusionZone.isPresent() || !this.exclusionZone.get().isPlacementForbidden(calculator, chunkX, chunkZ); @@ -182,35 +182,35 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..594a2dd3b1d4c29c969d1992b8e93795 public abstract StructurePlacementType type(); - private static boolean probabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency) { -+ private static boolean probabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - ignore here ++ private static boolean probabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs; ignore here WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(0L)); worldgenRandom.setLargeFeatureWithSalt(seed, salt, chunkX, chunkZ); return worldgenRandom.nextFloat() < frequency; } - private static boolean legacyProbabilityReducerWithDouble(long seed, int salt, int chunkX, int chunkZ, float frequency) { -+ private static boolean legacyProbabilityReducerWithDouble(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper ++ private static boolean legacyProbabilityReducerWithDouble(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(0L)); -+ if (saltOverride == null) { // Paper ++ if (saltOverride == null) { // Paper - Add missing structure set seed configs worldgenRandom.setLargeFeatureSeed(seed, chunkX, chunkZ); -+ // Paper start ++ // Paper start - Add missing structure set seed configs + } else { + worldgenRandom.setLargeFeatureWithSalt(seed, chunkX, chunkZ, saltOverride); + } -+ // Paper end ++ // Paper end - Add missing structure set seed configs return worldgenRandom.nextDouble() < (double)frequency; } - private static boolean legacyArbitrarySaltProbabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency) { -+ private static boolean legacyArbitrarySaltProbabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper ++ private static boolean legacyArbitrarySaltProbabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(0L)); - worldgenRandom.setLargeFeatureWithSalt(seed, chunkX, chunkZ, 10387320); -+ worldgenRandom.setLargeFeatureWithSalt(seed, chunkX, chunkZ, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT); // Paper ++ worldgenRandom.setLargeFeatureWithSalt(seed, chunkX, chunkZ, saltOverride != null ? saltOverride : HIGHLY_ARBITRARY_RANDOM_SALT); // Paper - Add missing structure set seed configs return worldgenRandom.nextFloat() < frequency; } - private static boolean legacyPillagerOutpostReducer(long seed, int salt, int chunkX, int chunkZ, float frequency) { -+ private static boolean legacyPillagerOutpostReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - ignore here ++ private static boolean legacyPillagerOutpostReducer(long seed, int salt, int chunkX, int chunkZ, float frequency, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs; ignore here int i = chunkX >> 4; int j = chunkZ >> 4; WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(0L)); @@ -219,7 +219,7 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..594a2dd3b1d4c29c969d1992b8e93795 @FunctionalInterface public interface FrequencyReducer { - boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance); -+ boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance, @org.jetbrains.annotations.Nullable Integer saltOverride); // Paper ++ boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance, @org.jetbrains.annotations.Nullable Integer saltOverride); // Paper - Add missing structure set seed configs } public static enum FrequencyReductionMethod implements StringRepresentable { @@ -229,8 +229,8 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..594a2dd3b1d4c29c969d1992b8e93795 - public boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance) { - return this.reducer.shouldGenerate(seed, salt, chunkX, chunkZ, chance); -+ public boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper -+ return this.reducer.shouldGenerate(seed, salt, chunkX, chunkZ, chance, saltOverride); // Paper ++ public boolean shouldGenerate(long seed, int salt, int chunkX, int chunkZ, float chance, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs ++ return this.reducer.shouldGenerate(seed, salt, chunkX, chunkZ, chance, saltOverride); // Paper - Add missing structure set seed configs } @Override diff --git a/patches/server/0743-Implement-regenerateChunk.patch b/patches/server/0742-Implement-regenerateChunk.patch similarity index 97% rename from patches/server/0743-Implement-regenerateChunk.patch rename to patches/server/0742-Implement-regenerateChunk.patch index 18db0bc2db..d8d6665de1 100644 --- a/patches/server/0743-Implement-regenerateChunk.patch +++ b/patches/server/0742-Implement-regenerateChunk.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 999602a6c11257b05083bcc2d36b6e30b2b129f4..d41cd3075a5f59f271ddee7009a3ed26a34d3041 100644 +index 999602a6c11257b05083bcc2d36b6e30b2b129f4..cf43f2e7bfc465c1c804daa5d86a6ce1808d8041 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -144,6 +144,7 @@ import org.jetbrains.annotations.NotNull; @@ -91,7 +91,7 @@ index 999602a6c11257b05083bcc2d36b6e30b2b129f4..d41cd3075a5f59f271ddee7009a3ed26 + } + serverChunkCache.getLightEngine().relight(chunksToRelight, pos -> {}, relit -> {}); + return true; -+ // Paper end ++ // Paper end - implement regenerate chunk method } @Override diff --git a/patches/server/0744-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0743-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 86% rename from patches/server/0744-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0743-Fix-cancelled-powdered-snow-bucket-placement.patch index 1a1186ac1a..6e39a91486 100644 --- a/patches/server/0744-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0743-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,7 +8,7 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index fdcec8496abda362e611b42ef054ea730f47f408..8cf7d514803fd953e068d3436bfd4e50fb4b0da0 100644 +index fdcec8496abda362e611b42ef054ea730f47f408..8c839dc64b0a0271d7b19ee03a8144cf6224d4b2 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -379,7 +379,7 @@ public final class ItemStack { @@ -16,7 +16,7 @@ index fdcec8496abda362e611b42ef054ea730f47f408..8cf7d514803fd953e068d3436bfd4e50 ServerLevel world = (ServerLevel) context.getLevel(); - if (!(item instanceof BucketItem || item instanceof SolidBucketItem)) { // if not bucket -+ if (!(item instanceof BucketItem/* || item instanceof SolidBucketItem*/)) { // if not bucket // Paper - capture block states for snow buckets ++ if (!(item instanceof BucketItem/* || item instanceof SolidBucketItem*/)) { // if not bucket // Paper - Fix cancelled powdered snow bucket placement world.captureBlockStates = true; // special case bonemeal if (item == Items.BONE_MEAL) { @@ -25,7 +25,7 @@ index fdcec8496abda362e611b42ef054ea730f47f408..8cf7d514803fd953e068d3436bfd4e50 if (blocks.size() > 1) { placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); - } else if (blocks.size() == 1) { -+ } else if (blocks.size() == 1 && item != Items.POWDER_SNOW_BUCKET) { // Paper - don't call event twice for snow buckets ++ } else if (blocks.size() == 1 && item != Items.POWDER_SNOW_BUCKET) { // Paper - Fix cancelled powdered snow bucket placement placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ()); } diff --git a/patches/server/0745-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0744-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 92% rename from patches/server/0745-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0744-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 16d4dac830..37d1c7f455 100644 --- a/patches/server/0745-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0744-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3aa82952cfd0415288b434a6462123504e4dab99..64224332b7e037330e87d96445a56afebb1e81a2 100644 +index d53abb73ab61151a14baef8ce5cdf40ff8709238..bafdb900286c9015840aa74e8a84493bdaf8eaa2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2287,6 +2287,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0746-Add-GameEvent-tags.patch b/patches/server/0745-Add-GameEvent-tags.patch similarity index 97% rename from patches/server/0746-Add-GameEvent-tags.patch rename to patches/server/0745-Add-GameEvent-tags.patch index 40a6ea8d4a..1f3ec77e51 100644 --- a/patches/server/0746-Add-GameEvent-tags.patch +++ b/patches/server/0745-Add-GameEvent-tags.patch @@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 64224332b7e037330e87d96445a56afebb1e81a2..a3eaa58625d96df5beb00b69b0c7c902f63865db 100644 +index bafdb900286c9015840aa74e8a84493bdaf8eaa2..d96450c5b83bf785cdb24ca1c2653e642be9302d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2708,6 +2708,15 @@ public final class CraftServer implements Server { @@ -74,8 +74,8 @@ index 64224332b7e037330e87d96445a56afebb1e81a2..a3eaa58625d96df5beb00b69b0c7c902 + Preconditions.checkArgument(clazz == org.bukkit.GameEvent.class); + net.minecraft.core.Registry gameEvents = net.minecraft.core.registries.BuiltInRegistries.GAME_EVENT; + return gameEvents.getTags().map(pair -> (org.bukkit.Tag) new io.papermc.paper.CraftGameEventTag(gameEvents, pair.getFirst())).collect(ImmutableList.toImmutableList()); -+ // Paper end + } ++ // Paper end default -> throw new IllegalArgumentException(); } } diff --git a/patches/server/0747-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0746-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 94% rename from patches/server/0747-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0746-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index 17138e0a46..eeec58006b 100644 --- a/patches/server/0747-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0746-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,7 +9,7 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ac4d96345c985284a1306055b164a74a483cb444..396cbd1a0a94e913475bad65faf8e871b7105895 100644 +index 70adb35d0f267666e44c61ac0578a12f107f65b7..5799fd10f6dc95057f0ac9bf69931ee56ff62d90 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1416,6 +1416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop type, BlockPos pos, BlockState state) { super(type, pos, state); @@ -47,17 +47,17 @@ index a6c226da995eecc323d69a3eff1f8d202410e069..5d3740875de337e24fdba28305f61e96 this.vibrationData = listener; }); } -+ // Paper start ++ // Paper start - Configurable sculk sensor listener range + if (nbt.contains(PAPER_LISTENER_RANGE_NBT_KEY)) { + this.rangeOverride = nbt.getInt(PAPER_LISTENER_RANGE_NBT_KEY); + } else { + this.rangeOverride = null; + } -+ // Paper end ++ // Paper end - Configurable sculk sensor listener range } -+ protected static final String PAPER_LISTENER_RANGE_NBT_KEY = "Paper.ListenerRange"; // Paper ++ protected static final String PAPER_LISTENER_RANGE_NBT_KEY = "Paper.ListenerRange"; // Paper - Configurable sculk sensor listener range @Override protected void saveAdditional(CompoundTag nbt) { super.saveAdditional(nbt); @@ -65,13 +65,13 @@ index a6c226da995eecc323d69a3eff1f8d202410e069..5d3740875de337e24fdba28305f61e96 VibrationSystem.Data.CODEC.encodeStart(NbtOps.INSTANCE, this.vibrationData).resultOrPartial(LOGGER::error).ifPresent((listenerNbt) -> { nbt.put("listener", listenerNbt); }); -+ this.saveRangeOverride(nbt); // Paper ++ this.saveRangeOverride(nbt); // Paper - Configurable sculk sensor listener range + } -+ // Paper start ++ // Paper start - Configurable sculk sensor listener range + protected void saveRangeOverride(CompoundTag nbt) { + if (this.rangeOverride != null && this.rangeOverride != VibrationUser.LISTENER_RANGE) nbt.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.rangeOverride); // only save if it's different from the default } -+ // Paper end ++ // Paper end - Configurable sculk sensor listener range @Override public VibrationSystem.Data getVibrationData() { @@ -79,7 +79,7 @@ index a6c226da995eecc323d69a3eff1f8d202410e069..5d3740875de337e24fdba28305f61e96 @Override public int getListenerRadius() { -+ if (SculkSensorBlockEntity.this.rangeOverride != null) return SculkSensorBlockEntity.this.rangeOverride; // Paper ++ if (SculkSensorBlockEntity.this.rangeOverride != null) return SculkSensorBlockEntity.this.rangeOverride; // Paper - Configurable sculk sensor listener range return 8; } diff --git a/patches/server/0750-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0749-Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/server/0750-Add-missing-block-data-mins-and-maxes.patch rename to patches/server/0749-Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0750-Option-to-have-default-CustomSpawners-in-custom-worl.patch similarity index 96% rename from patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch rename to patches/server/0750-Option-to-have-default-CustomSpawners-in-custom-worl.patch index f2c1454094..b3629f58b9 100644 --- a/patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0750-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -10,7 +10,7 @@ just looking at the LevelStem key, look at the DimensionType key which is one level below that. Defaults to off to keep vanilla behavior. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 396cbd1a0a94e913475bad65faf8e871b7105895..41fae37f785191fa3314fcc5724c9b31ef953816 100644 +index 5799fd10f6dc95057f0ac9bf69931ee56ff62d90..27ef9e114f2951c0874e853ba866c6e27fc531cc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -623,7 +623,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d41cd3075a5f59f271ddee7009a3ed26a34d3041..3cf9aafb3ce75c0340605fa29c2a55ff237b843b 100644 +index cf43f2e7bfc465c1c804daa5d86a6ce1808d8041..5e31aa4383113b586b9ce440f121cb65045bf70a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1453,7 +1453,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0757-Expose-furnace-minecart-push-values.patch b/patches/server/0756-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/server/0757-Expose-furnace-minecart-push-values.patch rename to patches/server/0756-Expose-furnace-minecart-push-values.patch diff --git a/patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0757-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch similarity index 100% rename from patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch rename to patches/server/0757-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch diff --git a/patches/server/0759-More-Projectile-API.patch b/patches/server/0758-More-Projectile-API.patch similarity index 100% rename from patches/server/0759-More-Projectile-API.patch rename to patches/server/0758-More-Projectile-API.patch diff --git a/patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0759-Fix-swamp-hut-cat-generation-deadlock.patch similarity index 100% rename from patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch rename to patches/server/0759-Fix-swamp-hut-cat-generation-deadlock.patch diff --git a/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0760-Don-t-allow-vehicle-movement-from-players-while-tele.patch similarity index 94% rename from patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch rename to patches/server/0760-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 4a00876bf8..cfd207604f 100644 --- a/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0760-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,7 +7,7 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 554b0cd2f61005b57e1b0f68730354a8753fb0b7..33356ffc634549560adc24c40e58152e5482949d 100644 +index 027bc0d89b7ade602565ed3717e87c56de7265e1..a7e02f7b294795d7cac6df3a95658cf63f2fdb38 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -465,6 +465,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0762-Implement-getComputedBiome-API.patch b/patches/server/0761-Implement-getComputedBiome-API.patch similarity index 100% rename from patches/server/0762-Implement-getComputedBiome-API.patch rename to patches/server/0761-Implement-getComputedBiome-API.patch diff --git a/patches/server/0763-Make-some-itemstacks-nonnull.patch b/patches/server/0762-Make-some-itemstacks-nonnull.patch similarity index 100% rename from patches/server/0763-Make-some-itemstacks-nonnull.patch rename to patches/server/0762-Make-some-itemstacks-nonnull.patch diff --git a/patches/server/0764-Implement-enchantWithLevels-API.patch b/patches/server/0763-Implement-enchantWithLevels-API.patch similarity index 100% rename from patches/server/0764-Implement-enchantWithLevels-API.patch rename to patches/server/0763-Implement-enchantWithLevels-API.patch diff --git a/patches/server/0765-Fix-saving-in-unloadWorld.patch b/patches/server/0764-Fix-saving-in-unloadWorld.patch similarity index 90% rename from patches/server/0765-Fix-saving-in-unloadWorld.patch rename to patches/server/0764-Fix-saving-in-unloadWorld.patch index af839d74d6..a3f7632753 100644 --- a/patches/server/0765-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0764-Fix-saving-in-unloadWorld.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ead1161020064ceea6d04857de5bdbce460fd59e..8802d28c71d3ebc74690ad5c53c7dd77436e1a9f 100644 +index 21c9bfd9d9fd76e2a1b41001ea0f726d7b784309..7da2853b86a1e3cd7d1e3c985448727e04542f4f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1336,7 +1336,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0766-Buffer-OOB-setBlock-calls.patch b/patches/server/0765-Buffer-OOB-setBlock-calls.patch similarity index 100% rename from patches/server/0766-Buffer-OOB-setBlock-calls.patch rename to patches/server/0765-Buffer-OOB-setBlock-calls.patch diff --git a/patches/server/0767-Add-TameableDeathMessageEvent.patch b/patches/server/0766-Add-TameableDeathMessageEvent.patch similarity index 100% rename from patches/server/0767-Add-TameableDeathMessageEvent.patch rename to patches/server/0766-Add-TameableDeathMessageEvent.patch diff --git a/patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0767-Fix-new-block-data-for-EntityChangeBlockEvent.patch similarity index 100% rename from patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch rename to patches/server/0767-Fix-new-block-data-for-EntityChangeBlockEvent.patch diff --git a/patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0768-fix-player-loottables-running-when-mob-loot-gamerule.patch similarity index 100% rename from patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch rename to patches/server/0768-fix-player-loottables-running-when-mob-loot-gamerule.patch diff --git a/patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0769-Ensure-entity-passenger-world-matches-ridden-entity.patch similarity index 91% rename from patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch rename to patches/server/0769-Ensure-entity-passenger-world-matches-ridden-entity.patch index 0bbddb289c..ab2ce748ed 100644 --- a/patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/0769-Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity Bad plugins doing this would cause some obvious problems... diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..cc90b96ae9709c7f3997dc1524bcf0feeb00c864 100644 +index e10b08802cb170a0af8a3cfc01e730e32e6ca0f3..ca145fee91adb669665c881f150a339a773b28cb 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2847,7 +2847,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0771-Guard-against-invalid-entity-positions.patch b/patches/server/0770-Guard-against-invalid-entity-positions.patch similarity index 95% rename from patches/server/0771-Guard-against-invalid-entity-positions.patch rename to patches/server/0770-Guard-against-invalid-entity-positions.patch index 7549ffa9b5..d108dbce73 100644 --- a/patches/server/0771-Guard-against-invalid-entity-positions.patch +++ b/patches/server/0770-Guard-against-invalid-entity-positions.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Guard against invalid entity positions Anything not finite should be blocked and logged diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cc90b96ae9709c7f3997dc1524bcf0feeb00c864..ab409aae677a5ed4ca50113e88397c4543373df8 100644 +index ca145fee91adb669665c881f150a339a773b28cb..64a1dc13690568baba60dddc6f66a1700f618e51 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -4539,11 +4539,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0772-cache-resource-keys.patch b/patches/server/0771-cache-resource-keys.patch similarity index 100% rename from patches/server/0772-cache-resource-keys.patch rename to patches/server/0771-cache-resource-keys.patch diff --git a/patches/server/0773-Allow-changing-the-EnderDragon-podium.patch b/patches/server/0772-Allow-changing-the-EnderDragon-podium.patch similarity index 100% rename from patches/server/0773-Allow-changing-the-EnderDragon-podium.patch rename to patches/server/0772-Allow-changing-the-EnderDragon-podium.patch diff --git a/patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/0773-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch similarity index 96% rename from patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch rename to patches/server/0773-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch index 07010b5d63..aa5772fe8a 100644 --- a/patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch +++ b/patches/server/0773-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch @@ -9,7 +9,7 @@ is not a WorldGenRegion, we can bypass the deadlock entirely. See https://bugs.mojang.com/browse/MC-246262 diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..0540929bd362b266295ea6770ce2fb351b614463 100644 +index be8aab51a1b92a3a0cc94976975fc3aabc46f0b4..ae8a42261337bf736d0cc1bbe18da2b773417ca4 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java @@ -279,7 +279,11 @@ public class StructureTemplate { diff --git a/patches/server/0775-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/server/0774-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch similarity index 100% rename from patches/server/0775-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch rename to patches/server/0774-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch diff --git a/patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0775-Prevent-tile-entity-copies-loading-chunks.patch similarity index 94% rename from patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch rename to patches/server/0775-Prevent-tile-entity-copies-loading-chunks.patch index 6cd473f047..9c908631e8 100644 --- a/patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0775-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 33356ffc634549560adc24c40e58152e5482949d..5a2f8806366e3a423e77e882dbc9068ad64ff538 100644 +index a7e02f7b294795d7cac6df3a95658cf63f2fdb38..ecd3ce99d01bc2367ffadaab41f237c4f3516a28 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3197,7 +3197,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0776-Use-username-instead-of-display-name-in-PlayerList-g.patch similarity index 100% rename from patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch rename to patches/server/0776-Use-username-instead-of-display-name-in-PlayerList-g.patch diff --git a/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0777-Pass-ServerLevel-for-gamerule-callbacks.patch similarity index 98% rename from patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch rename to patches/server/0777-Pass-ServerLevel-for-gamerule-callbacks.patch index a223a69457..451e4e5624 100644 --- a/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0777-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -18,7 +18,7 @@ index e69a0121c8644d831cbb8bc1c95d9219d1c343da..7d33ce8d68ca55e0fd37d2d4e3c78a43 if (dedicatedserverproperties.enableQuery) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5a2f8806366e3a423e77e882dbc9068ad64ff538..9ce9390291988e3110e228e83e0754e5529de800 100644 +index ecd3ce99d01bc2367ffadaab41f237c4f3516a28..93ac02c915455f688062f9ef721f2cea7f91a09d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2761,7 +2761,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -167,7 +167,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..dd03426943dd380cefe12afe3e63c318 this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3cf9aafb3ce75c0340605fa29c2a55ff237b843b..c517d8e2daac5675425783a50ae04b5d2a07e37a 100644 +index 5e31aa4383113b586b9ce440f121cb65045bf70a..b504bdd02041f4fe7a7ed4ed9d8563cd9b338125 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2038,7 +2038,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0779-Expand-PlayerItemDamageEvent.patch b/patches/server/0778-Expand-PlayerItemDamageEvent.patch similarity index 93% rename from patches/server/0779-Expand-PlayerItemDamageEvent.patch rename to patches/server/0778-Expand-PlayerItemDamageEvent.patch index bf237c94c3..8074d7b6ff 100644 --- a/patches/server/0779-Expand-PlayerItemDamageEvent.patch +++ b/patches/server/0778-Expand-PlayerItemDamageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8cf7d514803fd953e068d3436bfd4e50fb4b0da0..6b38e515a77df7fb06b41fbedaa1090b1cac78fb 100644 +index 8c839dc64b0a0271d7b19ee03a8144cf6224d4b2..66bb955bb338e4d1689daace28ebe295b6884554 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -638,10 +638,11 @@ public final class ItemStack { diff --git a/patches/server/0780-WorldCreator-keepSpawnLoaded.patch b/patches/server/0779-WorldCreator-keepSpawnLoaded.patch similarity index 94% rename from patches/server/0780-WorldCreator-keepSpawnLoaded.patch rename to patches/server/0779-WorldCreator-keepSpawnLoaded.patch index efa63d431e..07e956fd9e 100644 --- a/patches/server/0780-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0779-WorldCreator-keepSpawnLoaded.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8802d28c71d3ebc74690ad5c53c7dd77436e1a9f..170da30329f2a0d65a05c0d5c7a4170405df6aef 100644 +index 7da2853b86a1e3cd7d1e3c985448727e04542f4f..b76bb0142cbe64064f7835807974414c879f57a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1283,7 +1283,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0781-Fix-CME-in-CraftPersistentDataTypeRegistry.patch b/patches/server/0780-Fix-CME-in-CraftPersistentDataTypeRegistry.patch similarity index 100% rename from patches/server/0781-Fix-CME-in-CraftPersistentDataTypeRegistry.patch rename to patches/server/0780-Fix-CME-in-CraftPersistentDataTypeRegistry.patch diff --git a/patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/0781-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch similarity index 100% rename from patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch rename to patches/server/0781-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch diff --git a/patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/0782-Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 100% rename from patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/server/0782-Add-EntityDyeEvent-and-CollarColorable-interface.patch diff --git a/patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/0783-Fire-CauldronLevelChange-on-initial-fill.patch similarity index 100% rename from patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch rename to patches/server/0783-Fire-CauldronLevelChange-on-initial-fill.patch diff --git a/patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/0784-fix-powder-snow-cauldrons-not-turning-to-water.patch similarity index 100% rename from patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch rename to patches/server/0784-fix-powder-snow-cauldrons-not-turning-to-water.patch diff --git a/patches/server/0786-Add-PlayerStopUsingItemEvent.patch b/patches/server/0785-Add-PlayerStopUsingItemEvent.patch similarity index 91% rename from patches/server/0786-Add-PlayerStopUsingItemEvent.patch rename to patches/server/0785-Add-PlayerStopUsingItemEvent.patch index d434d58cba..24390d47ae 100644 --- a/patches/server/0786-Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/0785-Add-PlayerStopUsingItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e27b19cf56b269c426cb6ddf81513497b70c676f..546777ad955d0d317d129882cfeab68935708228 100644 +index 31ee19d5740d74418cb4d42d0ce78a0a7cb51e0a..e94084b1f0fb04625cb94ca07825b8f78c0c9012 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4025,6 +4025,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0787-Don-t-tick-markers.patch b/patches/server/0786-Don-t-tick-markers.patch similarity index 100% rename from patches/server/0787-Don-t-tick-markers.patch rename to patches/server/0786-Don-t-tick-markers.patch diff --git a/patches/server/0788-Expand-FallingBlock-API.patch b/patches/server/0787-Expand-FallingBlock-API.patch similarity index 100% rename from patches/server/0788-Expand-FallingBlock-API.patch rename to patches/server/0787-Expand-FallingBlock-API.patch diff --git a/patches/server/0789-Do-not-accept-invalid-client-settings.patch b/patches/server/0788-Do-not-accept-invalid-client-settings.patch similarity index 94% rename from patches/server/0789-Do-not-accept-invalid-client-settings.patch rename to patches/server/0788-Do-not-accept-invalid-client-settings.patch index 03d00dc89b..9f9a9c534c 100644 --- a/patches/server/0789-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0788-Do-not-accept-invalid-client-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9ce9390291988e3110e228e83e0754e5529de800..aba06bae97f021d9f62441eb662539a0bbc815ef 100644 +index 93ac02c915455f688062f9ef721f2cea7f91a09d..b97394a20d1308f254252adfd10eff018c594d6e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3321,6 +3321,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0790-Add-support-for-Proxy-Protocol.patch b/patches/server/0789-Add-support-for-Proxy-Protocol.patch similarity index 100% rename from patches/server/0790-Add-support-for-Proxy-Protocol.patch rename to patches/server/0789-Add-support-for-Proxy-Protocol.patch diff --git a/patches/server/0791-Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/0790-Fix-OfflinePlayer-getBedSpawnLocation.patch similarity index 100% rename from patches/server/0791-Fix-OfflinePlayer-getBedSpawnLocation.patch rename to patches/server/0790-Fix-OfflinePlayer-getBedSpawnLocation.patch diff --git a/patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/0791-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch similarity index 100% rename from patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch rename to patches/server/0791-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch diff --git a/patches/server/0793-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0792-Sanitize-sent-BlockEntity-NBT.patch similarity index 100% rename from patches/server/0793-Sanitize-sent-BlockEntity-NBT.patch rename to patches/server/0792-Sanitize-sent-BlockEntity-NBT.patch diff --git a/patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/0793-Disable-component-selector-resolving-in-books-by-def.patch similarity index 100% rename from patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch rename to patches/server/0793-Disable-component-selector-resolving-in-books-by-def.patch diff --git a/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0794-Prevent-entity-loading-causing-async-lookups.patch similarity index 97% rename from patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch rename to patches/server/0794-Prevent-entity-loading-causing-async-lookups.patch index 3b6df7cf92..76c416d518 100644 --- a/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch +++ b/patches/server/0794-Prevent-entity-loading-causing-async-lookups.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent entity loading causing async lookups diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ab409aae677a5ed4ca50113e88397c4543373df8..e5f4388d531910c238fcd809a1c5d92267858c53 100644 +index 64a1dc13690568baba60dddc6f66a1700f618e51..d5cc94219976e3832617210e0aa3b773f3eca432 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -803,6 +803,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0795-Throw-exception-on-world-create-while-being-ticked.patch similarity index 95% rename from patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch rename to patches/server/0795-Throw-exception-on-world-create-while-being-ticked.patch index 1a5562e13c..bcb16c777c 100644 --- a/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0795-Throw-exception-on-world-create-while-being-ticked.patch @@ -7,7 +7,7 @@ There are no plans to support creating worlds while worlds are being ticked themselvess. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e5dccd330cbf3301a60b65453e87a4005f954716..b9df0b37b5568758c04ee41e258395c3a2d493c1 100644 +index c1ef4dd08b39adf3ab8dbfe286c6378f3efbf54e..4d4617635c9dc0d011cf8fc57ece6e2300573bad 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -310,6 +310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 546777ad955d0d317d129882cfeab68935708228..cc774a2803051a5d981ecece2e9a992f09850ecf 100644 +index e94084b1f0fb04625cb94ca07825b8f78c0c9012..bbe594f57b7d11d6947b6b313901020c06324bdc 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3056,37 +3056,15 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0825-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0824-Fire-EntityChangeBlockEvent-in-more-places.patch similarity index 100% rename from patches/server/0825-Fire-EntityChangeBlockEvent-in-more-places.patch rename to patches/server/0824-Fire-EntityChangeBlockEvent-in-more-places.patch diff --git a/patches/server/0826-Missing-eating-regain-reason.patch b/patches/server/0825-Missing-eating-regain-reason.patch similarity index 100% rename from patches/server/0826-Missing-eating-regain-reason.patch rename to patches/server/0825-Missing-eating-regain-reason.patch diff --git a/patches/server/0827-Missing-effect-cause.patch b/patches/server/0826-Missing-effect-cause.patch similarity index 100% rename from patches/server/0827-Missing-effect-cause.patch rename to patches/server/0826-Missing-effect-cause.patch diff --git a/patches/server/0828-Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/0827-Added-byte-array-serialization-deserialization-for-P.patch similarity index 100% rename from patches/server/0828-Added-byte-array-serialization-deserialization-for-P.patch rename to patches/server/0827-Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/server/0829-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/server/0828-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch similarity index 100% rename from patches/server/0829-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch rename to patches/server/0828-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch diff --git a/patches/server/0830-Call-BlockPhysicsEvent-more-often.patch b/patches/server/0829-Call-BlockPhysicsEvent-more-often.patch similarity index 100% rename from patches/server/0830-Call-BlockPhysicsEvent-more-often.patch rename to patches/server/0829-Call-BlockPhysicsEvent-more-often.patch diff --git a/patches/server/0831-Configurable-chat-thread-limit.patch b/patches/server/0830-Configurable-chat-thread-limit.patch similarity index 100% rename from patches/server/0831-Configurable-chat-thread-limit.patch rename to patches/server/0830-Configurable-chat-thread-limit.patch diff --git a/patches/server/0832-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0831-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch similarity index 100% rename from patches/server/0832-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch rename to patches/server/0831-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch diff --git a/patches/server/0833-fix-Jigsaw-block-kicking-user.patch b/patches/server/0832-fix-Jigsaw-block-kicking-user.patch similarity index 100% rename from patches/server/0833-fix-Jigsaw-block-kicking-user.patch rename to patches/server/0832-fix-Jigsaw-block-kicking-user.patch diff --git a/patches/server/0834-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0833-use-BlockFormEvent-for-mud-converting-into-clay.patch similarity index 100% rename from patches/server/0834-use-BlockFormEvent-for-mud-converting-into-clay.patch rename to patches/server/0833-use-BlockFormEvent-for-mud-converting-into-clay.patch diff --git a/patches/server/0835-Add-getDrops-to-BlockState.patch b/patches/server/0834-Add-getDrops-to-BlockState.patch similarity index 100% rename from patches/server/0835-Add-getDrops-to-BlockState.patch rename to patches/server/0834-Add-getDrops-to-BlockState.patch diff --git a/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0835-Fix-a-bunch-of-vanilla-bugs.patch similarity index 99% rename from patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch rename to patches/server/0835-Fix-a-bunch-of-vanilla-bugs.patch index b3138f3a62..52b5ed123b 100644 --- a/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0835-Fix-a-bunch-of-vanilla-bugs.patch @@ -320,7 +320,7 @@ index bd0165d9ca52665a52fbd9678ed895bf4bed2fe7..8fe5a4ccf474c094b8081828c93e8973 public void equipArmor(Player player, ItemStack stack) { diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -index 63ef00eb6f93a471de1e9c2355099d9dd3a71dd9..6849429c3577f36eb699083375824ae5633f8d06 100644 +index 3ff1ae5ae705cd8d5c8529e1dcdd5ccaed908830..0c952bfc01b367a297e81768cab436c5474830f1 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -282,6 +282,14 @@ public class ItemFrame extends HangingEntity { diff --git a/patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0836-Remove-unnecessary-onTrackingStart-during-navigation.patch similarity index 100% rename from patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch rename to patches/server/0836-Remove-unnecessary-onTrackingStart-during-navigation.patch diff --git a/patches/server/0838-Fix-custom-piglin-loved-items.patch b/patches/server/0837-Fix-custom-piglin-loved-items.patch similarity index 100% rename from patches/server/0838-Fix-custom-piglin-loved-items.patch rename to patches/server/0837-Fix-custom-piglin-loved-items.patch diff --git a/patches/server/0839-EntityPickupItemEvent-fixes.patch b/patches/server/0838-EntityPickupItemEvent-fixes.patch similarity index 100% rename from patches/server/0839-EntityPickupItemEvent-fixes.patch rename to patches/server/0838-EntityPickupItemEvent-fixes.patch diff --git a/patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0839-Correctly-handle-interactions-with-items-on-cooldown.patch similarity index 100% rename from patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch rename to patches/server/0839-Correctly-handle-interactions-with-items-on-cooldown.patch diff --git a/patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0840-Add-PlayerInventorySlotChangeEvent.patch similarity index 100% rename from patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch rename to patches/server/0840-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/server/0842-Elder-Guardian-appearance-API.patch b/patches/server/0841-Elder-Guardian-appearance-API.patch similarity index 100% rename from patches/server/0842-Elder-Guardian-appearance-API.patch rename to patches/server/0841-Elder-Guardian-appearance-API.patch diff --git a/patches/server/0843-Allow-changing-bed-s-occupied-property.patch b/patches/server/0842-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/server/0843-Allow-changing-bed-s-occupied-property.patch rename to patches/server/0842-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/server/0844-Add-entity-knockback-API.patch b/patches/server/0843-Add-entity-knockback-API.patch similarity index 100% rename from patches/server/0844-Add-entity-knockback-API.patch rename to patches/server/0843-Add-entity-knockback-API.patch diff --git a/patches/server/0845-Detect-headless-JREs.patch b/patches/server/0844-Detect-headless-JREs.patch similarity index 100% rename from patches/server/0845-Detect-headless-JREs.patch rename to patches/server/0844-Detect-headless-JREs.patch diff --git a/patches/server/0846-fix-entity-vehicle-collision-event-not-called.patch b/patches/server/0845-fix-entity-vehicle-collision-event-not-called.patch similarity index 100% rename from patches/server/0846-fix-entity-vehicle-collision-event-not-called.patch rename to patches/server/0845-fix-entity-vehicle-collision-event-not-called.patch diff --git a/patches/server/0847-optimize-dirt-and-snow-spreading.patch b/patches/server/0846-optimize-dirt-and-snow-spreading.patch similarity index 100% rename from patches/server/0847-optimize-dirt-and-snow-spreading.patch rename to patches/server/0846-optimize-dirt-and-snow-spreading.patch diff --git a/patches/server/0848-Add-EntityToggleSitEvent.patch b/patches/server/0847-Add-EntityToggleSitEvent.patch similarity index 100% rename from patches/server/0848-Add-EntityToggleSitEvent.patch rename to patches/server/0847-Add-EntityToggleSitEvent.patch diff --git a/patches/server/0849-Add-fire-tick-delay-option.patch b/patches/server/0848-Add-fire-tick-delay-option.patch similarity index 100% rename from patches/server/0849-Add-fire-tick-delay-option.patch rename to patches/server/0848-Add-fire-tick-delay-option.patch diff --git a/patches/server/0850-Add-Moving-Piston-API.patch b/patches/server/0849-Add-Moving-Piston-API.patch similarity index 100% rename from patches/server/0850-Add-Moving-Piston-API.patch rename to patches/server/0849-Add-Moving-Piston-API.patch diff --git a/patches/server/0851-Ignore-impossible-spawn-tick.patch b/patches/server/0850-Ignore-impossible-spawn-tick.patch similarity index 100% rename from patches/server/0851-Ignore-impossible-spawn-tick.patch rename to patches/server/0850-Ignore-impossible-spawn-tick.patch diff --git a/patches/server/0852-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0851-Track-projectile-source-for-fireworks-from-dispenser.patch similarity index 100% rename from patches/server/0852-Track-projectile-source-for-fireworks-from-dispenser.patch rename to patches/server/0851-Track-projectile-source-for-fireworks-from-dispenser.patch diff --git a/patches/server/0853-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0852-Fix-EntityArgument-suggestion-permissions-to-align-w.patch similarity index 84% rename from patches/server/0853-Fix-EntityArgument-suggestion-permissions-to-align-w.patch rename to patches/server/0852-Fix-EntityArgument-suggestion-permissions-to-align-w.patch index eaa1ba226b..e8c896203a 100644 --- a/patches/server/0853-Fix-EntityArgument-suggestion-permissions-to-align-w.patch +++ b/patches/server/0852-Fix-EntityArgument-suggestion-permissions-to-align-w.patch @@ -9,19 +9,19 @@ suggestions, which especially matters when we force suggestions to the server for this type diff --git a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java -index a71726cee91fb406875a4540c9fb7c0ecf757294..21dfc4812414f6a75fdae7082c0fce788ebe095b 100644 +index d93698fd814683d451a3c8e8bcbb9cd475c79515..8d79cfa371546996ef65f94232c1d344e7c590ec 100644 --- a/src/main/java/net/minecraft/commands/arguments/EntityArgument.java +++ b/src/main/java/net/minecraft/commands/arguments/EntityArgument.java @@ -128,7 +128,12 @@ public class EntityArgument implements ArgumentType { StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); stringreader.setCursor(suggestionsbuilder.getStart()); -- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2), true); // Paper +- EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, icompletionprovider.hasPermission(2), true); // Paper - tell clients to ask server for suggestions for EntityArguments + // Paper start - Fix EntityArgument suggestion permissions + final boolean permission = object instanceof CommandSourceStack stack + ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") + : icompletionprovider.hasPermission(2); -+ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission, true); // Paper ++ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, permission, true); // Paper - tell clients to ask server for suggestions for EntityArguments + // Paper end - Fix EntityArgument suggestion permissions try { diff --git a/patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0853-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch similarity index 95% rename from patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to patches/server/0853-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index acec1447d5..2964a3d3c6 100644 --- a/patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0853-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2de97b71c16094c39a0d1eb2880d1b036b44b710..9634ff08d14500216835423376dbc86f3b0ffd35 100644 +index 3f9954e1bae36c8dedfb99a5b753d873ce521226..e83604aa0ae5760ba7335dac53b340406f4ffddf 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3378,6 +3378,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0855-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0854-Add-PrePlayerAttackEntityEvent.patch similarity index 93% rename from patches/server/0855-Add-PrePlayerAttackEntityEvent.patch rename to patches/server/0854-Add-PrePlayerAttackEntityEvent.patch index e6a55af2d2..50dfe7026f 100644 --- a/patches/server/0855-Add-PrePlayerAttackEntityEvent.patch +++ b/patches/server/0854-Add-PrePlayerAttackEntityEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 7a984f531d3ebb6e055f07227b2ef8247fb3a842..13a443d942aee77f18e91669b207d8ec54bbaf65 100644 +index 6ab0c3116a4238a4c5369cc33452fed594149ea4..26930e84a4b089ffdf504ae244701f9c039234d4 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1240,8 +1240,17 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0856-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0855-ensure-reset-EnderDragon-boss-event-name.patch similarity index 100% rename from patches/server/0856-ensure-reset-EnderDragon-boss-event-name.patch rename to patches/server/0855-ensure-reset-EnderDragon-boss-event-name.patch diff --git a/patches/server/0857-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/0856-fix-MC-252817-green-map-markers-do-not-disappear.patch similarity index 94% rename from patches/server/0857-fix-MC-252817-green-map-markers-do-not-disappear.patch rename to patches/server/0856-fix-MC-252817-green-map-markers-do-not-disappear.patch index daccd2b9ff..6f61c88362 100644 --- a/patches/server/0857-fix-MC-252817-green-map-markers-do-not-disappear.patch +++ b/patches/server/0856-fix-MC-252817-green-map-markers-do-not-disappear.patch @@ -6,7 +6,7 @@ Subject: [PATCH] fix MC-252817 (green map markers do not disappear). this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame. diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -index 6849429c3577f36eb699083375824ae5633f8d06..1ef8bbade35c3e18f53808a9955ba69750b7d30f 100644 +index 0c952bfc01b367a297e81768cab436c5474830f1..0cd57021cf308984415ca670f727ae61ac343fe7 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -291,7 +291,9 @@ public class ItemFrame extends HangingEntity { diff --git a/patches/server/0858-Add-Player-Warden-Warning-API.patch b/patches/server/0857-Add-Player-Warden-Warning-API.patch similarity index 100% rename from patches/server/0858-Add-Player-Warden-Warning-API.patch rename to patches/server/0857-Add-Player-Warden-Warning-API.patch diff --git a/patches/server/0859-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0858-More-vanilla-friendly-methods-to-update-trades.patch similarity index 100% rename from patches/server/0859-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/server/0858-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/server/0860-Add-paper-dumplisteners-command.patch b/patches/server/0859-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/server/0860-Add-paper-dumplisteners-command.patch rename to patches/server/0859-Add-paper-dumplisteners-command.patch diff --git a/patches/server/0861-check-global-player-list-where-appropriate.patch b/patches/server/0860-check-global-player-list-where-appropriate.patch similarity index 98% rename from patches/server/0861-check-global-player-list-where-appropriate.patch rename to patches/server/0860-check-global-player-list-where-appropriate.patch index f165c37f7f..1ac6e75a50 100644 --- a/patches/server/0861-check-global-player-list-where-appropriate.patch +++ b/patches/server/0860-check-global-player-list-where-appropriate.patch @@ -24,7 +24,7 @@ index c71a844064f15bdcc2f4fab14b7ace80d95269c0..77199a85df9559eeb83b6410ab0e1793 + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index cc774a2803051a5d981ecece2e9a992f09850ecf..10b838b486fa857645bb12ea2043727996b4aadf 100644 +index bbe594f57b7d11d6947b6b313901020c06324bdc..81814c3896aff6b90c8755a5320ac24da925e5f7 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3678,7 +3678,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0862-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0861-Fix-async-entity-add-due-to-fungus-trees.patch similarity index 100% rename from patches/server/0862-Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/0861-Fix-async-entity-add-due-to-fungus-trees.patch diff --git a/patches/server/0863-ItemStack-damage-API.patch b/patches/server/0862-ItemStack-damage-API.patch similarity index 100% rename from patches/server/0863-ItemStack-damage-API.patch rename to patches/server/0862-ItemStack-damage-API.patch diff --git a/patches/server/0864-Friction-API.patch b/patches/server/0863-Friction-API.patch similarity index 98% rename from patches/server/0864-Friction-API.patch rename to patches/server/0863-Friction-API.patch index c91e0ac630..f3ca18a211 100644 --- a/patches/server/0864-Friction-API.patch +++ b/patches/server/0863-Friction-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 10b838b486fa857645bb12ea2043727996b4aadf..40e1caa2c070f11d7195a707ec628f40bccdeef7 100644 +index 81814c3896aff6b90c8755a5320ac24da925e5f7..f1627ea97b2ce5eb00e9d30349786c3cac6b98cc 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0865-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0864-Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 100% rename from patches/server/0865-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/0864-Ability-to-control-player-s-insomnia-and-phantoms.patch diff --git a/patches/server/0866-Fix-player-kick-on-shutdown.patch b/patches/server/0865-Fix-player-kick-on-shutdown.patch similarity index 100% rename from patches/server/0866-Fix-player-kick-on-shutdown.patch rename to patches/server/0865-Fix-player-kick-on-shutdown.patch diff --git a/patches/server/0867-Sync-offhand-slot-in-menus.patch b/patches/server/0866-Sync-offhand-slot-in-menus.patch similarity index 100% rename from patches/server/0867-Sync-offhand-slot-in-menus.patch rename to patches/server/0866-Sync-offhand-slot-in-menus.patch diff --git a/patches/server/0868-Player-Entity-Tracking-Events.patch b/patches/server/0867-Player-Entity-Tracking-Events.patch similarity index 96% rename from patches/server/0868-Player-Entity-Tracking-Events.patch rename to patches/server/0867-Player-Entity-Tracking-Events.patch index a52a97fb5f..67931e369e 100644 --- a/patches/server/0868-Player-Entity-Tracking-Events.patch +++ b/patches/server/0867-Player-Entity-Tracking-Events.patch @@ -21,7 +21,7 @@ index 982750fd4f3f474514194df9b76388311c052b29..a9c94645a4bf3837bce5622b76f0d24a } else if (this.seenBy.remove(player.connection)) { this.serverEntity.removePairing(player); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 9634ff08d14500216835423376dbc86f3b0ffd35..09fa4c28d43c8fddc84056f5cf19dedc6ffe2077 100644 +index e83604aa0ae5760ba7335dac53b340406f4ffddf..f18dfffdc45c23a9a78ae13685a67a7d4603a56b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -4107,7 +4107,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0869-Limit-pet-look-distance.patch b/patches/server/0868-Limit-pet-look-distance.patch similarity index 100% rename from patches/server/0869-Limit-pet-look-distance.patch rename to patches/server/0868-Limit-pet-look-distance.patch diff --git a/patches/server/0870-Properly-resend-entities.patch b/patches/server/0869-Properly-resend-entities.patch similarity index 99% rename from patches/server/0870-Properly-resend-entities.patch rename to patches/server/0869-Properly-resend-entities.patch index 4eec16fa3e..9652ca13e4 100644 --- a/patches/server/0870-Properly-resend-entities.patch +++ b/patches/server/0869-Properly-resend-entities.patch @@ -85,7 +85,7 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..ccb7d92b6c36b6225a2e640f8cea6c0d public static class DataItem { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5cb69d9fbff2ee1e647c21e40a17b7244815f213..e12f9616a3ef7663bafdb986a73cff858beb3a52 100644 +index 5fdc7c39d6b565e2e87ebb6bf0219ee2c7d50d10..e55e253898b61cc4eb611592e8310bb4e005362a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2658,7 +2658,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0870-Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 100% rename from patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/server/0870-Fixes-and-additions-to-the-SpawnReason-API.patch diff --git a/patches/server/0872-fix-Instruments.patch b/patches/server/0871-fix-Instruments.patch similarity index 100% rename from patches/server/0872-fix-Instruments.patch rename to patches/server/0871-fix-Instruments.patch diff --git a/patches/server/0873-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0872-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 100% rename from patches/server/0873-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/0872-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch diff --git a/patches/server/0874-Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/0873-Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 100% rename from patches/server/0874-Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/server/0873-Fix-inconsistencies-in-dispense-events-regarding-sta.patch diff --git a/patches/server/0875-Add-BlockLockCheckEvent.patch b/patches/server/0874-Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/server/0875-Add-BlockLockCheckEvent.patch rename to patches/server/0874-Add-BlockLockCheckEvent.patch diff --git a/patches/server/0876-Add-Sneaking-API-for-Entities.patch b/patches/server/0875-Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/server/0876-Add-Sneaking-API-for-Entities.patch rename to patches/server/0875-Add-Sneaking-API-for-Entities.patch diff --git a/patches/server/0877-Improve-logging-and-errors.patch b/patches/server/0876-Improve-logging-and-errors.patch similarity index 98% rename from patches/server/0877-Improve-logging-and-errors.patch rename to patches/server/0876-Improve-logging-and-errors.patch index 395a7b5e06..89c2660995 100644 --- a/patches/server/0877-Improve-logging-and-errors.patch +++ b/patches/server/0876-Improve-logging-and-errors.patch @@ -40,7 +40,7 @@ index 536f0c496ce36ca3248fc6eeac9bbd77214a36f9..31718823250a1490b783f426fff65bf5 while (iterator.hasNext()) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e12f9616a3ef7663bafdb986a73cff858beb3a52..087f26d52536ec1f196f21e2df1a7159a4a63c1a 100644 +index e55e253898b61cc4eb611592e8310bb4e005362a..a39101fc6ecfa414a1a5e41e61e5fa9077c03c04 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3395,7 +3395,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0878-Improve-PortalEvents.patch b/patches/server/0877-Improve-PortalEvents.patch similarity index 93% rename from patches/server/0878-Improve-PortalEvents.patch rename to patches/server/0877-Improve-PortalEvents.patch index 615937481d..2ad20a59ee 100644 --- a/patches/server/0878-Improve-PortalEvents.patch +++ b/patches/server/0877-Improve-PortalEvents.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Improve PortalEvents diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 09fa4c28d43c8fddc84056f5cf19dedc6ffe2077..4ea43e3fdc2b8b85c9524f9404fe3535adacc65d 100644 +index f18dfffdc45c23a9a78ae13685a67a7d4603a56b..3f88e5e6aa260c6c05b57b19c6209357ac0bd4b1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3765,7 +3765,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0879-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0878-Add-config-option-for-spider-worldborder-climbing.patch similarity index 100% rename from patches/server/0879-Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/0878-Add-config-option-for-spider-worldborder-climbing.patch diff --git a/patches/server/0880-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0879-Add-missing-SpigotConfig-logCommands-check.patch similarity index 93% rename from patches/server/0880-Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/0879-Add-missing-SpigotConfig-logCommands-check.patch index 2f3fa4732c..940d96f11d 100644 --- a/patches/server/0880-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0879-Add-missing-SpigotConfig-logCommands-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 087f26d52536ec1f196f21e2df1a7159a4a63c1a..5e6632e3557cf43b4d71ad457d64f3be3518187e 100644 +index a39101fc6ecfa414a1a5e41e61e5fa9077c03c04..0b83618d8ca6f5f6694ec5ba4b7635146a5be60c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2139,7 +2139,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0881-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0880-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/server/0881-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/0880-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/server/0882-Flying-Fall-Damage.patch b/patches/server/0881-Flying-Fall-Damage.patch similarity index 96% rename from patches/server/0882-Flying-Fall-Damage.patch rename to patches/server/0881-Flying-Fall-Damage.patch index 075299e624..8bcd7a81a2 100644 --- a/patches/server/0882-Flying-Fall-Damage.patch +++ b/patches/server/0881-Flying-Fall-Damage.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Flying Fall Damage diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 13a443d942aee77f18e91669b207d8ec54bbaf65..9851d5803caa33cbf740f1ef91d71255d9c3b018 100644 +index 26930e84a4b089ffdf504ae244701f9c039234d4..659cb241643ddf0b680582b710cea6991dc476cb 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -181,6 +181,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/0883-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0882-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch similarity index 100% rename from patches/server/0883-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch rename to patches/server/0882-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch diff --git a/patches/server/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0883-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 91% rename from patches/server/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/0883-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index 3fb38b64f2..4d37205c2d 100644 --- a/patches/server/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0883-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expose pre-collision moving velocity to diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4ea43e3fdc2b8b85c9524f9404fe3535adacc65d..ee5dfa18049bb36aa6403e6342aa56fb1bebf172 100644 +index 3f88e5e6aa260c6c05b57b19c6209357ac0bd4b1..809762ac5758996668d220f2d3b6ab004bf0e306 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1162,7 +1162,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0885-config-for-disabling-entity-tag-tags.patch b/patches/server/0884-config-for-disabling-entity-tag-tags.patch similarity index 100% rename from patches/server/0885-config-for-disabling-entity-tag-tags.patch rename to patches/server/0884-config-for-disabling-entity-tag-tags.patch diff --git a/patches/server/0886-Use-single-player-info-update-packet-on-join.patch b/patches/server/0885-Use-single-player-info-update-packet-on-join.patch similarity index 97% rename from patches/server/0886-Use-single-player-info-update-packet-on-join.patch rename to patches/server/0885-Use-single-player-info-update-packet-on-join.patch index 29689c7639..b23b39cb98 100644 --- a/patches/server/0886-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0885-Use-single-player-info-update-packet-on-join.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5e6632e3557cf43b4d71ad457d64f3be3518187e..3fe70d0c82e30b3893e24119f792d308e2f37112 100644 +index 0b83618d8ca6f5f6694ec5ba4b7635146a5be60c..ef25aea4b0bb34b638cb5036de4cf412d3e73b5a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3425,7 +3425,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0886-Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 95% rename from patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/0886-Correctly-shrink-items-during-EntityResurrectEvent.patch index 87f04dba1d..41e9439102 100644 --- a/patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0886-Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -22,7 +22,7 @@ This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 40e1caa2c070f11d7195a707ec628f40bccdeef7..15ebd6c287d90af9d4acb3529c2fb1b9394d3caf 100644 +index f1627ea97b2ce5eb00e9d30349786c3cac6b98cc..70ab1159191ca4c7e5a271221010c743957a6ed1 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1611,7 +1611,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0888-Win-Screen-API.patch b/patches/server/0887-Win-Screen-API.patch similarity index 100% rename from patches/server/0888-Win-Screen-API.patch rename to patches/server/0887-Win-Screen-API.patch diff --git a/patches/server/0889-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0888-Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 100% rename from patches/server/0889-Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/0888-Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/server/0890-Fix-force-opening-enchantment-tables.patch b/patches/server/0889-Fix-force-opening-enchantment-tables.patch similarity index 100% rename from patches/server/0890-Fix-force-opening-enchantment-tables.patch rename to patches/server/0889-Fix-force-opening-enchantment-tables.patch diff --git a/patches/server/0891-Add-Entity-Body-Yaw-API.patch b/patches/server/0890-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/server/0891-Add-Entity-Body-Yaw-API.patch rename to patches/server/0890-Add-Entity-Body-Yaw-API.patch diff --git a/patches/server/0892-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0891-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/server/0892-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/0891-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/server/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0892-Update-the-flag-when-a-captured-block-state-is-outda.patch similarity index 100% rename from patches/server/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch rename to patches/server/0892-Update-the-flag-when-a-captured-block-state-is-outda.patch diff --git a/patches/server/0894-Add-EntityFertilizeEggEvent.patch b/patches/server/0893-Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/server/0894-Add-EntityFertilizeEggEvent.patch rename to patches/server/0893-Add-EntityFertilizeEggEvent.patch diff --git a/patches/server/0895-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0894-Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 100% rename from patches/server/0895-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/0894-Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/server/0896-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0895-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/server/0896-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/0895-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/server/0897-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0896-Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/server/0897-Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/0896-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0897-Fix-advancement-triggers-for-entity-damage.patch similarity index 97% rename from patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/0897-Fix-advancement-triggers-for-entity-damage.patch index a1dddb27c4..504f2e9112 100644 --- a/patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0897-Fix-advancement-triggers-for-entity-damage.patch @@ -23,7 +23,7 @@ index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a return !this.getResponse(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 15ebd6c287d90af9d4acb3529c2fb1b9394d3caf..da89e72040e2d109eebf2d1ca0089d695394f959 100644 +index 70ab1159191ca4c7e5a271221010c743957a6ed1..b99c7e77948f2a341dd924f65bf952f8695591b4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2302,7 +2302,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0899-Fix-text-display-error-on-spawn.patch b/patches/server/0898-Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/server/0899-Fix-text-display-error-on-spawn.patch rename to patches/server/0898-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0900-Fix-inventories-returning-null-Locations.patch b/patches/server/0899-Fix-inventories-returning-null-Locations.patch similarity index 100% rename from patches/server/0900-Fix-inventories-returning-null-Locations.patch rename to patches/server/0899-Fix-inventories-returning-null-Locations.patch diff --git a/patches/server/0901-Add-Shearable-API.patch b/patches/server/0900-Add-Shearable-API.patch similarity index 100% rename from patches/server/0901-Add-Shearable-API.patch rename to patches/server/0900-Add-Shearable-API.patch diff --git a/patches/server/0902-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0901-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/server/0902-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/0901-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/server/0903-Optimize-Hoppers.patch b/patches/server/0902-Optimize-Hoppers.patch similarity index 99% rename from patches/server/0903-Optimize-Hoppers.patch rename to patches/server/0902-Optimize-Hoppers.patch index 17c49474dc..712f9a5637 100644 --- a/patches/server/0903-Optimize-Hoppers.patch +++ b/patches/server/0902-Optimize-Hoppers.patch @@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..5c42823726e70ce6c9d0121d07431548 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5981171f4960b61a448014ccaa5336bdc556ae81..cf94634cc11e368cea60a9005d11c7f7aa64fbae 100644 +index b46e1d09a949eee8c7df2c2dced24ffba17a251a..e865a887eab9c43291b73661e8748330167cc682 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1672,6 +1672,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 6b38e515a77df7fb06b41fbedaa1090b1cac78fb..a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9 100644 +index 66bb955bb338e4d1689daace28ebe295b6884554..a246e12438402dd692a5171f1e779f5f77d2f212 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -749,10 +749,16 @@ public final class ItemStack { diff --git a/patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/0903-Fix-beehives-generating-from-using-bonemeal.patch similarity index 96% rename from patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch rename to patches/server/0903-Fix-beehives-generating-from-using-bonemeal.patch index 78d80cb194..d2dec51653 100644 --- a/patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch +++ b/patches/server/0903-Fix-beehives-generating-from-using-bonemeal.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix beehives generating from using bonemeal diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9..ae39d5f386b3f307ba85b359d552a8885d232f7f 100644 +index a246e12438402dd692a5171f1e779f5f77d2f212..df38d95c38831c884cbfb4a15b8ba682f0b1ab51 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -422,6 +422,7 @@ public final class ItemStack { diff --git a/patches/server/0905-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0904-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/server/0905-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/0904-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/server/0906-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0905-Treat-sequence-violations-like-they-should-be.patch similarity index 92% rename from patches/server/0906-Treat-sequence-violations-like-they-should-be.patch rename to patches/server/0905-Treat-sequence-violations-like-they-should-be.patch index 552d683368..93c890ea58 100644 --- a/patches/server/0906-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0905-Treat-sequence-violations-like-they-should-be.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3fe70d0c82e30b3893e24119f792d308e2f37112..2cdae57a255305a16fae6ccf431aea78e2c84429 100644 +index ef25aea4b0bb34b638cb5036de4cf412d3e73b5a..b537c2d1e00eee4da9ca53c731791f46ae5013cb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2043,6 +2043,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0907-remove-duplicate-animate-packet-for-records.patch b/patches/server/0906-remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/server/0907-remove-duplicate-animate-packet-for-records.patch rename to patches/server/0906-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/server/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0907-Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 97% rename from patches/server/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/0907-Prevent-causing-expired-keys-from-impacting-new-join.patch index 6907799079..4af54190d6 100644 --- a/patches/server/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0907-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -24,7 +24,7 @@ index 0e54e8faa48751a651b953bec72543a94edf74bc..d43106eb89b14667e85cd6e8fa047d64 UPDATE_GAME_MODE((serialized, buf) -> { serialized.gameMode = GameType.byId(buf.readVarInt()); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2cdae57a255305a16fae6ccf431aea78e2c84429..533d637c634af9bf086cf3d480f219f7c2d3f34a 100644 +index b537c2d1e00eee4da9ca53c731791f46ae5013cb..294dd52de7b0b19b19bbef9bb6ec6b5b2845cdeb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -287,6 +287,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0909-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0908-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 100% rename from patches/server/0909-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/0908-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch diff --git a/patches/server/0910-Use-array-for-gamerule-storage.patch b/patches/server/0909-Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/server/0910-Use-array-for-gamerule-storage.patch rename to patches/server/0909-Use-array-for-gamerule-storage.patch diff --git a/patches/server/0911-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0910-Fix-a-couple-of-upstream-bed-issues.patch similarity index 100% rename from patches/server/0911-Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/0910-Fix-a-couple-of-upstream-bed-issues.patch diff --git a/patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0911-Fix-demo-flag-not-enabling-demo-mode.patch similarity index 100% rename from patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/0911-Fix-demo-flag-not-enabling-demo-mode.patch diff --git a/patches/server/0913-Add-Mob-Experience-reward-API.patch b/patches/server/0912-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/server/0913-Add-Mob-Experience-reward-API.patch rename to patches/server/0912-Add-Mob-Experience-reward-API.patch diff --git a/patches/server/0914-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0913-Break-redstone-on-top-of-trap-doors-early.patch similarity index 100% rename from patches/server/0914-Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/0913-Break-redstone-on-top-of-trap-doors-early.patch diff --git a/patches/server/0915-Fix-DamageCause-for-Falling-Blocks.patch b/patches/server/0914-Fix-DamageCause-for-Falling-Blocks.patch similarity index 100% rename from patches/server/0915-Fix-DamageCause-for-Falling-Blocks.patch rename to patches/server/0914-Fix-DamageCause-for-Falling-Blocks.patch diff --git a/patches/server/0916-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0915-Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/server/0916-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/0915-Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/server/0917-More-accurate-isInOpenWater-impl.patch b/patches/server/0916-More-accurate-isInOpenWater-impl.patch similarity index 100% rename from patches/server/0917-More-accurate-isInOpenWater-impl.patch rename to patches/server/0916-More-accurate-isInOpenWater-impl.patch diff --git a/patches/server/0918-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch b/patches/server/0917-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch similarity index 100% rename from patches/server/0918-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch rename to patches/server/0917-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch diff --git a/patches/server/0919-Optimise-recalcBlockCounts-for-empty-sections.patch b/patches/server/0918-Optimise-recalcBlockCounts-for-empty-sections.patch similarity index 100% rename from patches/server/0919-Optimise-recalcBlockCounts-for-empty-sections.patch rename to patches/server/0918-Optimise-recalcBlockCounts-for-empty-sections.patch diff --git a/patches/server/0920-Expand-PlayerItemMendEvent.patch b/patches/server/0919-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/server/0920-Expand-PlayerItemMendEvent.patch rename to patches/server/0919-Expand-PlayerItemMendEvent.patch diff --git a/patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0920-Refresh-ProjectileSource-for-projectiles.patch similarity index 97% rename from patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/0920-Refresh-ProjectileSource-for-projectiles.patch index 054250373f..4f6486d6cb 100644 --- a/patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/0920-Refresh-ProjectileSource-for-projectiles.patch @@ -14,7 +14,7 @@ clearing the owner. Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ee5dfa18049bb36aa6403e6342aa56fb1bebf172..92fe1b4eb9d23031476c6545f653cee37745bbf8 100644 +index 809762ac5758996668d220f2d3b6ab004bf0e306..145f9020d4d9f45fffadb9ed8ba5a2f9a13873dc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0922-Add-transient-modifier-API.patch b/patches/server/0921-Add-transient-modifier-API.patch similarity index 100% rename from patches/server/0922-Add-transient-modifier-API.patch rename to patches/server/0921-Add-transient-modifier-API.patch diff --git a/patches/server/0923-Fix-block-place-logic.patch b/patches/server/0922-Fix-block-place-logic.patch similarity index 95% rename from patches/server/0923-Fix-block-place-logic.patch rename to patches/server/0922-Fix-block-place-logic.patch index ac9628a954..52870b6cb3 100644 --- a/patches/server/0923-Fix-block-place-logic.patch +++ b/patches/server/0922-Fix-block-place-logic.patch @@ -9,7 +9,7 @@ Fix several issues when a player interact with a block: * poi can desync when the BlockPhysicsEvent is cancelled diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index e581dc10f3c805f7f8b6e4c842092609e7e1a0f8..b6b5abba349fecfecd8f3a3c237693607f9bf0ad 100644 +index daf093518f1daf598c858cfaf48357255a1fb0cf..c06e4b0683f0f125b79a4afce7daf909530d7bbf 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java @@ -130,7 +130,7 @@ public class BlockItem extends Item { @@ -22,7 +22,7 @@ index e581dc10f3c805f7f8b6e4c842092609e7e1a0f8..b6b5abba349fecfecd8f3a3c23769360 if ((entityhuman == null || !entityhuman.getAbilities().instabuild) && itemstack != ItemStack.EMPTY) { // CraftBukkit itemstack.shrink(1); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index ae39d5f386b3f307ba85b359d552a8885d232f7f..037e09bc8990036b76f75bca9bf14969ede6d6ad 100644 +index df38d95c38831c884cbfb4a15b8ba682f0b1ab51..82a1615f00b6f32c81e537f93a3d36450c5d291e 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -493,13 +493,7 @@ public final class ItemStack { diff --git a/patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0923-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch similarity index 94% rename from patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch rename to patches/server/0923-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch index 89d9eaec62..27be0d4963 100644 --- a/patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch +++ b/patches/server/0923-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 037e09bc8990036b76f75bca9bf14969ede6d6ad..f5cc647054148c1e170ca3f49128d4ea4acaf4dc 100644 +index 82a1615f00b6f32c81e537f93a3d36450c5d291e..25403f5774862ed37f3e1be05e97390d16d0b985 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -544,7 +544,11 @@ public final class ItemStack { diff --git a/patches/server/0925-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0924-Call-BlockGrowEvent-for-missing-blocks.patch similarity index 96% rename from patches/server/0925-Call-BlockGrowEvent-for-missing-blocks.patch rename to patches/server/0924-Call-BlockGrowEvent-for-missing-blocks.patch index d2a9eadeb9..7f41f99941 100644 --- a/patches/server/0925-Call-BlockGrowEvent-for-missing-blocks.patch +++ b/patches/server/0924-Call-BlockGrowEvent-for-missing-blocks.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Call BlockGrowEvent for missing blocks Call the event for pitcher crops and sniffer egg diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java -index ba94ff948ccaddc16d3452306722759c115bb90a..acaa13f195467c3ebe70677b8440a88369d41b06 100644 +index 73d9ad9e24727a81c5ff1645316aee003600c0cc..7d8907477cc2b60e48538aaf32e00c0352b926b9 100644 --- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java @@ -130,7 +130,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl diff --git a/patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0925-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch similarity index 94% rename from patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to patches/server/0925-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch index 73688ac4a3..436cde524c 100644 --- a/patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch +++ b/patches/server/0925-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f428bff49d109d2045634505ddcab90f89771a81..a6dff659356ca8ce8cf24eca8c6c1e9cb00a3979 100644 +index 16c2942ef30c8f3caccb56c85ebad660f785c070..dcd0ffc8b1567d51117bc8b811ac066bdf276bc7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -352,7 +352,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0927-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0926-fix-MapLike-spam-for-missing-key-selector.patch similarity index 100% rename from patches/server/0927-fix-MapLike-spam-for-missing-key-selector.patch rename to patches/server/0926-fix-MapLike-spam-for-missing-key-selector.patch diff --git a/patches/server/0928-Fix-sniffer-removeExploredLocation.patch b/patches/server/0927-Fix-sniffer-removeExploredLocation.patch similarity index 100% rename from patches/server/0928-Fix-sniffer-removeExploredLocation.patch rename to patches/server/0927-Fix-sniffer-removeExploredLocation.patch diff --git a/patches/server/0929-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0928-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/server/0929-Add-method-to-remove-all-active-potion-effects.patch rename to patches/server/0928-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/server/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch b/patches/server/0929-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch similarity index 100% rename from patches/server/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch rename to patches/server/0929-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch diff --git a/patches/server/0931-Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/0930-Fix-incorrect-crafting-result-amount-for-fireworks.patch similarity index 100% rename from patches/server/0931-Fix-incorrect-crafting-result-amount-for-fireworks.patch rename to patches/server/0930-Fix-incorrect-crafting-result-amount-for-fireworks.patch diff --git a/patches/server/0932-Properly-cancel-usable-items.patch b/patches/server/0931-Properly-cancel-usable-items.patch similarity index 95% rename from patches/server/0932-Properly-cancel-usable-items.patch rename to patches/server/0931-Properly-cancel-usable-items.patch index 6ac4390ff0..69da56a36f 100644 --- a/patches/server/0932-Properly-cancel-usable-items.patch +++ b/patches/server/0931-Properly-cancel-usable-items.patch @@ -34,7 +34,7 @@ index a4058e8ce468ef515236813b034f1a08d5d9589f..0357e190f6cc0724223ed705b19651d8 return enuminteractionresult; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 533d637c634af9bf086cf3d480f219f7c2d3f34a..eaa63c02fcb49f0c99842d5448ef883d37c578db 100644 +index 294dd52de7b0b19b19bbef9bb6ec6b5b2845cdeb..ac41dc96a4aee7b0bb71cbf71d3109ff05a66eff 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1955,6 +1955,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -46,7 +46,7 @@ index 533d637c634af9bf086cf3d480f219f7c2d3f34a..eaa63c02fcb49f0c99842d5448ef883d return; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index da89e72040e2d109eebf2d1ca0089d695394f959..24d68144d4ae2d34cff2b1378b352e2989cd4b76 100644 +index b99c7e77948f2a341dd924f65bf952f8695591b4..5f0d7448bca32a80d4488a4e9ad87918fedf356c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3814,6 +3814,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0933-Add-event-for-player-editing-sign.patch b/patches/server/0932-Add-event-for-player-editing-sign.patch similarity index 98% rename from patches/server/0933-Add-event-for-player-editing-sign.patch rename to patches/server/0932-Add-event-for-player-editing-sign.patch index 7d6fd88d53..0e79d7c137 100644 --- a/patches/server/0933-Add-event-for-player-editing-sign.patch +++ b/patches/server/0932-Add-event-for-player-editing-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add event for player editing sign diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index f5cc647054148c1e170ca3f49128d4ea4acaf4dc..734672b38bd9be4ff63d61febc141278f14d7065 100644 +index 25403f5774862ed37f3e1be05e97390d16d0b985..2a76c686cc1e5609db85bf21718660cf838d5899 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -523,7 +523,7 @@ public final class ItemStack { diff --git a/patches/server/0934-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0933-Only-tick-item-frames-if-players-can-see-it.patch similarity index 92% rename from patches/server/0934-Only-tick-item-frames-if-players-can-see-it.patch rename to patches/server/0933-Only-tick-item-frames-if-players-can-see-it.patch index 6b0591c84a..7a1f001a2e 100644 --- a/patches/server/0934-Only-tick-item-frames-if-players-can-see-it.patch +++ b/patches/server/0933-Only-tick-item-frames-if-players-can-see-it.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only tick item frames if players can see it In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up. diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index ff57dbd34874e020edd7074c71cfa635eab0287b..62ee13247a12723e43f114323a2ec1917835920e 100644 +index 78145f8dc50c64b1650bfa7e3ef867ca96f29ca9..937ce55812375f2952c2dab86918ab73b0f3a2d3 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -111,7 +111,7 @@ public class ServerEntity { diff --git a/patches/server/0935-Fix-cmd-permission-levels-for-command-blocks.patch b/patches/server/0934-Fix-cmd-permission-levels-for-command-blocks.patch similarity index 98% rename from patches/server/0935-Fix-cmd-permission-levels-for-command-blocks.patch rename to patches/server/0934-Fix-cmd-permission-levels-for-command-blocks.patch index fede763c81..a7a6c86d67 100644 --- a/patches/server/0935-Fix-cmd-permission-levels-for-command-blocks.patch +++ b/patches/server/0934-Fix-cmd-permission-levels-for-command-blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix cmd permission levels for command blocks diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 82ca6267bca684a8f04ca37d40816686677a852a..ec4152f7372ddad216039a489fb5d72f963b4f18 100644 +index e65d7980b7ebed60786bc31e2f8156fda3b59556..6978d0a9abc9cc5870ac5ee6308f2e9949b42fde 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java @@ -204,10 +204,29 @@ public class CommandSourceStack implements ExecutionCommandSource { EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id")); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6f7e05c6d73999613ae5980ec70b841299d021b1..8713ee8ff8a2b269c6d138e7f483a80fa2521793 100644 +index 4070311f8a9c018eef8805e3c1a024e634e57e4f..bec8d27ea6077dd06001f48ac624a3da2ad041df 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1134,6 +1134,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -120,7 +120,7 @@ index 5a9f4a022c8e7a0804543335bfe91e1328d040e6..8094c133f9e934c98eee09738220bacd } diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 0540929bd362b266295ea6770ce2fb351b614463..4aacb6675e8fe577749fa83ad471eb6e6cf930df 100644 +index ae8a42261337bf736d0cc1bbe18da2b773417ca4..471e8493622c89d44a82f42f135cb308c9e0fbfe 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java @@ -518,7 +518,7 @@ public class StructureTemplate { diff --git a/patches/server/1028-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/1027-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch similarity index 100% rename from patches/server/1028-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch rename to patches/server/1027-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch diff --git a/patches/server/1029-Restore-vanilla-entity-drops-behavior.patch b/patches/server/1028-Restore-vanilla-entity-drops-behavior.patch similarity index 98% rename from patches/server/1029-Restore-vanilla-entity-drops-behavior.patch rename to patches/server/1028-Restore-vanilla-entity-drops-behavior.patch index 422b7f4acf..aa8f7bc084 100644 --- a/patches/server/1029-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/1028-Restore-vanilla-entity-drops-behavior.patch @@ -50,7 +50,7 @@ index f4f8c60a24664b6fb33361ae830987701a0e9394..3506cd1c5960b58fe2805d9cc7ea6758 if (entityitem == null) { return null; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 96d2fa0278ada7fb706a39ca2a93f5259239229c..6f45f2fff258fa712c2637c8901453b13b34ee0b 100644 +index c71d1d2885b608c681a95b380c6d68ea9c79cdb2..92f9d55c224cd4e25060d8751ccb28a978979241 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2703,6 +2703,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -104,7 +104,7 @@ index 96d2fa0278ada7fb706a39ca2a93f5259239229c..6f45f2fff258fa712c2637c8901453b1 return this.spawnAtLocation(entityitem); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 8713ee8ff8a2b269c6d138e7f483a80fa2521793..102fa2c9ed1a749503aa22f57666a9f28940f4a8 100644 +index bec8d27ea6077dd06001f48ac624a3da2ad041df..3b37c9a440bc5d6375a653988c9011ba0e9b6e9b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -254,7 +254,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1030-Add-Structure-check-API.patch b/patches/server/1029-Add-Structure-check-API.patch similarity index 91% rename from patches/server/1030-Add-Structure-check-API.patch rename to patches/server/1029-Add-Structure-check-API.patch index 3ec45efbcd..419fe46106 100644 --- a/patches/server/1030-Add-Structure-check-API.patch +++ b/patches/server/1029-Add-Structure-check-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Structure check API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1e71506e079616028b4eaf577a5ca410ee38d5a8..44949a5a9351d8fcbae2987df77a61ec7de8d198 100644 +index 468c68eba244a1307ac283c9bf89196e28a40bf1..2a685ac009a13d86d5baf3b649830a08189efb19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -230,6 +230,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/1031-Dont-resend-blocks-on-interactions.patch b/patches/server/1030-Dont-resend-blocks-on-interactions.patch similarity index 99% rename from patches/server/1031-Dont-resend-blocks-on-interactions.patch rename to patches/server/1030-Dont-resend-blocks-on-interactions.patch index e09ac84311..cbbc069594 100644 --- a/patches/server/1031-Dont-resend-blocks-on-interactions.patch +++ b/patches/server/1030-Dont-resend-blocks-on-interactions.patch @@ -149,7 +149,7 @@ index 277555a26e8281dd1a626e572794b08cf51d00c5..aa0f09a18ea781e027ea70928b30d3e9 return false; } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 74fb996f54783948ee1351f3d437666b4d462cba..94921512e50b7a4556101772e72d822897a04165 100644 +index 7f48a350a2bddf891e54e8e5349976cda0154c48..d1effd5d7b9eb2d715c9a3e16adbef2541b1ccf2 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -457,10 +457,12 @@ public final class ItemStack { diff --git a/patches/server/1032-Keep-previous-behavior-for-setResourcePack.patch b/patches/server/1031-Keep-previous-behavior-for-setResourcePack.patch similarity index 100% rename from patches/server/1032-Keep-previous-behavior-for-setResourcePack.patch rename to patches/server/1031-Keep-previous-behavior-for-setResourcePack.patch diff --git a/patches/server/1033-properly-read-and-store-sus-effect-duration.patch b/patches/server/1032-properly-read-and-store-sus-effect-duration.patch similarity index 100% rename from patches/server/1033-properly-read-and-store-sus-effect-duration.patch rename to patches/server/1032-properly-read-and-store-sus-effect-duration.patch diff --git a/patches/server/1034-Use-correct-max-stack-size-in-crafter.patch b/patches/server/1033-Use-correct-max-stack-size-in-crafter.patch similarity index 100% rename from patches/server/1034-Use-correct-max-stack-size-in-crafter.patch rename to patches/server/1033-Use-correct-max-stack-size-in-crafter.patch diff --git a/patches/server/1035-add-more-scoreboard-API.patch b/patches/server/1034-add-more-scoreboard-API.patch similarity index 100% rename from patches/server/1035-add-more-scoreboard-API.patch rename to patches/server/1034-add-more-scoreboard-API.patch diff --git a/patches/server/1036-Improve-Registry.patch b/patches/server/1035-Improve-Registry.patch similarity index 100% rename from patches/server/1036-Improve-Registry.patch rename to patches/server/1035-Improve-Registry.patch diff --git a/patches/server/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/1036-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch similarity index 97% rename from patches/server/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch rename to patches/server/1036-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index b81e257b71..6df06e0dcc 100644 --- a/patches/server/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/1036-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch @@ -26,7 +26,7 @@ index 3fec07b250a8f145e30c8c41888e47d2a3c902e1..2ddd033e1c3a2e5c8950b93c83849192 x = to.getX(); y = to.getY(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 102fa2c9ed1a749503aa22f57666a9f28940f4a8..ff2e6351e49dfdaab9639c28d34a6435e4a03047 100644 +index 3b37c9a440bc5d6375a653988c9011ba0e9b6e9b..e914c36bede52838f47cd88b442b9cde3e4666f3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4205,7 +4205,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1038-Add-experience-points-API.patch b/patches/server/1037-Add-experience-points-API.patch similarity index 97% rename from patches/server/1038-Add-experience-points-API.patch rename to patches/server/1037-Add-experience-points-API.patch index ce9d3a7e89..8d8c28227b 100644 --- a/patches/server/1038-Add-experience-points-API.patch +++ b/patches/server/1037-Add-experience-points-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add experience points API diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 9851d5803caa33cbf740f1ef91d71255d9c3b018..d6b502308f22c92d2221bd2d03cde4cb78e82fbc 100644 +index 659cb241643ddf0b680582b710cea6991dc476cb..440ddbaf26a5d333a8cd456c501cbc9a759d12f1 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -1833,7 +1833,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/1039-Add-missing-InventoryType.patch b/patches/server/1038-Add-missing-InventoryType.patch similarity index 100% rename from patches/server/1039-Add-missing-InventoryType.patch rename to patches/server/1038-Add-missing-InventoryType.patch diff --git a/patches/server/1040-Add-drops-to-shear-events.patch b/patches/server/1039-Add-drops-to-shear-events.patch similarity index 100% rename from patches/server/1040-Add-drops-to-shear-events.patch rename to patches/server/1039-Add-drops-to-shear-events.patch diff --git a/patches/server/1041-Add-PlayerShieldDisableEvent.patch b/patches/server/1040-Add-PlayerShieldDisableEvent.patch similarity index 97% rename from patches/server/1041-Add-PlayerShieldDisableEvent.patch rename to patches/server/1040-Add-PlayerShieldDisableEvent.patch index 8bdf29b42d..9d5dd42eea 100644 --- a/patches/server/1041-Add-PlayerShieldDisableEvent.patch +++ b/patches/server/1040-Add-PlayerShieldDisableEvent.patch @@ -33,7 +33,7 @@ index c81c72bf1027fcbaac67808fbcf6e0af112176bc..42e2be9286b75a1d34845f303ffc65e9 } } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index d6b502308f22c92d2221bd2d03cde4cb78e82fbc..2668c3b6f752d5d8bc45f4e6e52c20cc6a36a957 100644 +index 440ddbaf26a5d333a8cd456c501cbc9a759d12f1..54a77399c1c42a1bcdbb4fd2cc09469a4838bd7c 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -979,7 +979,7 @@ public abstract class Player extends LivingEntity { diff --git a/patches/server/1042-Add-HiddenPotionEffect-API.patch b/patches/server/1041-Add-HiddenPotionEffect-API.patch similarity index 100% rename from patches/server/1042-Add-HiddenPotionEffect-API.patch rename to patches/server/1041-Add-HiddenPotionEffect-API.patch diff --git a/patches/server/1043-Correctly-check-if-bucket-dispenses-will-succeed-for.patch b/patches/server/1042-Correctly-check-if-bucket-dispenses-will-succeed-for.patch similarity index 100% rename from patches/server/1043-Correctly-check-if-bucket-dispenses-will-succeed-for.patch rename to patches/server/1042-Correctly-check-if-bucket-dispenses-will-succeed-for.patch diff --git a/patches/server/1044-fix-ItemMeta-removing-CustomModelData.patch b/patches/server/1043-fix-ItemMeta-removing-CustomModelData.patch similarity index 100% rename from patches/server/1044-fix-ItemMeta-removing-CustomModelData.patch rename to patches/server/1043-fix-ItemMeta-removing-CustomModelData.patch diff --git a/patches/server/1045-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/1044-Validate-ResourceLocation-in-NBT-reading.patch similarity index 100% rename from patches/server/1045-Validate-ResourceLocation-in-NBT-reading.patch rename to patches/server/1044-Validate-ResourceLocation-in-NBT-reading.patch diff --git a/patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/1045-Properly-handle-experience-dropping-on-block-break.patch similarity index 100% rename from patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch rename to patches/server/1045-Properly-handle-experience-dropping-on-block-break.patch diff --git a/patches/server/1047-Fixup-NamespacedKey-handling.patch b/patches/server/1046-Fixup-NamespacedKey-handling.patch similarity index 100% rename from patches/server/1047-Fixup-NamespacedKey-handling.patch rename to patches/server/1046-Fixup-NamespacedKey-handling.patch