diff --git a/patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch index e48a115689..f2c1454094 100644 --- a/patches/server/0751-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0751-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..67bda174adb74e6176e81f986382b3bbbfe6b95f 100644 +index 396cbd1a0a94e913475bad65faf8e871b7105895..41fae37f785191fa3314fcc5724c9b31ef953816 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 0 || this.entity instanceof AbstractArrow) { -+ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position ++ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position to fix first-tick teleports long k = this.positionCodec.encodeX(vec3d); long l = this.positionCodec.encodeY(vec3d); long i1 = this.positionCodec.encodeZ(vec3d); diff --git a/patches/server/0754-Custom-Potion-Mixes.patch b/patches/server/0754-Custom-Potion-Mixes.patch index c6c5fb5760..27fa51fef0 100644 --- a/patches/server/0754-Custom-Potion-Mixes.patch +++ b/patches/server/0754-Custom-Potion-Mixes.patch @@ -32,19 +32,19 @@ index 0000000000000000000000000000000000000000..7ea357ac2f3a93db4ebdf24b5072be7d + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4f43e306d70bc733ceba2b375c8732f330abc0e4..d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed 100644 +index 15828a88b8b31f4b622a1395eda5cc195d616479..e5dccd330cbf3301a60b65453e87a4005f954716 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2213,6 +2213,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> POTION_MIXES = Lists.newArrayList(); private static final List> CONTAINER_MIXES = Lists.newArrayList(); -+ private static final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap CUSTOM_MIXES = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>(); // Paper ++ private static final it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap CUSTOM_MIXES = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>(); // Paper - Custom Potion Mixes private static final List ALLOWED_CONTAINERS = Lists.newArrayList(); private static final Predicate ALLOWED_CONTAINER = (stack) -> { for(Ingredient ingredient : ALLOWED_CONTAINERS) { @@ -73,7 +73,7 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b public static boolean isIngredient(ItemStack stack) { - return isContainerIngredient(stack) || isPotionIngredient(stack); -+ return isContainerIngredient(stack) || isPotionIngredient(stack) || isCustomIngredient(stack); // Paper ++ return isContainerIngredient(stack) || isPotionIngredient(stack) || isCustomIngredient(stack); // Paper - Custom Potion Mixes } protected static boolean isContainerIngredient(ItemStack stack) { @@ -81,11 +81,11 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b } public static boolean hasMix(ItemStack input, ItemStack ingredient) { -+ // Paper start ++ // Paper start - Custom Potion Mixes + if (hasCustomMix(input, ingredient)) { + return true; + } -+ // Paper end ++ // Paper end - Custom Potion Mixes if (!ALLOWED_CONTAINER.test(input)) { return false; } else { @@ -93,13 +93,13 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b public static ItemStack mix(ItemStack ingredient, ItemStack input) { if (!input.isEmpty()) { -+ // Paper start ++ // Paper start - Custom Potion Mixes + for (var mix : CUSTOM_MIXES.values()) { + if (mix.input().test(input) && mix.ingredient().test(ingredient)) { + return mix.result().copy(); + } + } -+ // Paper end ++ // Paper end - Custom Potion Mixes Potion potion = PotionUtils.getPotion(input); Item item = input.getItem(); @@ -107,7 +107,7 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b return input; } -+ // Paper start ++ // Paper start - Custom Potion Mixes + public static boolean isCustomIngredient(ItemStack stack) { + for (var mix : CUSTOM_MIXES.values()) { + if (mix.ingredient().test(stack)) { @@ -153,13 +153,13 @@ index 25e909b90293855321b8f05ab3488bad8c064853..ef798adc296ae1595cfcd33fed5aa71b + CUSTOM_MIXES.clear(); + bootStrap(); + } -+ // Paper end ++ // Paper end - Custom Potion Mixes + public static void bootStrap() { addContainer(Items.POTION); addContainer(Items.SPLASH_POTION); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java -index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f0a82b441 100644 +index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..bc01481ac5990ad1cfd1def5a16dd0ed2f9de8c9 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java @@ -341,7 +341,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements @@ -167,19 +167,19 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f @Override public boolean canPlaceItem(int slot, ItemStack stack) { - return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE)) && this.getItem(slot).isEmpty()); -+ return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack)) && this.getItem(slot).isEmpty()); // Paper ++ return slot == 3 ? PotionBrewing.isIngredient(stack) : (slot == 4 ? stack.is(Items.BLAZE_POWDER) : (stack.is(Items.POTION) || stack.is(Items.SPLASH_POTION) || stack.is(Items.LINGERING_POTION) || stack.is(Items.GLASS_BOTTLE) || PotionBrewing.isCustomInput(stack)) && this.getItem(slot).isEmpty()); // Paper - Custom Potion Mixes } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 316a901f5d943209d94ba6631cfaa9be43fdae3b..536057656dfb7af96977b692b854e5a4fff98dd9 100644 +index 546b510e8ed683007c1dbcc1ab66374ce0944e70..ead1161020064ceea6d04857de5bdbce460fd59e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -304,6 +304,7 @@ public final class CraftServer implements Server { private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper public static Exception excessiveVelEx; // Paper - Velocity warnings private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper -+ private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper ++ private final CraftPotionBrewer potionBrewer = new CraftPotionBrewer(); // Paper - Custom Potion Mixes static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); @@ -188,7 +188,7 @@ index 316a901f5d943209d94ba6631cfaa9be43fdae3b..536057656dfb7af96977b692b854e5a4 CraftRegistry.setMinecraftRegistry(console.registryAccess()); - Potion.setPotionBrewer(new CraftPotionBrewer()); -+ Potion.setPotionBrewer(potionBrewer); // Paper ++ Potion.setPotionBrewer(potionBrewer); // Paper - Custom Potion Mixes // Ugly hack :( if (!Main.useConsole) { diff --git a/patches/server/0755-Force-close-world-loading-screen.patch b/patches/server/0755-Force-close-world-loading-screen.patch index e3165b65ba..caf53da81b 100644 --- a/patches/server/0755-Force-close-world-loading-screen.patch +++ b/patches/server/0755-Force-close-world-loading-screen.patch @@ -10,7 +10,7 @@ so we do not need that. The client only needs the chunk it is currently in to be loaded to close the loading screen, so we just send an empty one. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..e79748938395c79fcb6c2c164e35a191781b7c2f 100644 +index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..8bf39ebc7c04e54fc46ca267af06a3a84b240fbb 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -398,6 +398,16 @@ public abstract class PlayerList { @@ -26,7 +26,7 @@ index 1038bdb761c4b413cb92e08aa7ef634b2e8237d4..e79748938395c79fcb6c2c164e35a191 + worldserver1.getLightEngine(), (java.util.BitSet)null, (java.util.BitSet) null, false) + ); + } -+ // Paper end ++ // Paper end - Send empty chunk } private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) { // Paper end diff --git a/patches/server/0756-Fix-falling-block-spawn-methods.patch b/patches/server/0756-Fix-falling-block-spawn-methods.patch index 61dad3fbfe..8d1712a5cb 100644 --- a/patches/server/0756-Fix-falling-block-spawn-methods.patch +++ b/patches/server/0756-Fix-falling-block-spawn-methods.patch @@ -11,7 +11,7 @@ Restores the API behavior from previous versions of the server public net.minecraft.world.entity.item.FallingBlockEntity (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..719d2ac5907b4c96828460daae9f254c2cd3e840 100644 +index d41cd3075a5f59f271ddee7009a3ed26a34d3041..3cf9aafb3ce75c0340605fa29c2a55ff237b843b 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 { @@ -24,7 +24,7 @@ index d41cd3075a5f59f271ddee7009a3ed26a34d3041..719d2ac5907b4c96828460daae9f254c + entity.time = 1; + + this.world.addFreshEntity(entity, SpawnReason.CUSTOM); -+ // Paper end ++ // Paper end - restore API behavior for spawning falling blocks return (FallingBlock) entity.getBukkitEntity(); } @@ -38,7 +38,7 @@ index d41cd3075a5f59f271ddee7009a3ed26a34d3041..719d2ac5907b4c96828460daae9f254c + entity.time = 1; + + this.world.addFreshEntity(entity, SpawnReason.CUSTOM); -+ // Paper end ++ // Paper end - restore API behavior for spawning falling blocks return (FallingBlock) entity.getBukkitEntity(); } diff --git a/patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch index 8826989056..03471ecb7f 100644 --- a/patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch +++ b/patches/server/0758-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch @@ -15,14 +15,14 @@ piercing arrows to avoid duplicate damage being applied. protected net.minecraft.world.entity.projectile.Projectile hitCancelled diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index ae4319c2532855315bc45995a39d7eb98961b939..6272b0e1e332789b983a486ee25226e2a1c9fdda 100644 +index ae4319c2532855315bc45995a39d7eb98961b939..2b2ff2a187410ef9431b0396c05935ffd17fd108 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -297,6 +297,19 @@ public abstract class AbstractArrow extends Projectile { } } -+ // Paper start ++ // Paper start - Fix cancelling ProjectileHitEvent for piercing arrows + @Override + public void preOnHit(HitResult hitResult) { + super.preOnHit(hitResult); @@ -33,7 +33,7 @@ index ae4319c2532855315bc45995a39d7eb98961b939..6272b0e1e332789b983a486ee25226e2 + this.piercingIgnoreEntityIds.add(entityHitResult.getEntity().getId()); + } + } -+ // Paper end ++ // Paper end - Fix cancelling ProjectileHitEvent for piercing arrows + private boolean shouldFall() { return this.inGround && this.level().noCollision((new AABB(this.position(), this.position())).inflate(0.06D)); diff --git a/patches/server/0759-More-Projectile-API.patch b/patches/server/0759-More-Projectile-API.patch index 923c8570a8..1bbc5e7a98 100644 --- a/patches/server/0759-More-Projectile-API.patch +++ b/patches/server/0759-More-Projectile-API.patch @@ -20,7 +20,7 @@ public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecr Co-authored-by: Nassim Jahnke diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5d386e0ad 100644 +index 40307233e5bc67d538f580bc514a033c64d1316a..3f256b87cb4d5ecb745a949e6714682be805e72f 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java @@ -100,6 +100,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie @@ -40,7 +40,7 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5 showParticles = this.makeAreaOfEffectCloud(itemstack, potionregistry, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper } else { - showParticles = this.applySplash(list, hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper -+ showParticles = this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper - nullable hitResult ++ showParticles = this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper - More projectile API } } @@ -49,7 +49,7 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5 } - private boolean applySplash(List list, @Nullable Entity entity, HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean -+ private boolean applySplash(List list, @Nullable Entity entity, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & nullable hitResult ++ private boolean applySplash(List list, @Nullable Entity entity, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & More projectile API AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D); List list1 = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb); Map affected = new HashMap(); // CraftBukkit @@ -58,19 +58,19 @@ index 40307233e5bc67d538f580bc514a033c64d1316a..2886f4437d8361cde39922b87e9cc8e5 } - private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean -+ private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & nullable hitResult ++ private boolean makeAreaOfEffectCloud(ItemStack itemstack, Potion potionregistry, @Nullable HitResult position) { // CraftBukkit - Pass MovingObjectPosition // Paper - return boolean & More projectile API AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ()); Entity entity = this.getOwner(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java -index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..2c376687349825833e6d9a5ca92ce6afb98c36a3 100644 +index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..c1c52f4fc5f900fac4098e5e37c52dfc4e82b8bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java @@ -17,4 +17,65 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti @Override public void setBounce(boolean doesBounce) {} -+ // Paper start ++ // Paper start - More projectile API + @Override + public boolean hasLeftShooter() { + return this.getHandle().leftOwner; @@ -130,7 +130,7 @@ index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..2c376687349825833e6d9a5ca92ce6af + public java.util.UUID getOwnerUniqueId() { + return this.getHandle().ownerUUID; + } -+ // Paper end ++ // Paper end - More projectile API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 762c395e45a681a11f3fe9d10e7f0ba310786e80..6d2fe30742f8b41d53dd2cbff120fcc042ea0e0c 100644 diff --git a/patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch index b2499e69cc..bac78b77ff 100644 --- a/patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch +++ b/patches/server/0760-Fix-swamp-hut-cat-generation-deadlock.patch @@ -10,7 +10,7 @@ indefinitely. Instead of using the world state, we use the already supplied ServerLevelAccessor which will always have the chunk available. diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 534630b0161c8d869e49e7a59572193550be0671..a744cb70ac719eae376fb2ab2271e4f8ac7b12f2 100644 +index 534630b0161c8d869e49e7a59572193550be0671..7dfd2b17e82a80683af28779d0bd8f64a909c3b6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -364,7 +364,7 @@ public class Cat extends TamableAnimal implements VariantHolder { @@ -18,12 +18,12 @@ index 534630b0161c8d869e49e7a59572193550be0671..a744cb70ac719eae376fb2ab2271e4f8 ServerLevel worldserver = world.getLevel(); - if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK).isValid()) { -+ if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK, world).isValid()) { // Paper - fix deadlock ++ if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK, world).isValid()) { // Paper - Fix swamp hut cat generation deadlock this.setVariant((CatVariant) BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.ALL_BLACK)); this.setPersistenceRequired(); } diff --git a/src/main/java/net/minecraft/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java -index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925f05ab354 100644 +index b33a015b834873f279bf33a64974ef440a37df79..b59581b92aed0bc1b09008c695b0b112c3e65743 100644 --- a/src/main/java/net/minecraft/world/level/StructureManager.java +++ b/src/main/java/net/minecraft/world/level/StructureManager.java @@ -44,7 +44,12 @@ public class StructureManager { @@ -31,12 +31,12 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925 public List startsForStructure(ChunkPos pos, Predicate predicate) { - Map map = this.level.getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); -+ // Paper start ++ // Paper start - Fix swamp hut cat generation deadlock + return this.startsForStructure(pos, predicate, null); + } + public List startsForStructure(ChunkPos pos, Predicate predicate, @Nullable ServerLevelAccessor levelAccessor) { + Map map = (levelAccessor == null ? this.level : levelAccessor).getChunk(pos.x, pos.z, ChunkStatus.STRUCTURE_REFERENCES).getAllReferences(); -+ // Paper end ++ // Paper end - Fix swamp hut cat generation deadlock ImmutableList.Builder builder = ImmutableList.builder(); for(Map.Entry entry : map.entrySet()) { @@ -44,11 +44,11 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925 } public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey structureTag) { -+ // Paper start ++ // Paper start - Fix swamp hut cat generation deadlock + return this.getStructureWithPieceAt(pos, structureTag, null); + } + public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey structureTag, @Nullable ServerLevelAccessor levelAccessor) { -+ // Paper end ++ // Paper end - Fix swamp hut cat generation deadlock Registry registry = this.registryAccess().registryOrThrow(Registries.STRUCTURE); for(StructureStart structureStart : this.startsForStructure(new ChunkPos(pos), (structure) -> { @@ -56,7 +56,7 @@ index b33a015b834873f279bf33a64974ef440a37df79..09c85ed428b8eaf51f8b3c6e45cce925 return reference.is(structureTag); }).orElse(false); - })) { -+ }, levelAccessor)) { // Paper ++ }, levelAccessor)) { // Paper - Fix swamp hut cat generation deadlock if (this.structureHasPieceAt(pos, structureStart)) { return structureStart; } diff --git a/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 3d739ee7ff..4a00876bf8 100644 --- a/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0761-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,18 +7,18 @@ 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..ab64ffed96e0f8a3293254105d63b934133407e8 100644 +index 554b0cd2f61005b57e1b0f68730354a8753fb0b7..33356ffc634549560adc24c40e58152e5482949d 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 this.disconnect(Component.translatable("multiplayer.disconnect.invalid_vehicle_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_VEHICLE_MOVEMENT); // Paper - kick event cause } else { Entity entity = this.player.getRootVehicle(); -+ // Paper start ++ // Paper start - Don't allow vehicle movement from players while teleporting + if (this.awaitingPositionFromClient != null || this.player.isImmobile() || entity.isRemoved()) { + return; + } -+ // Paper end ++ // Paper end - Don't allow vehicle movement from players while teleporting if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { ServerLevel worldserver = this.player.serverLevel(); diff --git a/patches/server/0765-Fix-saving-in-unloadWorld.patch b/patches/server/0765-Fix-saving-in-unloadWorld.patch index 0110c67e88..af839d74d6 100644 --- a/patches/server/0765-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0765-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 536057656dfb7af96977b692b854e5a4fff98dd9..f9b994a024be198a26d0213b9c98fc46987549a4 100644 +index ead1161020064ceea6d04857de5bdbce460fd59e..8802d28c71d3ebc74690ad5c53c7dd77436e1a9f 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 { @@ -14,7 +14,7 @@ index 536057656dfb7af96977b692b854e5a4fff98dd9..f9b994a024be198a26d0213b9c98fc46 try { if (save) { - handle.save(null, true, true); -+ handle.save(null, true, false); // Paper - don't disable saving ++ handle.save(null, true, false); // Paper - Fix saving in unloadWorld } handle.getChunkSource().close(save); diff --git a/patches/server/0766-Buffer-OOB-setBlock-calls.patch b/patches/server/0766-Buffer-OOB-setBlock-calls.patch index c3098333e9..51a5d1943e 100644 --- a/patches/server/0766-Buffer-OOB-setBlock-calls.patch +++ b/patches/server/0766-Buffer-OOB-setBlock-calls.patch @@ -13,14 +13,14 @@ we'll also only gen a trace for the first one, I see no real pressing need to generate more, given that that would *massively* negate this patch otherwise diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b51427aff2 100644 +index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..1c2ec978f923521322aaec59b4e88d26d656b6cd 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java @@ -296,6 +296,7 @@ public class WorldGenRegion implements WorldGenLevel { } } -+ private boolean hasSetFarWarned = false; // Paper ++ private boolean hasSetFarWarned = false; // Paper - Buffer OOB setBlock calls @Override public boolean ensureCanWrite(BlockPos pos) { int i = SectionPos.blockToSectionCoord(pos.getX()); @@ -28,7 +28,7 @@ index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b5 return true; } else { -+ // Paper start ++ // Paper start - Buffer OOB setBlock calls + if (!hasSetFarWarned) { Util.logAndPauseIfInIde("Detected setBlock in a far chunk [" + i + ", " + j + "], pos: " + pos + ", status: " + this.generatingStatus + (this.currentlyGenerating == null ? "" : ", currently generating: " + (String) this.currentlyGenerating.get())); + hasSetFarWarned = true; @@ -36,7 +36,7 @@ index 3f5ba2b2f01d8cc07c4200a60b1b08cb584b170e..49c7825156afd053df1b7721a63070b5 + io.papermc.paper.util.TraceUtil.dumpTraceForThread("far setBlock call"); + } + } -+ // Paper end ++ // Paper end - Buffer OOB setBlock calls return false; } } diff --git a/patches/server/0767-Add-TameableDeathMessageEvent.patch b/patches/server/0767-Add-TameableDeathMessageEvent.patch index 53da18382c..58ea5cd5d1 100644 --- a/patches/server/0767-Add-TameableDeathMessageEvent.patch +++ b/patches/server/0767-Add-TameableDeathMessageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TameableDeathMessageEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index 8f085654f3b9c540346fe4e56c71d572da7a897c..1999cda5876bb12283d8c91a1b3e737c0d27bc38 100644 +index 8f085654f3b9c540346fe4e56c71d572da7a897c..4d893c445af2b6dc74d5ad731b69eb5a488817b4 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -197,7 +197,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { @@ -13,12 +13,12 @@ index 8f085654f3b9c540346fe4e56c71d572da7a897c..1999cda5876bb12283d8c91a1b3e737c public void die(DamageSource damageSource) { if (!this.level().isClientSide && this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { - this.getOwner().sendSystemMessage(this.getCombatTracker().getDeathMessage()); -+ // Paper start - TameableDeathMessageEvent ++ // Paper start - Add TameableDeathMessageEvent + io.papermc.paper.event.entity.TameableDeathMessageEvent event = new io.papermc.paper.event.entity.TameableDeathMessageEvent((org.bukkit.entity.Tameable) getBukkitEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(this.getCombatTracker().getDeathMessage())); + if (event.callEvent()) { + this.getOwner().sendSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.deathMessage())); + } -+ // Paper end - TameableDeathMessageEvent ++ // Paper end - Add TameableDeathMessageEvent } super.die(damageSource); diff --git a/patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch index 34ba74f62d..c6786496e5 100644 --- a/patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0768-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -131,7 +131,7 @@ index 6f452605e9dc9ebd9980eae9fdeea34417a37a88..2c60a3765d22909e73b660492410ab84 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index 2886f4437d8361cde39922b87e9cc8e5d386e0ad..2f80d484ad523860322483cebe92cf7cd8cfad22 100644 +index 3f256b87cb4d5ecb745a949e6714682be805e72f..d945c0a7b8ba87301e12b49f859e6fbe65de04f3 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java @@ -306,7 +306,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie diff --git a/patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch index bfb472a6ae..dd3d2ae37b 100644 --- a/patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch +++ b/patches/server/0769-fix-player-loottables-running-when-mob-loot-gamerule.patch @@ -5,21 +5,21 @@ Subject: [PATCH] fix player loottables running when mob loot gamerule is false diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7c8f5ae6bd83bd08403738dcd364b0af06fb1a9b..1f7b13806ffbcf81df67a02129aa2c07dfc7b8f5 100644 +index 7c8f5ae6bd83bd08403738dcd364b0af06fb1a9b..1695e7d3e456bb3539fb37d943e8cf45489f0762 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -924,12 +924,14 @@ public class ServerPlayer extends Player { } } } -+ if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - preserve this check from vanilla ++ if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - fix player loottables running when mob loot gamerule is false // SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule) this.dropFromLootTable(damageSource, this.lastHurtByPlayerTime > 0); for (org.bukkit.inventory.ItemStack item : this.drops) { loot.add(item); } this.drops.clear(); // SPIGOT-5188: make sure to clear -+ } // Paper ++ } // Paper - fix player loottables running when mob loot gamerule is false Component defaultMessage = this.getCombatTracker().getDeathMessage(); diff --git a/patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch index 8bc434041e..0bbddb289c 100644 --- a/patches/server/0770-Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/0770-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..8284b150bbca66fc536418ec66bf93fb205cdcc5 100644 +index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..cc90b96ae9709c7f3997dc1524bcf0feeb00c864 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 @@ -14,7 +14,7 @@ index 2f0c5e1b4b2dfb8006447c296170e80a97b36562..8284b150bbca66fc536418ec66bf93fb public boolean startRiding(Entity entity, boolean force) { - if (entity == this.vehicle) { -+ if (entity == this.vehicle || entity.level != this.level) { // Paper - check level ++ if (entity == this.vehicle || entity.level != this.level) { // Paper - Ensure entity passenger world matches ridden entity (bad plugins) return false; } else if (!entity.couldAcceptPassenger()) { return false; diff --git a/patches/server/0771-Guard-against-invalid-entity-positions.patch b/patches/server/0771-Guard-against-invalid-entity-positions.patch index 15d3e47294..7549ffa9b5 100644 --- a/patches/server/0771-Guard-against-invalid-entity-positions.patch +++ b/patches/server/0771-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 8284b150bbca66fc536418ec66bf93fb205cdcc5..2c3193fdfb0e4b4a47cceb2da8b3fe85bd1e6848 100644 +index cc90b96ae9709c7f3997dc1524bcf0feeb00c864..ab409aae677a5ed4ca50113e88397c4543373df8 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/0773-Allow-to-change-the-podium-for-the-EnderDragon.patch b/patches/server/0773-Allow-changing-the-EnderDragon-podium.patch similarity index 86% rename from patches/server/0773-Allow-to-change-the-podium-for-the-EnderDragon.patch rename to patches/server/0773-Allow-changing-the-EnderDragon-podium.patch index 8db49ef839..b85821e447 100644 --- a/patches/server/0773-Allow-to-change-the-podium-for-the-EnderDragon.patch +++ b/patches/server/0773-Allow-changing-the-EnderDragon-podium.patch @@ -1,21 +1,21 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Doc Date: Sun, 3 Apr 2022 11:31:42 -0400 -Subject: [PATCH] Allow to change the podium for the EnderDragon +Subject: [PATCH] Allow changing the EnderDragon podium diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355cdf510b2 100644 +index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..36893dac635f676ca447133a1bce32429347e4a5 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -103,6 +103,10 @@ public class EnderDragon extends Mob implements Enemy { private final int[] nodeAdjacency; private final BinaryHeap openSet; private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource() -+ // Paper start - add var for save custom podium ++ // Paper start - Allow changing the EnderDragon podium + @Nullable + private BlockPos podium; -+ // Paper end ++ // Paper end - Allow changing the EnderDragon podium public EnderDragon(EntityType entitytypes, Level world) { super(EntityType.ENDER_DRAGON, world); @@ -23,7 +23,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355 return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D); } -+ // Paper start ++ // Paper start - Allow changing the EnderDragon podium + public BlockPos getPodium() { + if (this.podium == null) { + return EndPodiumFeature.getLocation(this.getFightOrigin()); @@ -34,7 +34,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355 + public void setPodium(@Nullable BlockPos blockPos) { + this.podium = blockPos; + } -+ // Paper end ++ // Paper end - Allow changing the EnderDragon podium + @Override public boolean isFlapping() { @@ -44,7 +44,7 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355 } } else { - BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); -+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - Allow changing the EnderDragon podium double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D); d0 = (double) segmentOffset / d1; @@ -53,12 +53,12 @@ index 2ede6678a5fe6e1280ee4918b69302f483cc50ff..4bcbfe3f95efd5d8ec2d2d7c66c4c355 } } else { - BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); -+ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - Allow changing the EnderDragon podium f1 = Math.max((float) Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0F, 1.0F); float f3 = 6.0F / f1; diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java -index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c51027dc02 100644 +index f4028b6890fd094360a33403728588380111204d..d6ec0583dbaca95eb6a6444923cc1311a9753825 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java @@ -32,7 +32,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance { @@ -66,12 +66,12 @@ index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c5 ++this.time; if (this.targetLocation == null) { - BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); -+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium this.targetLocation = Vec3.atBottomCenterOf(blockPos); } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java -index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3b44e488f 100644 +index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..bd7be8a5a24f1328dde28ae4a66823c12110fa02 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java @@ -54,7 +54,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { @@ -79,12 +79,12 @@ index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3 private void findNewTarget() { if (this.currentPath != null && this.currentPath.isDone()) { - BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); -+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive(); if (this.dragon.getRandom().nextInt(i + 3) == 0) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH); diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java -index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a134d9152 100644 +index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..e161bfb06beeada4987272d01a0f140069b37951 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java @@ -52,7 +52,7 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance { @@ -92,12 +92,12 @@ index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a if (this.currentPath == null || this.currentPath.isDone()) { int i = this.dragon.findClosestNode(); - BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); -+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium Player player = this.dragon.level().getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); int j; if (player != null) { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java -index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb34cad6d7 100644 +index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..24db7fafd31277eb1b82eac4a97b2f979c1d3816 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java @@ -39,7 +39,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance { @@ -105,12 +105,12 @@ index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb public void doServerTick() { if (this.targetLocation == null) { - this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); -+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium ++ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - Allow changing the EnderDragon podium } if (this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()) < 1.0D) { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java -index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b095a3370b 100644 +index 1290090f855840bf64bf3a7ba93e3cb036630dcc..792ff77090fa582a7ffcb7b8c394badfa7586126 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java @@ -24,7 +24,7 @@ public class DragonTakeoffPhase extends AbstractDragonPhaseInstance { @@ -118,12 +118,12 @@ index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b0 public void doServerTick() { if (!this.firstTick && this.currentPath != null) { - BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); -+ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0D)) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java -index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13e8647ec8 100644 +index 25b3d889a1742c347e60725df8d6f6c1cee264c7..7b7b89e67d53ed70efae714192c5fa32977f3d9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -73,4 +73,22 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem @@ -131,7 +131,7 @@ index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13 return this.getHandle().dragonDeathTime; } + -+ // Paper start ++ // Paper start - Allow changing the EnderDragon podium + @Override + public org.bukkit.Location getPodium() { + net.minecraft.core.BlockPos blockPosOrigin = this.getHandle().getPodium(); @@ -147,5 +147,5 @@ index 25b3d889a1742c347e60725df8d6f6c1cee264c7..6eae6efa35a1ccc224e2f311e25ecf13 + this.getHandle().setPodium(io.papermc.paper.util.MCUtil.toBlockPos(location)); + } + } -+ // Paper end ++ // Paper end - Allow changing the EnderDragon podium } diff --git a/patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch index 57d912648d..07010b5d63 100644 --- a/patches/server/0774-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch +++ b/patches/server/0774-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..52c389472e013e658344496218689465350bf8a3 100644 +index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..0540929bd362b266295ea6770ce2fb351b614463 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 { @@ -21,7 +21,7 @@ index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..52c389472e013e658344496218689465 + if (!(world instanceof net.minecraft.world.level.WorldGenLevel)) { + Clearable.tryClear(tileentity); + } -+ // Paper end ++ // Paper end - Fix NBT pieces overriding a block entity during worldgen deadlock world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20); } // CraftBukkit start @@ -34,7 +34,7 @@ index b2139e5f7a051cdea2a7ed6e98ba8be7ce1113cc..52c389472e013e658344496218689465 + if (!(world instanceof net.minecraft.world.level.WorldGenLevel)) { + tileentity.setChanged(); + } -+ // Paper end ++ // Paper end - Fix NBT pieces overriding a block entity during worldgen deadlock } } } diff --git a/patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch index ad6effe202..6cd473f047 100644 --- a/patches/server/0776-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0776-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 ab64ffed96e0f8a3293254105d63b934133407e8..15198891975856e54bb9fcf1eb8a2838bc107da5 100644 +index 33356ffc634549560adc24c40e58152e5482949d..5a2f8806366e3a423e77e882dbc9068ad64ff538 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 @@ -13,12 +13,12 @@ index ab64ffed96e0f8a3293254105d63b934133407e8..15198891975856e54bb9fcf1eb8a2838 if (this.player.level().isLoaded(blockposition)) { - BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); -+ // Paper start ++ // Paper start - Prevent tile entity copies loading chunks + BlockEntity tileentity = null; + if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.serverLevel().isLoadedAndInBounds(blockposition)) { + tileentity = this.player.level().getBlockEntity(blockposition); + } -+ // Paper end ++ // Paper end - Prevent tile entity copies loading chunks if (tileentity != null) { tileentity.saveToItem(itemstack); diff --git a/patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch index 4044d54726..181baff8f4 100644 --- a/patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch +++ b/patches/server/0777-Use-username-instead-of-display-name-in-PlayerList-g.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use username instead of display name in diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e79748938395c79fcb6c2c164e35a191781b7c2f..cd527e612a8a84451f9ef1fa0fcc900e16f54da1 100644 +index 8bf39ebc7c04e54fc46ca267af06a3a84b240fbb..57fa7cdcb2feb959cb413d4675fca11544236628 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1449,7 +1449,7 @@ public abstract class PlayerList { diff --git a/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch index 5a24996368..a223a69457 100644 --- a/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0778-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index e69a0121c8644d831cbb8bc1c95d9219d1c343da..4d7124ae7cefcc8c65bf74ac9d3c103fe6817c42 100644 +index e69a0121c8644d831cbb8bc1c95d9219d1c343da..7d33ce8d68ca55e0fd37d2d4e3c78a436f17f229 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -304,7 +304,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -13,12 +13,12 @@ index e69a0121c8644d831cbb8bc1c95d9219d1c343da..4d7124ae7cefcc8c65bf74ac9d3c103f //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init if (dedicatedserverproperties.announcePlayerAchievements != null) { - ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this); -+ ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, null); // Paper ++ ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, null); // Paper - Pass ServerLevel for gamerule callbacks } 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 15198891975856e54bb9fcf1eb8a2838bc107da5..52efebcc440253e84640be3c24c2dcd76c2a5b9a 100644 +index 5a2f8806366e3a423e77e882dbc9068ad64ff538..9ce9390291988e3110e228e83e0754e5529de800 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 @@ -26,12 +26,12 @@ index 15198891975856e54bb9fcf1eb8a2838bc107da5..52efebcc440253e84640be3c24c2dcd7 if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper - ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server); -+ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // Paper ++ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // Paper - Pass ServerLevel for gamerule callbacks } } break; diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f2297147a 100644 +index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..dd03426943dd380cefe12afe3e63c3180a22ec4f 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java @@ -52,7 +52,7 @@ public class GameRules { @@ -39,7 +39,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f public static final GameRules.Key RULE_REDUCEDDEBUGINFO = GameRules.register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { int i = gamerules_gameruleboolean.get() ? 22 : 23; - Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); -+ Iterator iterator = minecraftserver.players().iterator(); // Paper ++ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); @@ -48,7 +48,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f public static final GameRules.Key RULE_WEATHER_CYCLE = GameRules.register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true)); public static final GameRules.Key RULE_LIMITED_CRAFTING = GameRules.register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { - Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); -+ Iterator iterator = minecraftserver.players().iterator(); // Paper ++ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); @@ -57,7 +57,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f public static final GameRules.Key RULE_DOINSOMNIA = GameRules.register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true)); public static final GameRules.Key RULE_DO_IMMEDIATE_RESPAWN = GameRules.register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> { - Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator(); -+ Iterator iterator = minecraftserver.players().iterator(); // Paper ++ Iterator iterator = minecraftserver.players().iterator(); // Paper - Pass ServerLevel for gamerule callbacks while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); @@ -66,14 +66,14 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f } - public void assignFrom(GameRules rules, @Nullable MinecraftServer server) { -+ public void assignFrom(GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void assignFrom(GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks rules.rules.keySet().forEach((gamerules_gamerulekey) -> { this.assignCap(gamerules_gamerulekey, rules, server); }); } - private > void assignCap(GameRules.Key key, GameRules rules, @Nullable MinecraftServer server) { -+ private > void assignCap(GameRules.Key key, GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ private > void assignCap(GameRules.Key key, GameRules rules, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks T t0 = rules.getRule(key); this.getRule(key).setFrom(t0, server); @@ -82,11 +82,11 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f private final Supplier> argument; private final Function, T> constructor; - final BiConsumer callback; -+ final BiConsumer callback; // Paper ++ final BiConsumer callback; // Paper - Pass ServerLevel for gamerule callbacks private final GameRules.VisitorCaller visitorCaller; - Type(Supplier> argumentType, Function, T> ruleFactory, BiConsumer changeCallback, GameRules.VisitorCaller ruleAcceptor) { -+ Type(Supplier> argumentType, Function, T> ruleFactory, BiConsumer changeCallback, GameRules.VisitorCaller ruleAcceptor) { // Paper ++ Type(Supplier> argumentType, Function, T> ruleFactory, BiConsumer changeCallback, GameRules.VisitorCaller ruleAcceptor) { // Paper - Pass ServerLevel for gamerule callbacks this.argument = argumentType; this.constructor = ruleFactory; this.callback = changeCallback; @@ -95,11 +95,11 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f public void setFromArgument(CommandContext context, String name, GameRules.Key gameRuleKey) { // Paper this.updateFromArgument(context, name, gameRuleKey); // Paper - this.onChanged(((CommandSourceStack) context.getSource()).getServer()); -+ this.onChanged(((CommandSourceStack) context.getSource()).getLevel()); // Paper ++ this.onChanged(((CommandSourceStack) context.getSource()).getLevel()); // Paper - Pass ServerLevel for gamerule callbacks } - public void onChanged(@Nullable MinecraftServer server) { -+ public void onChanged(@Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void onChanged(@Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks if (server != null) { this.type.callback.accept(server, this.getSelf()); } @@ -108,7 +108,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f protected abstract T copy(); - public abstract void setFrom(T rule, @Nullable MinecraftServer server); -+ public abstract void setFrom(T rule, @Nullable net.minecraft.server.level.ServerLevel level); // Paper ++ public abstract void setFrom(T rule, @Nullable net.minecraft.server.level.ServerLevel level); // Paper - Pass ServerLevel for gamerule callbacks } public interface GameRuleTypeVisitor { @@ -117,7 +117,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f private boolean value; - static GameRules.Type create(boolean initialValue, BiConsumer changeCallback) { -+ static GameRules.Type create(boolean initialValue, BiConsumer changeCallback) { // Paper ++ static GameRules.Type create(boolean initialValue, BiConsumer changeCallback) { // Paper - Pass ServerLevel for gamerule callbacks return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> { return new GameRules.BooleanValue(gamerules_gameruledefinition, initialValue); }, changeCallback, GameRules.GameRuleTypeVisitor::visitBoolean); @@ -126,7 +126,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f } - public void set(boolean value, @Nullable MinecraftServer server) { -+ public void set(boolean value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void set(boolean value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks this.value = value; this.onChanged(server); } @@ -135,7 +135,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f } - public void setFrom(GameRules.BooleanValue rule, @Nullable MinecraftServer server) { -+ public void setFrom(GameRules.BooleanValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void setFrom(GameRules.BooleanValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks this.value = rule.value; this.onChanged(server); } @@ -144,7 +144,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f private int value; - private static GameRules.Type create(int initialValue, BiConsumer changeCallback) { -+ private static GameRules.Type create(int initialValue, BiConsumer changeCallback) { // Paper ++ private static GameRules.Type create(int initialValue, BiConsumer changeCallback) { // Paper - Pass ServerLevel for gamerule callbacks return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> { return new GameRules.IntegerValue(gamerules_gameruledefinition, initialValue); }, changeCallback, GameRules.GameRuleTypeVisitor::visitInteger); @@ -153,7 +153,7 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f } - public void set(int value, @Nullable MinecraftServer server) { -+ public void set(int value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void set(int value, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks this.value = value; this.onChanged(server); } @@ -162,12 +162,12 @@ index 2a480026c3bfb06e6556fe5b11d9712c8e02debe..6c1af24f2f02ef5fe1be135b4071362f } - public void setFrom(GameRules.IntegerValue rule, @Nullable MinecraftServer server) { -+ public void setFrom(GameRules.IntegerValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper ++ public void setFrom(GameRules.IntegerValue rule, @Nullable net.minecraft.server.level.ServerLevel server) { // Paper - Pass ServerLevel for gamerule callbacks this.value = rule.value; this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942b3ec5e29 100644 +index 3cf9aafb3ce75c0340605fa29c2a55ff237b843b..c517d8e2daac5675425783a50ae04b5d2a07e37a 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 { @@ -175,7 +175,7 @@ index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942 GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule)); handle.deserialize(event.getValue()); // Paper - handle.onChanged(this.getHandle().getServer()); -+ handle.onChanged(this.getHandle()); // Paper ++ handle.onChanged(this.getHandle()); // Paper - Pass ServerLevel for gamerule callbacks return true; } @@ -184,7 +184,7 @@ index 719d2ac5907b4c96828460daae9f254c2cd3e840..388ce676487dc094cf78ce7bd3c50942 GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName())); handle.deserialize(event.getValue()); // Paper - handle.onChanged(this.getHandle().getServer()); -+ handle.onChanged(this.getHandle()); // Paper ++ handle.onChanged(this.getHandle()); // Paper - Pass ServerLevel for gamerule callbacks return true; } diff --git a/patches/server/0779-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/server/0779-Expand-PlayerItemDamageEvent.patch similarity index 78% rename from patches/server/0779-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/server/0779-Expand-PlayerItemDamageEvent.patch index 93bdb73d1c..bf237c94c3 100644 --- a/patches/server/0779-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch +++ b/patches/server/0779-Expand-PlayerItemDamageEvent.patch @@ -1,23 +1,23 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: HexedHero <6012891+HexedHero@users.noreply.github.com> Date: Sun, 10 Apr 2022 06:26:32 +0100 -Subject: [PATCH] Add pre-unbreaking amount to PlayerItemDamageEvent +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..80682ce58d0b0ce0409d162f447b585163c36753 100644 +index 8cf7d514803fd953e068d3436bfd4e50fb4b0da0..6b38e515a77df7fb06b41fbedaa1090b1cac78fb 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 { } } -+ int originalDamage = amount; // Paper ++ int originalDamage = amount; // Paper - Expand PlayerItemDamageEvent amount -= k; // CraftBukkit start if (player instanceof ServerPlayer serverPlayer) { // Paper - PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount); // Paper -+ PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount, originalDamage); // Paper ++ PlayerItemDamageEvent event = new PlayerItemDamageEvent(serverPlayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), amount, originalDamage); // Paper - Expand PlayerItemDamageEvent event.getPlayer().getServer().getPluginManager().callEvent(event); if (amount != event.getDamage() || event.isCancelled()) { diff --git a/patches/server/0780-WorldCreator-keepSpawnLoaded.patch b/patches/server/0780-WorldCreator-keepSpawnLoaded.patch index 74001a685d..efa63d431e 100644 --- a/patches/server/0780-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0780-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 f9b994a024be198a26d0213b9c98fc46987549a4..08eb6f115fe5fb2414a35010faa91d6fab7db0e2 100644 +index 8802d28c71d3ebc74690ad5c53c7dd77436e1a9f..170da30329f2a0d65a05c0d5c7a4170405df6aef 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 { @@ -19,7 +19,7 @@ index f9b994a024be198a26d0213b9c98fc46987549a4..08eb6f115fe5fb2414a35010faa91d6f return null; @@ -1295,6 +1295,7 @@ public final class CraftServer implements Server { internal.setSpawnSettings(true, true); - // Paper - move up + // Paper - Put world into worldlist before initing the world; move up + internal.keepSpawnInMemory = creator.keepSpawnLoaded().toBooleanOrElse(internal.getWorld().getKeepSpawnInMemory()); // Paper this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal); diff --git a/patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch index 893840fdd5..d77d4323a7 100644 --- a/patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch +++ b/patches/server/0782-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..bf9b185e3defb496022c20ec60a84a4f6f99d5be 100644 +index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..a7c0db6aebef3aec931513c726447091088cc546 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -423,12 +423,16 @@ public class ServerPlayerGameMode { block.destroy(this.level, pos, iblockdata1); } -+ ItemStack mainHandStack = null; // Paper -+ boolean isCorrectTool = false; // Paper ++ ItemStack mainHandStack = null; // Paper - Trigger bee_nest_destroyed trigger in the correct place ++ boolean isCorrectTool = false; // Paper - Trigger bee_nest_destroyed trigger in the correct place if (this.isCreative()) { // return true; // CraftBukkit } else { ItemStack itemstack = this.player.getMainHandItem(); ItemStack itemstack1 = itemstack.copy(); boolean flag1 = this.player.hasCorrectToolForDrops(iblockdata1); -+ mainHandStack = itemstack1; // Paper -+ isCorrectTool = flag1; // Paper ++ mainHandStack = itemstack1; // Paper - Trigger bee_nest_destroyed trigger in the correct place ++ isCorrectTool = flag1; // Paper - Trigger bee_nest_destroyed trigger in the correct place itemstack.mineBlock(this.level, iblockdata1, pos, this.player); if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items @@ -29,18 +29,18 @@ index 236dabc1d4ae9dc9a2a2c07a4a27fc0bfae72f66..bf9b185e3defb496022c20ec60a84a4f if (flag && event != null) { iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop(), this.player); // Paper } -+ // Paper start - trigger after items are dropped (check impls of block#playerDestroy) ++ // Paper start - Trigger bee_nest_destroyed trigger in the correct place (check impls of block#playerDestroy) + if (mainHandStack != null) { + if (flag && isCorrectTool && event.isDropItems() && block instanceof net.minecraft.world.level.block.BeehiveBlock && tileentity instanceof net.minecraft.world.level.block.entity.BeehiveBlockEntity beehiveBlockEntity) { // simulates the guard on block#playerDestroy above + CriteriaTriggers.BEE_NEST_DESTROYED.trigger(player, iblockdata, mainHandStack, beehiveBlockEntity.getOccupantCount()); + } + } -+ // Paper end ++ // Paper end - Trigger bee_nest_destroyed trigger in the correct place return true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index f82cd3677da96d3cf051c983d08a8ff302400b18..6e7a9f68aa3a5084c8eea9fd8721272260734289 100644 +index f82cd3677da96d3cf051c983d08a8ff302400b18..ed87664f513cf82c7bf8439672a656d0a57c1991 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java @@ -95,7 +95,7 @@ public class BeehiveBlock extends BaseEntityBlock { @@ -48,7 +48,7 @@ index f82cd3677da96d3cf051c983d08a8ff302400b18..6e7a9f68aa3a5084c8eea9fd87212722 } - CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount()); -+ // CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount()); // Paper - moved until after items are dropped ++ // CriteriaTriggers.BEE_NEST_DESTROYED.trigger((ServerPlayer) player, state, tool, tileentitybeehive.getOccupantCount()); // Paper - Trigger bee_nest_destroyed trigger in the correct place; moved until after items are dropped } } diff --git a/patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch index 76380e425b..758be4b481 100644 --- a/patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/server/0783-Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -5,38 +5,38 @@ Subject: [PATCH] Add EntityDyeEvent and CollarColorable interface diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index a744cb70ac719eae376fb2ab2271e4f8ac7b12f2..40af8405c6f3ecc5a8168bb62607eb79862cefa6 100644 +index 7dfd2b17e82a80683af28779d0bd8f64a909c3b6..1d0c424be2b67cad0f8bca85070a9c46a6b283da 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -402,6 +402,13 @@ public class Cat extends TamableAnimal implements VariantHolder { DyeColor enumcolor = ((DyeItem) item).getDyeColor(); if (enumcolor != this.getCollarColor()) { -+ // Paper start ++ // Paper start - Add EntityDyeEvent and CollarColorable interface + final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); + if (!event.callEvent()) { + return InteractionResult.FAIL; + } + enumcolor = DyeColor.byId(event.getColor().getWoolData()); -+ // Paper end ++ // Paper end - Add EntityDyeEvent and CollarColorable interface this.setCollarColor(enumcolor); if (!player.getAbilities().instabuild) { itemstack.shrink(1); diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java -index 9ebb994b62b58352525da21385f02803e8414687..eecb7511582e5e316b71fa4a4734881424be5ca7 100644 +index 9ebb994b62b58352525da21385f02803e8414687..2d20b2c1f58beb1ad8c9012d8124e476899e6be6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java +++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java @@ -369,6 +369,14 @@ public class Wolf extends TamableAnimal implements NeutralMob { DyeColor enumcolor = itemdye.getDyeColor(); if (enumcolor != this.getCollarColor()) { -+ // Paper start ++ // Paper start - Add EntityDyeEvent and CollarColorable interface + final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); + if (!event.callEvent()) { + return InteractionResult.FAIL; + } + enumcolor = DyeColor.byId(event.getColor().getWoolData()); -+ // Paper end ++ // Paper end - Add EntityDyeEvent and CollarColorable interface + this.setCollarColor(enumcolor); if (!player.getAbilities().instabuild) { diff --git a/patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch index bfc20b1602..2f02c180d2 100644 --- a/patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch +++ b/patches/server/0784-Fire-CauldronLevelChange-on-initial-fill.patch @@ -7,7 +7,7 @@ Also don't fire level events or game events if stalactite drip is cancelled diff --git a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java -index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5eeffa5b4 100644 +index 4c9334dde0734a3550a810845cee53f474e9c96b..dc1d20691ae5bd9026143e143a9bfdc1b6cfd6eb 100644 --- a/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java +++ b/src/main/java/net/minecraft/core/cauldron/CauldronInteraction.java @@ -80,7 +80,7 @@ public interface CauldronInteraction { @@ -15,7 +15,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5 if (!world.isClientSide) { // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) { -+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper ++ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChange return InteractionResult.SUCCESS; } // CraftBukkit end @@ -24,7 +24,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5 if (!world.isClientSide) { // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) { -+ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper ++ if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY, false)) { // Paper - Call CauldronLevelChange return InteractionResult.SUCCESS; } // CraftBukkit end @@ -33,7 +33,7 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5 if (!world.isClientSide) { // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) { -+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL, false)) { // Paper ++ if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL, false)) { // Paper - Call CauldronLevelChange return InteractionResult.SUCCESS; } // CraftBukkit end @@ -42,12 +42,12 @@ index 4c9334dde0734a3550a810845cee53f474e9c96b..ef7f1a871144f4a6897769f2459a4dd5 if (!world.isClientSide) { // CraftBukkit start - if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) { -+ if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY, false)) { // Paper ++ if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY, false)) { // Paper - Call CauldronLevelChange return InteractionResult.SUCCESS; } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java -index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d033cd2b1 100644 +index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..274dc56a71fb05060de42169df34dfd8097f2b62 100644 --- a/src/main/java/net/minecraft/world/level/block/CauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CauldronBlock.java @@ -43,10 +43,18 @@ public class CauldronBlock extends AbstractCauldronBlock { @@ -55,19 +55,19 @@ index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d if (CauldronBlock.shouldHandlePrecipitation(world, precipitation)) { if (precipitation == Biome.Precipitation.RAIN) { - world.setBlockAndUpdate(pos, Blocks.WATER_CAULDRON.defaultBlockState()); -+ // Paper start - call event for initial fill ++ // Paper start - Call CauldronLevelChange + if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.WATER_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event + return; + } -+ // Paper end ++ // Paper end - Call CauldronLevelChange world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos); } else if (precipitation == Biome.Precipitation.SNOW) { - world.setBlockAndUpdate(pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState()); -+ // Paper start - call event for initial fill ++ // Paper start - Call CauldronLevelChange + if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.POWDER_SNOW_CAULDRON.defaultBlockState(), null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL, false)) { // avoid duplicate game event + return; + } -+ // Paper end ++ // Paper end - Call CauldronLevelChange world.gameEvent((Entity) null, GameEvent.BLOCK_CHANGE, pos); } @@ -76,25 +76,25 @@ index 588b3e911d9b22dad2928ea9e32e8a8a3a8e9b96..a821a981adbebdcf22997731b9bbea3d if (fluid == Fluids.WATER) { iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState(); - LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit -+ // Paper start - don't send level event or game event if cancelled ++ // Paper start - Call CauldronLevelChange; don't send level event or game event if cancelled + if (!LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) { // CraftBukkit + return; + } -+ // Paper end ++ // Paper end - Call CauldronLevelChange world.levelEvent(1047, pos, 0); } else if (fluid == Fluids.LAVA) { iblockdata1 = Blocks.LAVA_CAULDRON.defaultBlockState(); - LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit -+ // Paper start - don't send level event or game event if cancelled ++ // Paper start - Call CauldronLevelChange; don't send level event or game event if cancelled + if (!LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) { // CraftBukkit + return; + } -+ // Paper end ++ // Paper end - Call CauldronLevelChange world.levelEvent(1046, pos, 0); } diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java -index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38bfc1d646b 100644 +index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..b9383a9992e940fc3442d52344744cfe2fadfb74 100644 --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java @@ -101,7 +101,13 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -102,13 +102,13 @@ index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38b // CraftBukkit start - public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) { -+ // Paper start ++ // Paper start - Call CauldronLevelChange + public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, @javax.annotation.Nullable Entity entity, CauldronLevelChangeEvent.ChangeReason reason) { // Paper - entity is nullable + return changeLevel(iblockdata, world, blockposition, newBlock, entity, reason, true); + } + + public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, @javax.annotation.Nullable Entity entity, CauldronLevelChangeEvent.ChangeReason reason, boolean sendGameEvent) { // Paper - entity is nullable -+ // Paper end ++ // Paper end - Call CauldronLevelChange CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition); newState.setData(newBlock); @@ -117,7 +117,7 @@ index a8b2c49ebf531d730d681ca3bceb4dc74b433fdb..7daf2ec30fd31023d326a6149661f38b } newState.update(true); - world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); -+ if (sendGameEvent) world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper ++ if (sendGameEvent) world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock)); // Paper - Call CauldronLevelChange return true; } // CraftBukkit end diff --git a/patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch index 26317d1b0b..f60f04609d 100644 --- a/patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch +++ b/patches/server/0785-fix-powder-snow-cauldrons-not-turning-to-water.patch @@ -7,7 +7,7 @@ Powder snow cauldrons should turn to water when extinguishing an entity diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java -index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dcec0b66ee4 100644 +index b9383a9992e940fc3442d52344744cfe2fadfb74..db8d2157df0b276313493af224be343ae0de0917 100644 --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java @@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @@ -23,7 +23,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce } -+ @Deprecated // Paper - use #handleEntityOnFireInsideWithEvent ++ @Deprecated // Paper - fix powdered snow cauldron extinguishing entities; use #handleEntityOnFireInsideWithEvent private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) { if (this.precipitationType == Biome.Precipitation.SNOW) { LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos); @@ -31,7 +31,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce } } -+ // Paper start ++ // Paper start - fix powdered snow cauldron extinguishing entities + protected boolean handleEntityOnFireInsideWithEvent(BlockState state, Level world, BlockPos pos, Entity entity) { + if (this.precipitationType == Biome.Precipitation.SNOW) { + return LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH); @@ -39,7 +39,7 @@ index 7daf2ec30fd31023d326a6149661f38bfc1d646b..93f5e583635a2addeabf2adff9374dce + return LayeredCauldronBlock.lowerFillLevel(state, world, pos, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH); + } + } -+ // Paper end ++ // Paper end - fix powdered snow cauldron extinguishing entities public static void lowerFillLevel(BlockState state, Level world, BlockPos pos) { // CraftBukkit start diff --git a/patches/server/0786-Add-PlayerStopUsingItemEvent.patch b/patches/server/0786-Add-PlayerStopUsingItemEvent.patch index 566a7a01fd..d434d58cba 100644 --- a/patches/server/0786-Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/0786-Add-PlayerStopUsingItemEvent.patch @@ -5,14 +5,14 @@ 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..36ecdf1d0171286893b267b4591d298eefe40587 100644 +index e27b19cf56b269c426cb6ddf81513497b70c676f..546777ad955d0d317d129882cfeab68935708228 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 { public void releaseUsingItem() { if (!this.useItem.isEmpty()) { -+ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper ++ if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper - Add PlayerStopUsingItemEvent this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks()); if (this.useItem.useOnRelease()) { this.updatingUsingItem(); diff --git a/patches/server/0787-Don-t-tick-markers.patch b/patches/server/0787-Don-t-tick-markers.patch index b24d4569b2..1346990dc8 100644 --- a/patches/server/0787-Don-t-tick-markers.patch +++ b/patches/server/0787-Don-t-tick-markers.patch @@ -10,7 +10,7 @@ list is only used in the tick and tickPassenger methods, so we can safely not ad markers to it. When the config option is set to true, markers are ticked as normal. diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java -index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af9711515714752c262e3 100644 +index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5e5a018433414af76eaa1e781f61612ddc305b07 100644 --- a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java +++ b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java @@ -109,7 +109,7 @@ public final class EntityCommand implements PaperSubcommand { @@ -18,7 +18,7 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147 info.left++; info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1); - if (!chunkProviderServer.isPositionTicking(e)) { -+ if (!chunkProviderServer.isPositionTicking(e) || (e instanceof net.minecraft.world.entity.Marker && !world.paperConfig().entities.markers.tick)) { // Configurable marker ticking ++ if (!chunkProviderServer.isPositionTicking(e) || (e instanceof net.minecraft.world.entity.Marker && !world.paperConfig().entities.markers.tick)) { // Paper - Configurable marker ticking nonEntityTicking.merge(key, 1, Integer::sum); } }); @@ -35,21 +35,21 @@ index cae00701c5dbf40be07ea5c2d01ea8929f4fa216..646fb7e4a83e9f9a1b78d8c70f3518b9 } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 3495981419a75efe42bce45a89a32378dd6b8372..2d31752478636bd21bbff5b430e5acb76b5d91c2 100644 +index 3495981419a75efe42bce45a89a32378dd6b8372..fafc8b84d6b6368c70b8eedfdb4c3a9deace9c26 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -213,8 +213,14 @@ public class ActivationRange // Paper start java.util.List entities = world.getEntities((Entity)null, ActivationRange.maxBB, null); -+ boolean tickMarkers = world.paperConfig().entities.markers.tick; // Paper - configurable marker ticking ++ boolean tickMarkers = world.paperConfig().entities.markers.tick; // Paper - Configurable marker ticking for (int i = 0; i < entities.size(); i++) { Entity entity = entities.get(i); -+ // Paper start - configurable marker ticking ++ // Paper start - Configurable marker ticking + if (!tickMarkers && entity instanceof net.minecraft.world.entity.Marker) { + continue; + } -+ // Paper end - configurable marker ticking ++ // Paper end - Configurable marker ticking ActivationRange.activateEntity(entity); } // Paper end diff --git a/patches/server/0788-Expand-FallingBlock-API.patch b/patches/server/0788-Expand-FallingBlock-API.patch index 2a31126860..61bcc91c76 100644 --- a/patches/server/0788-Expand-FallingBlock-API.patch +++ b/patches/server/0788-Expand-FallingBlock-API.patch @@ -13,14 +13,14 @@ public net.minecraft.world.entity.item.FallingBlockEntity blockState Co-authored-by: Lukas Planz diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950c70d9a67 100644 +index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..21a4669b01e9c57100224e20500bc23f8e101434 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -66,6 +66,7 @@ public class FallingBlockEntity extends Entity { @Nullable public CompoundTag blockData; protected static final EntityDataAccessor DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS); -+ public boolean autoExpire = true; // Paper - Auto expire setting ++ public boolean autoExpire = true; // Paper - Expand FallingBlock API public FallingBlockEntity(EntityType type, Level world) { super(type, world); @@ -29,7 +29,7 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950 if (!this.onGround() && !flag1) { - if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) { -+ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting ++ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Expand FallingBlock API if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.spawnAtLocation((ItemLike) block); } @@ -37,7 +37,7 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950 } nbt.putBoolean("CancelDrop", this.cancelDrop); -+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting ++ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - Expand FallingBlock API } @Override @@ -45,23 +45,23 @@ index fc33d05cf1a3cceb220dab1ee1da33ffe37834db..45c07733f03b5c11f6d8e820f65dc950 this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ)); } // Paper end -+ // Paper start ++ // Paper start - Expand FallingBlock API + if (nbt.contains("Paper.AutoExpire")) { + this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); + } -+ // Paper end ++ // Paper end - Expand FallingBlock API } public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java -index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda9a8f93c1 100644 +index a7a3f74b846112d752fe04162b30805961457b11..2ba8f461d32a7c517a93461bf6f8f5cd4defdef4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java @@ -33,6 +33,31 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock { public BlockData getBlockData() { return CraftBlockData.fromData(this.getHandle().getBlockState()); } -+ // Paper start ++ // Paper start - Expand FallingBlock API + @Override + public void setBlockData(final BlockData blockData) { + Preconditions.checkArgument(blockData != null, "blockData"); @@ -85,7 +85,7 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda + this.setBlockData(blockState.getBlockData()); + if (blockState instanceof final org.bukkit.craftbukkit.block.CraftBlockEntityState tileEntity) this.getHandle().blockData = tileEntity.getSnapshotNBT(); + } -+ // Paper end ++ // Paper end - Expand FallingBlock API @Override public boolean getDropItem() { @@ -93,7 +93,7 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda this.setHurtEntities(true); } } -+ // Paper Start - Auto expire setting ++ // Paper Start - Expand FallingBlock API + @Override + public boolean doesAutoExpire() { + return this.getHandle().autoExpire; @@ -103,5 +103,5 @@ index a7a3f74b846112d752fe04162b30805961457b11..73911b81f4e927026657953a0c68ddda + public void shouldAutoExpire(boolean autoExpires) { + this.getHandle().autoExpire = autoExpires; + } -+ // Paper End - Auto expire setting ++ // Paper End - Expand FallingBlock API } diff --git a/patches/server/0789-Do-not-accept-invalid-client-settings.patch b/patches/server/0789-Do-not-accept-invalid-client-settings.patch index 2d9a6d6bf2..03d00dc89b 100644 --- a/patches/server/0789-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0789-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 52efebcc440253e84640be3c24c2dcd76c2a5b9a..c63dd80b23df877cb900e608406f747b87e3cae7 100644 +index 9ce9390291988e3110e228e83e0754e5529de800..aba06bae97f021d9f62441eb662539a0bbc815ef 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/0790-Add-support-for-Proxy-Protocol.patch index 6fd4cd5598..17373a6c19 100644 --- a/patches/server/0790-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0790-Add-support-for-Proxy-Protocol.patch @@ -17,18 +17,18 @@ index 517920023bc28fea04eeb709364d5a7292adcc5e..444ff797c70b0e285d4272ea2ce3d724 implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.ow2.asm:asm-commons:9.5") diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..79326308f6126f84a3cbb3d5a33302de048d8a50 100644 +index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..1df438ce6604981d459a6bc0b351be6d7c1bc050 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java @@ -111,6 +111,12 @@ public class ServerConnectionListener { ServerConnectionListener.LOGGER.info("Paper: Using " + com.velocitypowered.natives.util.Natives.cipher.getLoadedVariant() + " cipher from Velocity."); // Paper end -+ // Paper start - indicate Proxy Protocol usage ++ // Paper start - Add support for proxy protocol + if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.proxyProtocol) { + ServerConnectionListener.LOGGER.info("Paper: Using Proxy Protocol"); + } -+ // Paper end ++ // Paper end - Add support for proxy protocol + this.channels.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer() { protected void initChannel(Channel channel) { @@ -59,7 +59,7 @@ index 54c7f34ba3dc8466223e589702d0c93af8cf52a0..79326308f6126f84a3cbb3d5a33302de + } + }); + } -+ // Paper end ++ // Paper end - Add support for proxy protocol pending.add(object); // Paper ((Connection) object).configurePacketHandler(channelpipeline); ((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object)); diff --git a/patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch index 6fdd1fd271..ef7517367b 100644 --- a/patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch +++ b/patches/server/0792-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix FurnaceInventory for smokers and blast furnaces diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java -index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..f59a972cb4516623f9715e4a5a3a9fa3bfd8f989 100644 +index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..149683821a248fbbd93d0417085f0cb0e86a1398 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java @@ -65,7 +65,7 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat @@ -25,7 +25,7 @@ index 8d3f71689087d687e6400e2ea9750a6fb3535bf1..f59a972cb4516623f9715e4a5a3a9fa3 + } + + public static abstract class AbstractFurnaceInventoryConverter extends CraftTileInventoryConverter { -+ // Paper end ++ // Paper end - abstract furnace converter to apply to all 3 furnaces // Paper start @Override public Inventory createInventory(InventoryHolder owner, InventoryType type, net.kyori.adventure.text.Component title) { diff --git a/patches/server/0793-Sanitize-Sent-BlockEntity-NBT.patch b/patches/server/0793-Sanitize-sent-BlockEntity-NBT.patch similarity index 91% rename from patches/server/0793-Sanitize-Sent-BlockEntity-NBT.patch rename to patches/server/0793-Sanitize-sent-BlockEntity-NBT.patch index b3404362f9..c6db481373 100644 --- a/patches/server/0793-Sanitize-Sent-BlockEntity-NBT.patch +++ b/patches/server/0793-Sanitize-sent-BlockEntity-NBT.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Fri, 3 Dec 2021 16:55:50 -0500 -Subject: [PATCH] Sanitize Sent BlockEntity NBT +Subject: [PATCH] Sanitize sent BlockEntity NBT diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java @@ -30,19 +30,18 @@ index bf6cdc08367fc26716e7904162a21e63fecab3ed..51e24105facfe71ce9f2757c6c881a21 } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index e3557f4c8cee7c88b3e352cd246078da7762effc..5bdad1866386908b9fef74d15862eb107fabe68f 100644 +index e3557f4c8cee7c88b3e352cd246078da7762effc..0fdf74317a20a250b474978c9e50a6c533abfbe6 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -253,4 +253,12 @@ public abstract class BlockEntity { +@@ -253,4 +253,11 @@ public abstract class BlockEntity { return null; } // CraftBukkit end -+ // Paper start ++ // Paper start - Sanitize sent data + public CompoundTag sanitizeSentNbt(CompoundTag tag) { + tag.remove("PublicBukkitValues"); + + return tag; + } -+ // Paper end -+ ++ // Paper end - Sanitize sent data } diff --git a/patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch index 72862c20c5..33fd8e47d0 100644 --- a/patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch +++ b/patches/server/0794-Disable-component-selector-resolving-in-books-by-def.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable component selector resolving in books by default diff --git a/src/main/java/net/minecraft/world/item/WrittenBookItem.java b/src/main/java/net/minecraft/world/item/WrittenBookItem.java -index a324df312d9bb87d9e0962f8028d900933e70c07..31911c09fe15753ae32fa39417bdc9e9de552a88 100644 +index a324df312d9bb87d9e0962f8028d900933e70c07..258a636a59203c4e5415a89002c6a607338f9514 100644 --- a/src/main/java/net/minecraft/world/item/WrittenBookItem.java +++ b/src/main/java/net/minecraft/world/item/WrittenBookItem.java @@ -111,7 +111,7 @@ public class WrittenBookItem extends Item { @@ -13,7 +13,7 @@ index a324df312d9bb87d9e0962f8028d900933e70c07..31911c09fe15753ae32fa39417bdc9e9 public static boolean resolveBookComponents(ItemStack book, @Nullable CommandSourceStack commandSource, @Nullable Player player) { CompoundTag compoundTag = book.getTag(); - if (compoundTag != null && !compoundTag.getBoolean("resolved")) { -+ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper ++ if (io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.resolveSelectorsInBooks && compoundTag != null && !compoundTag.getBoolean("resolved")) { // Paper - Disable component selector resolving in books by default compoundTag.putBoolean("resolved", true); if (!makeSureTagIsValid(compoundTag)) { return false; diff --git a/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch index 2db3ffafcf..3b6df7cf92 100644 --- a/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch +++ b/patches/server/0795-Prevent-entity-loading-causing-async-lookups.patch @@ -5,19 +5,19 @@ 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 2c3193fdfb0e4b4a47cceb2da8b3fe85bd1e6848..edea89eebb9a99e41dc2bcbabc94b6775f5470df 100644 +index ab409aae677a5ed4ca50113e88397c4543373df8..e5f4388d531910c238fcd809a1c5d92267858c53 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 public void baseTick() { this.level().getProfiler().push("entityBaseTick"); -+ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking ++ if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups this.feetBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { this.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java -index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e90231e61f6ef 100644 +index fa64c7baa7587f2cfe80b78ed83be011239618cf..47d5a0928f3c86d71f851738bfe7beedc98cfbb3 100644 --- a/src/main/java/net/minecraft/world/entity/NeutralMob.java +++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java @@ -42,18 +42,11 @@ public interface NeutralMob { @@ -36,7 +36,7 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023 - } - - } -+ // Paper - Moved diff to separate method ++ // Paper - Prevent entity loading causing async lookups; Moved diff to separate method + // If this entity already survived its first tick, e.g. is loaded and ticked in sync, actively + // tick the initial persistent anger. + // If not, let the first tick on the baseTick call the method later down the line. @@ -44,12 +44,13 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023 } } } -@@ -127,4 +120,26 @@ public interface NeutralMob { +@@ -127,4 +120,27 @@ public interface NeutralMob { @Nullable LivingEntity getTarget(); + -+ // Paper start - Update last hurt when ticking ++ // Paper start - Prevent entity loading causing async lookups ++ // Update last hurt when ticking + default void tickInitialPersistentAnger(Level level) { + UUID target = getPersistentAngerTarget(); + if (target == null) { @@ -69,5 +70,5 @@ index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e9023 + + } + } -+ // Paper end ++ // Paper end - Prevent entity loading causing async lookups } diff --git a/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch index 7b59f847f3..1a5562e13c 100644 --- a/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0796-Throw-exception-on-world-create-while-being-ticked.patch @@ -7,14 +7,14 @@ 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 d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe0eab9122 100644 +index e5dccd330cbf3301a60b65453e87a4005f954716..b9df0b37b5568758c04ee41e258395c3a2d493c1 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 S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); @@ -23,7 +23,7 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper this.profiler.popPush("levels"); - Iterator iterator = this.getAllLevels().iterator(); -+ //Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down ++ //Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down // CraftBukkit start // Run tasks that are waiting on processing @@ -31,8 +31,8 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe // Paper end MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper -+ this.isIteratingOverLevels = true; // Paper -+ Iterator iterator = this.getAllLevels().iterator(); // Paper - move down ++ this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked ++ Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down while (iterator.hasNext()) { ServerLevel worldserver = (ServerLevel) iterator.next(); worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper @@ -40,12 +40,12 @@ index d8eb1dbc1601c1f76183ddd78b88d0ee6df68bed..002511a54565aab9eb4552fecdf974fe this.profiler.pop(); worldserver.explosionDensityCache.clear(); // Paper - Optimize explosions } -+ this.isIteratingOverLevels = false; // Paper ++ this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 08eb6f115fe5fb2414a35010faa91d6fab7db0e2..398a89a1f695f1e99b30ca0d5ebb192c8f465748 100644 +index 170da30329f2a0d65a05c0d5c7a4170405df6aef..e549dc84ac05a8b5f4dc602689904eb92445c687 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -874,6 +874,11 @@ public final class CraftServer implements Server { diff --git a/patches/server/0797-Add-Alternate-Current-redstone-implementation.patch b/patches/server/0797-Add-Alternate-Current-redstone-implementation.patch index d3a755d55e..8fb3cccdf2 100644 --- a/patches/server/0797-Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/0797-Add-Alternate-Current-redstone-implementation.patch @@ -2008,7 +2008,7 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..43893ea7ff9bda6130b5b74340cdd27bf5f809c5 100644 +index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..2af4d65fc0c761bcf58e94d4ce0cc918afa47c10 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -223,6 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2028,7 +2028,7 @@ index 646fb7e4a83e9f9a1b78d8c70f3518b977572fde..43893ea7ff9bda6130b5b74340cdd27b + public alternate.current.wire.WireHandler getWireHandler() { + return wireHandler; + } -+ // Paper end ++ // Paper end - optimize redstone (Alternate Current) + private final class EntityCallbacks implements LevelCallback { @@ -2054,7 +2054,7 @@ index 2287987d5bb0e6c4cb6153f04c420fe5ec7c8089..8200844b73dc7181d5867aafa83087e0 + // Paper end - optimize redstone (Alternate Current) } diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4b00f4233 100644 +index 5ffb1453bf332e8035abacc97ab36d78e1248484..7339795addfeaedc3c8a7db03f73546fb5fba06b 100644 --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java @@ -259,7 +259,7 @@ public class RedStoneWireBlock extends Block { @@ -2077,7 +2077,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4 + } else { + this.updateSurroundingRedstone(world, pos, state, null); // vanilla/Eigencraft + } -+ // Paper end ++ // Paper end - optimize redstone Iterator iterator = Direction.Plane.VERTICAL.iterator(); while (iterator.hasNext()) { @@ -2092,7 +2092,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4 + } else { + this.updateSurroundingRedstone(world, pos, state, null); // vanilla/Eigencraft + } -+ // Paper end ++ // Paper end - optimize redstone this.updateNeighborsOfNeighboringWires(world, pos); } } @@ -2105,7 +2105,7 @@ index 5ffb1453bf332e8035abacc97ab36d78e1248484..507be06ad51b7a212e28d3ca6680e0e4 + if (world.paperConfig().misc.redstoneImplementation == io.papermc.paper.configuration.WorldConfiguration.Misc.RedstoneImplementation.ALTERNATE_CURRENT) { + world.getWireHandler().onWireUpdated(pos); + } else -+ // Paper end ++ // Paper end - optimize redstone (Alternate Current) if (state.canSurvive(world, pos)) { - this.updateSurroundingRedstone(world, pos, state, sourcePos); // Paper - Optimize redstone + this.updateSurroundingRedstone(world, pos, state, sourcePos); // Paper - Optimize redstone (Eigencraft) diff --git a/patches/server/0799-Add-WardenAngerChangeEvent.patch b/patches/server/0799-Add-WardenAngerChangeEvent.patch index 8e13bfe2f5..9344bd47cf 100644 --- a/patches/server/0799-Add-WardenAngerChangeEvent.patch +++ b/patches/server/0799-Add-WardenAngerChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add WardenAngerChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java -index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee96d0a0748 100644 +index 02abc5f387d781094bd2f39233444add3a470be1..1017c294b48bf0bbf733e1f41d580d1e6c927834 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java @@ -146,7 +146,7 @@ public class AngerManagement { @@ -13,19 +13,19 @@ index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee9 boolean bl = !this.angerBySuspect.containsKey(entity); int i = this.angerBySuspect.computeInt(entity, (suspect, anger) -> { - return Math.min(150, (anger == null ? 0 : anger) + amount); -+ return Math.min(150, (anger == null ? 0 : anger) + amount); // Paper - diff on change ++ return Math.min(150, (anger == null ? 0 : anger) + amount); // Paper - diff on change (Warden#increaseAngerAt WardenAngerChangeEvent) }); if (bl) { int j = this.angerByUuid.removeInt(entity.getUUID()); diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..9f1b7c629644931074293151ed58a523ca6d488c 100644 +index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..937f81a859953498abe73bea560c86e6560e1c33 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java @@ -488,6 +488,15 @@ public class Warden extends Monster implements VibrationSystem { @VisibleForTesting public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) { if (!this.isNoAi() && this.canTargetEntity(entity)) { -+ // Paper start ++ // Paper start - Add WardenAngerChangeEvent + int activeAnger = this.angerManagement.getActiveAnger(entity); + io.papermc.paper.event.entity.WardenAngerChangeEvent event = new io.papermc.paper.event.entity.WardenAngerChangeEvent((org.bukkit.entity.Warden) this.getBukkitEntity(), entity.getBukkitEntity(), activeAnger, Math.min(150, activeAnger + amount)); + this.level().getCraftServer().getPluginManager().callEvent(event); @@ -33,7 +33,7 @@ index b5185fcb635fbf5e5ed9d6cc9cc517cb46ada5aa..9f1b7c629644931074293151ed58a523 + return; + } + amount = event.getNewAnger() - activeAnger; -+ // Paper end ++ // Paper end - Add WardenAngerChangeEvent WardenAi.setDigCooldown(this); boolean flag1 = !(this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null) instanceof Player); // CraftBukkit - decompile error int j = this.angerManagement.increaseAnger(entity, amount); diff --git a/patches/server/0800-Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/0800-Add-option-for-strict-advancement-dimension-checks.patch index 9a0bae0fff..3677466251 100644 --- a/patches/server/0800-Add-option-for-strict-advancement-dimension-checks.patch +++ b/patches/server/0800-Add-option-for-strict-advancement-dimension-checks.patch @@ -24,7 +24,7 @@ index 5f9cb2c7a2874e423087d04d3360af0364692b5c..428e0afef2cac9f2a19d8cfe8f2504dd } else { BlockPos blockPos = BlockPos.containing(x, y, z); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 1f7b13806ffbcf81df67a02129aa2c07dfc7b8f5..f2677922cb97c9aa34f2e80769ac9cccc3dc8089 100644 +index 1695e7d3e456bb3539fb37d943e8cf45489f0762..d3fdb56f1e62a241d8edbde4faa1296de36de246 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1321,6 +1321,12 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0803-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0803-Don-t-broadcast-messages-to-command-blocks.patch index 3b911c23d5..e921c929d7 100644 --- a/patches/server/0803-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0803-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,7 +20,7 @@ index c56f5173fda6b38c2dcaea196217f2f5a7d7c641..524b0f1086c01888fe0b76e180c40915 Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 398a89a1f695f1e99b30ca0d5ebb192c8f465748..7749d9740c965baf901512b242426f9a15aca24f 100644 +index e549dc84ac05a8b5f4dc602689904eb92445c687..3aae0cce193777cd64124a87f43645207c5f6743 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1873,7 +1873,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0804-Prevent-empty-items-from-being-added-to-world.patch b/patches/server/0804-Prevent-empty-items-from-being-added-to-world.patch index e2c89a285c..90dd35e0ae 100644 --- a/patches/server/0804-Prevent-empty-items-from-being-added-to-world.patch +++ b/patches/server/0804-Prevent-empty-items-from-being-added-to-world.patch @@ -7,7 +7,7 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca Just simply prevent them from being added to the world instead. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 43893ea7ff9bda6130b5b74340cdd27bf5f809c5..2bfa9d1abf7a777b588314d314d06be3b4d2c6a5 100644 +index 2af4d65fc0c761bcf58e94d4ce0cc918afa47c10..d6bf1580787a4d5a2ac9ebde5efe236be3f15a1a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1587,6 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0808-Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/0808-Add-various-missing-EntityDropItemEvent-calls.patch index 5b3463d2db..9815dccf04 100644 --- a/patches/server/0808-Add-various-missing-EntityDropItemEvent-calls.patch +++ b/patches/server/0808-Add-various-missing-EntityDropItemEvent-calls.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index edea89eebb9a99e41dc2bcbabc94b6775f5470df..053dbed42a74a5721cfe9f6d70cd965ede3ef1f3 100644 +index e5f4388d531910c238fcd809a1c5d92267858c53..549a0144e3c6ef267afeb665059bce0f6eac360e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2699,6 +2699,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0810-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0810-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index f61b1c4124..b1e3d1d430 100644 --- a/patches/server/0810-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0810-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c63dd80b23df877cb900e608406f747b87e3cae7..be9584daa1da322855524386acf7718d825a7034 100644 +index aba06bae97f021d9f62441eb662539a0bbc815ef..bc632d1772dd6d9103674ec15408797cc12f2bc0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2378,7 +2378,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0811-More-Teleport-API.patch b/patches/server/0811-More-Teleport-API.patch index b8e1cf1e0b..2ce3e50e80 100644 --- a/patches/server/0811-More-Teleport-API.patch +++ b/patches/server/0811-More-Teleport-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index be9584daa1da322855524386acf7718d825a7034..6498ce505226d35f30062bc3aa52388b739c13fe 100644 +index bc632d1772dd6d9103674ec15408797cc12f2bc0..d8f77bbf533b45e3964c8b0920396b9bed4b3b99 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1637,11 +1637,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0812-Add-EntityPortalReadyEvent.patch b/patches/server/0812-Add-EntityPortalReadyEvent.patch index eb9b6b6956..bbcf1d877f 100644 --- a/patches/server/0812-Add-EntityPortalReadyEvent.patch +++ b/patches/server/0812-Add-EntityPortalReadyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityPortalReadyEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 053dbed42a74a5721cfe9f6d70cd965ede3ef1f3..5a57fe0dacd4baf3fea9b64f6325acc34b946036 100644 +index 549a0144e3c6ef267afeb665059bce0f6eac360e..2de97b71c16094c39a0d1eb2880d1b036b44b710 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3099,6 +3099,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0814-Send-block-entities-after-destroy-prediction.patch b/patches/server/0814-Send-block-entities-after-destroy-prediction.patch index 47702f4d3e..53567a1137 100644 --- a/patches/server/0814-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0814-Send-block-entities-after-destroy-prediction.patch @@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index bf9b185e3defb496022c20ec60a84a4f6f99d5be..c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739 100644 +index a7c0db6aebef3aec931513c726447091088cc546..5333488e606f2966271e1d25bacfa4196ca5145b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -62,6 +62,8 @@ public class ServerPlayerGameMode { @@ -57,7 +57,7 @@ index bf9b185e3defb496022c20ec60a84a4f6f99d5be..c29ac2fd8dd08fe0c87abc3efb92e539 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6498ce505226d35f30062bc3aa52388b739c13fe..e6bb211374b7fba2e275dd43604ab5a171c833d7 100644 +index d8f77bbf533b45e3964c8b0920396b9bed4b3b99..5cb69d9fbff2ee1e647c21e40a17b7244815f213 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1783,8 +1783,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0815-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0815-Warn-on-plugins-accessing-faraway-chunks.patch index dede363294..71f64b7f0a 100644 --- a/patches/server/0815-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0815-Warn-on-plugins-accessing-faraway-chunks.patch @@ -18,7 +18,7 @@ index 8200844b73dc7181d5867aafa83087e09ff2df76..e853c9fdc8ebde6a653aacbb1db6679c private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 388ce676487dc094cf78ce7bd3c50942b3ec5e29..e3a1a1ed5f165d7d37a4f760e5ab7ecbea993a0e 100644 +index c517d8e2daac5675425783a50ae04b5d2a07e37a..a4912e7df109e3648200814e31e81a26262a832a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0821-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0821-Add-Velocity-IP-Forwarding-Support.patch index 967c9f9a73..23bcea59ae 100644 --- a/patches/server/0821-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0821-Add-Velocity-IP-Forwarding-Support.patch @@ -106,7 +106,7 @@ index 0000000000000000000000000000000000000000..3c31ff3330c2e925e205c0c9ff4f0b83 + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 4d7124ae7cefcc8c65bf74ac9d3c103fe6817c42..bbe9ad20a664bcd3952f3a4643add957d20fce20 100644 +index 7d33ce8d68ca55e0fd37d2d4e3c78a436f17f229..cb7fe116a29916761299a808572f76547d143971 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -228,7 +228,7 @@ index 6121a3879eeb1d13653e93da02ecdbbcb2a866ac..a9f5af48c1f97b2e635727b48f438350 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7749d9740c965baf901512b242426f9a15aca24f..7f238c76a57c9d26c0bafa3f7b4f0436c0a1b93b 100644 +index 3aae0cce193777cd64124a87f43645207c5f6743..f428bff49d109d2045634505ddcab90f89771a81 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -803,7 +803,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0823-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0823-Fix-plugin-loggers-on-server-shutdown.patch index 47134d792e..6f72aa24cc 100644 --- a/patches/server/0823-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0823-Fix-plugin-loggers-on-server-shutdown.patch @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 002511a54565aab9eb4552fecdf974fe0eab9122..7c9f7aefc59ae1a785b261f80f25d3304f3bdd22 100644 +index b9df0b37b5568758c04ee41e258395c3a2d493c1..5981171f4960b61a448014ccaa5336bdc556ae81 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1026,6 +1026,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 36ecdf1d0171286893b267b4591d298eefe40587..0d0299482be6c906575626dc352cd13ae8be4569 100644 +index 546777ad955d0d317d129882cfeab68935708228..cc774a2803051a5d981ecece2e9a992f09850ecf 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/0826-Missing-eating-regain-reason.patch b/patches/server/0826-Missing-eating-regain-reason.patch index ce4cdd6f86..cbd8900d95 100644 --- a/patches/server/0826-Missing-eating-regain-reason.patch +++ b/patches/server/0826-Missing-eating-regain-reason.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Missing eating regain reason diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 40af8405c6f3ecc5a8168bb62607eb79862cefa6..ff32fb9e2302cf34f6ddd5647706d37980342657 100644 +index 1d0c424be2b67cad0f8bca85070a9c46a6b283da..f760ce7d9df79ef58f8963de3e901cba3e12fcaa 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -387,7 +387,7 @@ public class Cat extends TamableAnimal implements VariantHolder { diff --git a/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch index 9fc9bbec8d..b3138f3a62 100644 --- a/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0836-Fix-a-bunch-of-vanilla-bugs.patch @@ -129,7 +129,7 @@ index a0603e567deeede8b4cd2ba57ded44f29239d78d..982750fd4f3f474514194df9b7638831 return this.anyPlayerCloseEnoughForSpawning(pos, false); } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 2bfa9d1abf7a777b588314d314d06be3b4d2c6a5..0a4586d1b847de49d9e6faa16dba6de4a6a7cca6 100644 +index d6bf1580787a4d5a2ac9ebde5efe236be3f15a1a..675bc8df01ad9e338541e16575c9ec8e538787e2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1032,7 +1032,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -142,7 +142,7 @@ index 2bfa9d1abf7a777b588314d314d06be3b4d2c6a5..0a4586d1b847de49d9e6faa16dba6de4 if (!list.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index f2677922cb97c9aa34f2e80769ac9cccc3dc8089..958b013cc4805704cec9a87835f3541e7d3c7faa 100644 +index d3fdb56f1e62a241d8edbde4faa1296de36de246..482cf5cf164ee33691a5581c6acafb5959705c83 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -468,14 +468,14 @@ public class ServerPlayer extends Player { @@ -163,7 +163,7 @@ index f2677922cb97c9aa34f2e80769ac9cccc3dc8089..958b013cc4805704cec9a87835f3541e while (!world.noCollision(this, this.getBoundingBox(), true) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) { // Paper - make sure this loads chunks, we default to NOT loading now this.setPos(this.getX(), this.getY() + 1.0D, this.getZ()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739..08a013310970c8223b2e942992a0df2e99fb419b 100644 +index 5333488e606f2966271e1d25bacfa4196ca5145b..9a68d910b0629c0dc7dce482f81752de7900304c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -92,7 +92,7 @@ public class ServerPlayerGameMode { @@ -176,7 +176,7 @@ index c29ac2fd8dd08fe0c87abc3efb92e539dfdfd739..08a013310970c8223b2e942992a0df2e this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit this.level.updateSleepingPlayerList(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cd527e612a8a84451f9ef1fa0fcc900e16f54da1..e018cf9ca617adec197e7fa8e116287633002e62 100644 +index 57fa7cdcb2feb959cb413d4675fca11544236628..423aa9b56c9e9152bba00f47a71ae41612bebdbd 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -711,8 +711,10 @@ public abstract class PlayerList { @@ -442,7 +442,7 @@ index 6e45582f8ea7dd2a46f58369c5581764538bff0d..3ecc92439fc85d224ff52f41c5e34079 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java -index 93f5e583635a2addeabf2adff9374dcec0b66ee4..843926beb1edd897724b512ad915894fa4a2da6c 100644 +index db8d2157df0b276313493af224be343ae0de0917..b53d27965d91ee19722f0325f6e0ba3a08684ea5 100644 --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java @@ -68,7 +68,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { diff --git a/patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch index aece2cd818..4c638e8ea7 100644 --- a/patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0837-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0a4586d1b847de49d9e6faa16dba6de4a6a7cca6..a1411657b226c3eb3fb68bbf7f7afe8524fd96b2 100644 +index 675bc8df01ad9e338541e16575c9ec8e538787e2..c71a844064f15bdcc2f4fab14b7ace80d95269c0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2641,7 +2641,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch index 63247467d1..bf1b2c07c7 100644 --- a/patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0840-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 08a013310970c8223b2e942992a0df2e99fb419b..9fcac4412d7af04b233e34bd4b5501bcb61855e2 100644 +index 9a68d910b0629c0dc7dce482f81752de7900304c..a4058e8ce468ef515236813b034f1a08d5d9589f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -516,6 +516,7 @@ public class ServerPlayerGameMode { diff --git a/patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch index 836d117e18..996866eed8 100644 --- a/patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch +++ b/patches/server/0841-Add-PlayerInventorySlotChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 958b013cc4805704cec9a87835f3541e7d3c7faa..8c7356f06e4e7fcaac6fd04fbfd7b471e3bbeaef 100644 +index 482cf5cf164ee33691a5581c6acafb5959705c83..78e0c0b1eb659733d555d17dbeca8f186572b777 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -379,6 +379,25 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0848-Add-EntityToggleSitEvent.patch b/patches/server/0848-Add-EntityToggleSitEvent.patch index 7b27f726cd..f7035ccd1e 100644 --- a/patches/server/0848-Add-EntityToggleSitEvent.patch +++ b/patches/server/0848-Add-EntityToggleSitEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityToggleSitEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index 1999cda5876bb12283d8c91a1b3e737c0d27bc38..4d32db04040014dba8935d1cb601e0da1a5d5b02 100644 +index 4d893c445af2b6dc74d5ad731b69eb5a488817b4..e4550d3ac8d93e0dd9a54e41fbbbef2ef9d4f55e 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -67,7 +67,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { @@ -31,7 +31,7 @@ index 1999cda5876bb12283d8c91a1b3e737c0d27bc38..4d32db04040014dba8935d1cb601e0da if (inSittingPose) { this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1)); diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 96799179b0dd1886f0cdc386f04e152a19b3337d..3d771b137dc29579614aa4c15d12bd456cdc608a 100644 +index 94bb69a7f5795e0fbee171433632b5c3bca3b902..287e52dc844c2a64dac74dad117b775f46631157 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder { @@ -69,7 +69,7 @@ index 130761afcaa6723e0a9d9a518f1b526c344484b4..25a7602670b9f736b3b9ff4523bc867e } diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index faf3e31f23d71bbc345bf98d4240490ac4677843..17cff1a4657f688ed704404f76f6ceead3be3be1 100644 +index 570b39592e7e3a24828c233ec2a2f113b9ef5868..e89f454fe178483a7db381591a4a345ac24db2b8 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java @@ -556,7 +556,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl diff --git a/patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index bf94351fb2..acec1447d5 100644 --- a/patches/server/0854-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0854-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 fcef36f5314107f416953fbd0f891da7348c2243..f46640f3e3305b133bd49271377cedae4fe31ab5 100644 +index 2de97b71c16094c39a0d1eb2880d1b036b44b710..9634ff08d14500216835423376dbc86f3b0ffd35 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/0861-check-global-player-list-where-appropriate.patch b/patches/server/0861-check-global-player-list-where-appropriate.patch index c890ca3a30..f165c37f7f 100644 --- a/patches/server/0861-check-global-player-list-where-appropriate.patch +++ b/patches/server/0861-check-global-player-list-where-appropriate.patch @@ -7,7 +7,7 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c3ee52f2ad47c6f92b0e8cb284a14a3376fabba7..0bf8cf88a3385f21ffc00096a4af5ce76070614e 100644 +index c71a844064f15bdcc2f4fab14b7ace80d95269c0..77199a85df9559eeb83b6410ab0e1793020fd0c1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2764,4 +2764,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -24,7 +24,7 @@ index c3ee52f2ad47c6f92b0e8cb284a14a3376fabba7..0bf8cf88a3385f21ffc00096a4af5ce7 + // 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 0d0299482be6c906575626dc352cd13ae8be4569..f3d201cba18be448a52304a43ec05b109010bb98 100644 +index cc774a2803051a5d981ecece2e9a992f09850ecf..10b838b486fa857645bb12ea2043727996b4aadf 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/0862-Fix-async-entity-add-due-to-fungus-trees.patch index c995b59671..a3e5226fad 100644 --- a/patches/server/0862-Fix-async-entity-add-due-to-fungus-trees.patch +++ b/patches/server/0862-Fix-async-entity-add-due-to-fungus-trees.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix async entity add due to fungus trees diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index 49c7825156afd053df1b7721a63070b51427aff2..277c8e429481ca9763ddac9e700735d25aba78e9 100644 +index 1c2ec978f923521322aaec59b4e88d26d656b6cd..5ece375eaf6bcc61864997a389bb5e24625e4505 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java @@ -249,6 +249,7 @@ public class WorldGenRegion implements WorldGenLevel { diff --git a/patches/server/0864-Friction-API.patch b/patches/server/0864-Friction-API.patch index 443e360cd3..c91e0ac630 100644 --- a/patches/server/0864-Friction-API.patch +++ b/patches/server/0864-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 f3d201cba18be448a52304a43ec05b109010bb98..38d0def27625f5b7918cc2cebad0d9db2596ff3b 100644 +index 10b838b486fa857645bb12ea2043727996b4aadf..40e1caa2c070f11d7195a707ec628f40bccdeef7 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 { @@ -55,7 +55,7 @@ index f3d201cba18be448a52304a43ec05b109010bb98..38d0def27625f5b7918cc2cebad0d9db if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 6b18f23b57c7000dce9726df98a509ee9477f6d2..c34c698d389da29c9cfaa56cb8023e30416a14ba 100644 +index e19a0f1fac3dd04927f73f3d11a921ffc4608388..491a521f0e5e272fbad7870fa3adefdea22e179f 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity { diff --git a/patches/server/0867-Sync-offhand-slot-in-menus.patch b/patches/server/0867-Sync-offhand-slot-in-menus.patch index 0b118ff945..a71c963154 100644 --- a/patches/server/0867-Sync-offhand-slot-in-menus.patch +++ b/patches/server/0867-Sync-offhand-slot-in-menus.patch @@ -8,7 +8,7 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th by pressing the offhand swap item diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 24e6808e325bd80a55c94309aeab835804b03973..2c3a6cee9519f44c40227c5d9cbd63cc483d2d60 100644 +index 78e0c0b1eb659733d555d17dbeca8f186572b777..6bf33688882e3dca8868590454a9d25567a6a780 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -348,6 +348,13 @@ public class ServerPlayer extends Player { @@ -26,7 +26,7 @@ index 24e6808e325bd80a55c94309aeab835804b03973..2c3a6cee9519f44c40227c5d9cbd63cc public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) { ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack)); diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index c18348f4ea79b15b081cf7ba3bd9d77212aa086e..cd82b7e83f79e813d9d87d074bbccad4d2712d60 100644 +index 2a73cdc6b347aa31a74c2372b0bdc7b00706004a..9eef711958443726249a75e6b4fac70a1714397e 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu { diff --git a/patches/server/0868-Player-Entity-Tracking-Events.patch b/patches/server/0868-Player-Entity-Tracking-Events.patch index 3488a71fe2..a52a97fb5f 100644 --- a/patches/server/0868-Player-Entity-Tracking-Events.patch +++ b/patches/server/0868-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 f46640f3e3305b133bd49271377cedae4fe31ab5..1a44341de58519dff830afce72707c286ac51364 100644 +index 9634ff08d14500216835423376dbc86f3b0ffd35..09fa4c28d43c8fddc84056f5cf19dedc6ffe2077 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/0870-Properly-resend-entities.patch b/patches/server/0870-Properly-resend-entities.patch index 1dc13b7d4d..4eec16fa3e 100644 --- a/patches/server/0870-Properly-resend-entities.patch +++ b/patches/server/0870-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 3f60f33c43dfcc4ea99a80c66a70222b2ea2f4a6..2fdc9fcc8f88d78fd4b06bfae947c5cb28f8eea7 100644 +index 5cb69d9fbff2ee1e647c21e40a17b7244815f213..e12f9616a3ef7663bafdb986a73cff858beb3a52 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 @@ -98,7 +98,7 @@ index 3f60f33c43dfcc4ea99a80c66a70222b2ea2f4a6..2fdc9fcc8f88d78fd4b06bfae947c5cb } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e018cf9ca617adec197e7fa8e116287633002e62..70a1e695a037833c46749a3371ad866b1971037d 100644 +index 423aa9b56c9e9152bba00f47a71ae41612bebdbd..0223b11df825964f205193268e5c96d7e2d13b6c 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -376,7 +376,7 @@ public abstract class PlayerList { diff --git a/patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch index 9224cb2a3c..021c52f132 100644 --- a/patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch +++ b/patches/server/0871-Fixes-and-additions-to-the-SpawnReason-API.patch @@ -34,7 +34,7 @@ index 9652e3385ad10e5d825dd141f6be3522c596916d..baea154a24d1b888af18b9b792db9ede this.discard(); } diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java -index 0a2de99c22cfcc96a664dc2afe7379987ea815db..452b3070e68dda1a4c7ba99cbefcaab5c5958bdd 100644 +index 3777e60d0b81e242b1a6e9b0be3e2f21a1642335..bb45605e1ef3e6cfa1976cf9e449456b19cc7c9c 100644 --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java @@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block { @@ -47,7 +47,7 @@ index 0a2de99c22cfcc96a664dc2afe7379987ea815db..452b3070e68dda1a4c7ba99cbefcaab5 } diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -index 3cedc349e79665d3d471c92b5dca25c9e66ca0bf..4d3dc58750f80d4aacb46c98a8ffc66acb4a2edc 100644 +index 8782b05575e4a8d5e5c667c43808442b81c13f6b..6d073e82daf41e35b63703ab9bce8c576862eb3e 100644 --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java @@ -88,7 +88,7 @@ public class SnifferEggBlock extends Block { diff --git a/patches/server/0877-Improve-logging-and-errors.patch b/patches/server/0877-Improve-logging-and-errors.patch index c6ee1aa176..395a7b5e06 100644 --- a/patches/server/0877-Improve-logging-and-errors.patch +++ b/patches/server/0877-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 2fdc9fcc8f88d78fd4b06bfae947c5cb28f8eea7..c64cbcd11362ad3e4cf63d769732a5158d616c4c 100644 +index e12f9616a3ef7663bafdb986a73cff858beb3a52..087f26d52536ec1f196f21e2df1a7159a4a63c1a 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/0878-Improve-PortalEvents.patch index 871198c900..615937481d 100644 --- a/patches/server/0878-Improve-PortalEvents.patch +++ b/patches/server/0878-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 1a44341de58519dff830afce72707c286ac51364..68730383d7ad770cf971e3ae27cff329580b9ea8 100644 +index 09fa4c28d43c8fddc84056f5cf19dedc6ffe2077..4ea43e3fdc2b8b85c9524f9404fe3535adacc65d 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/0880-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0880-Add-missing-SpigotConfig-logCommands-check.patch index fcf0ee0222..2f3fa4732c 100644 --- a/patches/server/0880-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0880-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 c64cbcd11362ad3e4cf63d769732a5158d616c4c..6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7 100644 +index 087f26d52536ec1f196f21e2df1a7159a4a63c1a..5e6632e3557cf43b4d71ad457d64f3be3518187e 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/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index b47d9f4550..3fb38b64f2 100644 --- a/patches/server/0884-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0884-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 68730383d7ad770cf971e3ae27cff329580b9ea8..25f611ea672ed8ea112a2e31444d0dbdb59f9945 100644 +index 4ea43e3fdc2b8b85c9524f9404fe3535adacc65d..ee5dfa18049bb36aa6403e6342aa56fb1bebf172 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/0886-Use-single-player-info-update-packet-on-join.patch b/patches/server/0886-Use-single-player-info-update-packet-on-join.patch index 2fd99efd57..29689c7639 100644 --- a/patches/server/0886-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0886-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 6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7..19c1c398ca8e91faa23e8dc3736cd0945a540419 100644 +index 5e6632e3557cf43b4d71ad457d64f3be3518187e..3fe70d0c82e30b3893e24119f792d308e2f37112 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 @@ -18,7 +18,7 @@ index 6d8d07f30cc18357b2b3a6aa50c54deb1c52f2b7..19c1c398ca8e91faa23e8dc3736cd094 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 70a1e695a037833c46749a3371ad866b1971037d..64635241bf3c1dd1e2f7e6756b34d497875aa6fa 100644 +index 0223b11df825964f205193268e5c96d7e2d13b6c..8d8cc5463f261334d0aabf4fd31854a2af862acc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -358,6 +358,7 @@ public abstract class PlayerList { diff --git a/patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch index bb2e2a0779..87f04dba1d 100644 --- a/patches/server/0887-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0887-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 38d0def27625f5b7918cc2cebad0d9db2596ff3b..4b6858596f03233bf432329c1cdfe306cd0781ac 100644 +index 40e1caa2c070f11d7195a707ec628f40bccdeef7..15ebd6c287d90af9d4acb3529c2fb1b9394d3caf 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/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch index 82ed0eb325..122e19307c 100644 --- a/patches/server/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch +++ b/patches/server/0893-Update-the-flag-when-a-captured-block-state-is-outda.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Update the flag when a captured block state is outdated diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 28ed2605bc3f4d657f6f58729134aeb81a98dac4..c7eb97008b8096f69602678722506fddbeac3148 100644 +index e853c9fdc8ebde6a653aacbb1db6679ce4d9d50b..8d887a07bd2ef11667ccb34872d629656859fb6c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -923,6 +923,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch index aaf912275d..a1dddb27c4 100644 --- a/patches/server/0898-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0898-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 4b6858596f03233bf432329c1cdfe306cd0781ac..a89b49052556cb26accc1957aaef2aea63f6f583 100644 +index 15ebd6c287d90af9d4acb3529c2fb1b9394d3caf..da89e72040e2d109eebf2d1ca0089d695394f959 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/0903-Optimize-Hoppers.patch b/patches/server/0903-Optimize-Hoppers.patch index da2c0e69cf..17c49474dc 100644 --- a/patches/server/0903-Optimize-Hoppers.patch +++ b/patches/server/0903-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 7c9f7aefc59ae1a785b261f80f25d3304f3bdd22..45f7e7efa8cf407cae2db657074478565590bd12 100644 +index 5981171f4960b61a448014ccaa5336bdc556ae81..cf94634cc11e368cea60a9005d11c7f7aa64fbae 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 80682ce58d0b0ce0409d162f447b585163c36753..9f1dfb6c7c44d0525792d3517bfdad6479fb12a7 100644 +index 6b38e515a77df7fb06b41fbedaa1090b1cac78fb..a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9 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 { @@ -85,7 +85,7 @@ index 80682ce58d0b0ce0409d162f447b585163c36753..9f1dfb6c7c44d0525792d3517bfdad64 itemstack.setPopTime(this.getPopTime()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 5bdad1866386908b9fef74d15862eb107fabe68f..a6f47fa9f6065ed669414996b447e2daf34b3495 100644 +index 0fdf74317a20a250b474978c9e50a6c533abfbe6..4ce7a7947fa727e64556148f923508ce76c128c4 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -26,6 +26,7 @@ import co.aikar.timings.MinecraftTimings; // Paper diff --git a/patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch index e0c9d13bb8..78d80cb194 100644 --- a/patches/server/0904-Fix-beehives-generating-from-using-bonemeal.patch +++ b/patches/server/0904-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 9f1dfb6c7c44d0525792d3517bfdad6479fb12a7..8d051e23e16cef71e54fef2955720f604c306221 100644 +index a01a7abcbfa95d75191cc7fbdad6cbebfe06d3f9..ae39d5f386b3f307ba85b359d552a8885d232f7f 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/0906-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0906-Treat-sequence-violations-like-they-should-be.patch index f0ef8afa4a..552d683368 100644 --- a/patches/server/0906-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0906-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 19c1c398ca8e91faa23e8dc3736cd0945a540419..8a907853a81480f2b1bcb9d82b62d9d595dcbd35 100644 +index 3fe70d0c82e30b3893e24119f792d308e2f37112..2cdae57a255305a16fae6ccf431aea78e2c84429 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/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch index be1254f5fd..6907799079 100644 --- a/patches/server/0908-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0908-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 8a907853a81480f2b1bcb9d82b62d9d595dcbd35..caa9fd305c90fe84b2eebca0f244c818800021ca 100644 +index 2cdae57a255305a16fae6ccf431aea78e2c84429..533d637c634af9bf086cf3d480f219f7c2d3f34a 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/0909-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index 012562f39d..0b5c35b7d0 100644 --- a/patches/server/0909-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0909-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0bf8cf88a3385f21ffc00096a4af5ce76070614e..eff2a7e25a7b99613c1e208058c316f1e3586995 100644 +index 77199a85df9559eeb83b6410ab0e1793020fd0c1..799ffd47bca76dd9a8c19ab5d37d09e82b477717 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1724,6 +1724,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0910-Use-array-for-gamerule-storage.patch b/patches/server/0910-Use-array-for-gamerule-storage.patch index 41d8673025..37b97e470a 100644 --- a/patches/server/0910-Use-array-for-gamerule-storage.patch +++ b/patches/server/0910-Use-array-for-gamerule-storage.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Use array for gamerule storage diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 6c1af24f2f02ef5fe1be135b4071362f2297147a..a9be16e53a9df34af3495048aa9af7b1a3efea4a 100644 +index dd03426943dd380cefe12afe3e63c3180a22ec4f..afe91d02363bf7385d34447dda8960980ec48443 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java @@ -114,6 +114,7 @@ public class GameRules { diff --git a/patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch index 01bdc03d01..eb7ea6ae10 100644 --- a/patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch +++ b/patches/server/0912-Fix-demo-flag-not-enabling-demo-mode.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix demo flag not enabling demo mode https://github.com/PaperMC/Paper/issues/9046 diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 786104fb12f02f493619dfc0d81ab98140d70912..2568272a10c0d92bc49c0c244b10791db7bfae2b 100644 +index a2d7ed6c68729d1d46b1ac949b7e98cd6badedba..a5e6b99b95e8408136f4c665aec070c5adc448da 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -333,7 +333,9 @@ public class Main { diff --git a/patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch index d1d793bb08..054250373f 100644 --- a/patches/server/0921-Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/0921-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 25f611ea672ed8ea112a2e31444d0dbdb59f9945..55e53e6e947107fc27ef8322963a877e2deeb741 100644 +index ee5dfa18049bb36aa6403e6342aa56fb1bebf172..92fe1b4eb9d23031476c6545f653cee37745bbf8 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 @@ -72,7 +72,7 @@ index 270dd1db56b187bffaedba9f2b86b3e46dda3152..5b6d5c799cc8e601a01b6967917e15ba } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java -index 2c376687349825833e6d9a5ca92ce6afb98c36a3..856984601a59f51544b741f5f2137028b53c9439 100644 +index c1c52f4fc5f900fac4098e5e37c52dfc4e82b8bb..236f94348ff8da661e23e3e17b7fc1b143680da9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java @@ -60,6 +60,7 @@ public abstract class AbstractProjectile extends CraftEntity implements Projecti diff --git a/patches/server/0923-Fix-block-place-logic.patch b/patches/server/0923-Fix-block-place-logic.patch index 227c84be9e..ac9628a954 100644 --- a/patches/server/0923-Fix-block-place-logic.patch +++ b/patches/server/0923-Fix-block-place-logic.patch @@ -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 8d051e23e16cef71e54fef2955720f604c306221..9ac862354c7026845287344bbc2a94c958f65a59 100644 +index ae39d5f386b3f307ba85b359d552a8885d232f7f..037e09bc8990036b76f75bca9bf14969ede6d6ad 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 { @@ -41,7 +41,7 @@ index 8d051e23e16cef71e54fef2955720f604c306221..9ac862354c7026845287344bbc2a94c9 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c7eb97008b8096f69602678722506fddbeac3148..28e56e61ff5c14683f55780ed83e593f6b06503c 100644 +index 8d887a07bd2ef11667ccb34872d629656859fb6c..7311a9a3b8c4b62b232ea54568c4090a8e121f26 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1038,17 +1038,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch index 65daee2e55..89d9eaec62 100644 --- a/patches/server/0924-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch +++ b/patches/server/0924-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 9ac862354c7026845287344bbc2a94c958f65a59..b7e30d0a3c3c945addfa22c805af9608d68284b5 100644 +index 037e09bc8990036b76f75bca9bf14969ede6d6ad..f5cc647054148c1e170ca3f49128d4ea4acaf4dc 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/0925-Call-BlockGrowEvent-for-missing-blocks.patch index 16cfb6da50..d2a9eadeb9 100644 --- a/patches/server/0925-Call-BlockGrowEvent-for-missing-blocks.patch +++ b/patches/server/0925-Call-BlockGrowEvent-for-missing-blocks.patch @@ -19,7 +19,7 @@ index ba94ff948ccaddc16d3452306722759c115bb90a..acaa13f195467c3ebe70677b8440a883 world.setBlock(pos.above(), blockState.setValue(HALF, DoubleBlockHalf.UPPER), 3); } diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -index 4d3dc58750f80d4aacb46c98a8ffc66acb4a2edc..77952da3134d782609c66e93f5d52ec5c10d499d 100644 +index 6d073e82daf41e35b63703ab9bce8c576862eb3e..7be4e32a4409b539839a480ef83750ed4b5359a6 100644 --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java @@ -72,8 +72,13 @@ public class SnifferEggBlock extends Block { diff --git a/patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch index bedbcb956a..73688ac4a3 100644 --- a/patches/server/0926-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch +++ b/patches/server/0926-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 56e5dff13323068ad2911649e6285aa915d787bd..15dfa910d91ac49f4d264d0289b891a47beabe25 100644 +index f428bff49d109d2045634505ddcab90f89771a81..a6dff659356ca8ce8cf24eca8c6c1e9cb00a3979 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/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch b/patches/server/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch index 4ff44ca179..d14b29086f 100644 --- a/patches/server/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch +++ b/patches/server/0930-Temp-Pre-init-PlayerChunkLoaderData-in-order-to-prep.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Temp: Pre-init PlayerChunkLoaderData in order to prepopulate diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index aca49044899f65d7e91e5762fb58dbaffbfbd4c9..ef8bbef6e4143b9432ee2ae2fb79e2aa2a9b84df 100644 +index 39f361e2d3b31dc2587042df225132884a9156c0..16e73128115ef92adefbd7818fef3a4b9bcebad2 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -368,6 +368,7 @@ public class Main { diff --git a/patches/server/0932-Properly-cancel-usable-items.patch b/patches/server/0932-Properly-cancel-usable-items.patch index d0ca00be32..6ac4390ff0 100644 --- a/patches/server/0932-Properly-cancel-usable-items.patch +++ b/patches/server/0932-Properly-cancel-usable-items.patch @@ -10,7 +10,7 @@ The underlying issue of this is that the client modifies their synced data value them in order for the client to reset their using item state. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index f58386e952d29a16d160b628a23efbe102791277..d0404f7f103b4f98f9d76cf2a5cddec0dfa47b6f 100644 +index a4058e8ce468ef515236813b034f1a08d5d9589f..0357e190f6cc0724223ed705b19651d865bf853b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -557,6 +557,7 @@ public class ServerPlayerGameMode { @@ -34,7 +34,7 @@ index f58386e952d29a16d160b628a23efbe102791277..d0404f7f103b4f98f9d76cf2a5cddec0 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 caa9fd305c90fe84b2eebca0f244c818800021ca..3f9106eb34db5df10961a44f56f2110fec8bd3c6 100644 +index 533d637c634af9bf086cf3d480f219f7c2d3f34a..eaa63c02fcb49f0c99842d5448ef883d37c578db 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 caa9fd305c90fe84b2eebca0f244c818800021ca..3f9106eb34db5df10961a44f56f2110f return; } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a89b49052556cb26accc1957aaef2aea63f6f583..fe5c46c9bb6130a29ec9cbb65e9e7142a79a157e 100644 +index da89e72040e2d109eebf2d1ca0089d695394f959..24d68144d4ae2d34cff2b1378b352e2989cd4b76 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/0933-Add-event-for-player-editing-sign.patch index 236c286da9..7d6fd88d53 100644 --- a/patches/server/0933-Add-event-for-player-editing-sign.patch +++ b/patches/server/0933-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 b7e30d0a3c3c945addfa22c805af9608d68284b5..244fcdcb153b1f4d842405302261afe1cce67daa 100644 +index f5cc647054148c1e170ca3f49128d4ea4acaf4dc..734672b38bd9be4ff63d61febc141278f14d7065 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/0934-Only-tick-item-frames-if-players-can-see-it.patch index 704c5443df..6b0591c84a 100644 --- a/patches/server/0934-Only-tick-item-frames-if-players-can-see-it.patch +++ b/patches/server/0934-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 9d5d32705f9d8aadb51019f17b4db76a9bc6a04b..4eee77a14c941b637ec9e9dc844e67c5e933bfe7 100644 +index ff57dbd34874e020edd7074c71cfa635eab0287b..62ee13247a12723e43f114323a2ec1917835920e 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/0938-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0938-Don-t-load-chunks-for-supporting-block-checks.patch index 6ecacbc828..87f6a4dd07 100644 --- a/patches/server/0938-Don-t-load-chunks-for-supporting-block-checks.patch +++ b/patches/server/0938-Don-t-load-chunks-for-supporting-block-checks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't load chunks for supporting block checks diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 55e53e6e947107fc27ef8322963a877e2deeb741..148f146da8f5887deaa52991a8e484d54918f2b9 100644 +index 92fe1b4eb9d23031476c6545f653cee37745bbf8..2a6c5af6a3d281436ba39a891015f5852ad31444 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1362,7 +1362,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S diff --git a/patches/server/0950-Implement-PlayerFailMoveEvent.patch b/patches/server/0950-Implement-PlayerFailMoveEvent.patch index a961551be4..e072d3d72d 100644 --- a/patches/server/0950-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0950-Implement-PlayerFailMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3f9106eb34db5df10961a44f56f2110fec8bd3c6..e400efa2219fca219ee52021c664409907bc839d 100644 +index eaa63c02fcb49f0c99842d5448ef883d37c578db..40fb76d2fadbe82515311d65418c90fbfb4a9ab9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1316,8 +1316,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0951-Folia-scheduler-and-owned-region-API.patch b/patches/server/0951-Folia-scheduler-and-owned-region-API.patch index ca07db017c..4c056e0d2b 100644 --- a/patches/server/0951-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0951-Folia-scheduler-and-owned-region-API.patch @@ -1148,7 +1148,7 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 45f7e7efa8cf407cae2db657074478565590bd12..d34f0d5abd93ed1729a00405d78a34a1873ba086 100644 +index cf94634cc11e368cea60a9005d11c7f7aa64fbae..a8a8935d29564cc1deb4cac95fc8f9bb76848099 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1629,6 +1629,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); @@ -1685,6 +1688,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index eff2a7e25a7b99613c1e208058c316f1e3586995..973a9deba3b11399cafb3482f4c56c9c648c4d5f 100644 +index 799ffd47bca76dd9a8c19ab5d37d09e82b477717..8a7de73ce83966c81c456d4744b04fd0f886646d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -570,6 +570,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -52,7 +52,7 @@ index eff2a7e25a7b99613c1e208058c316f1e3586995..973a9deba3b11399cafb3482f4c56c9c // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 8bfd31ce3b4f88f0b32adb242c53771d9930b855..921d9d8bc6265631073d105fb8de68562f902778 100644 +index 9024cd25faabb4d5aed3681d4389baad6ad7b964..82aabd5234102c3763891ebe3009e75f243e539b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -124,7 +124,7 @@ public class ServerPlayerGameMode { @@ -65,7 +65,7 @@ index 8bfd31ce3b4f88f0b32adb242c53771d9930b855..921d9d8bc6265631073d105fb8de6856 if (this.hasDelayedDestroy) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index fe5c46c9bb6130a29ec9cbb65e9e7142a79a157e..484609925cc8cbed7b31d3c7780b6d30f6ad454c 100644 +index 24d68144d4ae2d34cff2b1378b352e2989cd4b76..d9019131e16e401ea057df14f095990e5c42adf4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3819,6 +3819,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1005-Optimise-nearby-player-retrieval.patch b/patches/server/1005-Optimise-nearby-player-retrieval.patch index e170ab23cb..902b9ab5fb 100644 --- a/patches/server/1005-Optimise-nearby-player-retrieval.patch +++ b/patches/server/1005-Optimise-nearby-player-retrieval.patch @@ -8,7 +8,7 @@ we can instead use the nearby player tracking system to reduce the number of tests per search. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 973a9deba3b11399cafb3482f4c56c9c648c4d5f..dcd3b58165df89fa57e37df532dad263cd124f6a 100644 +index 8a7de73ce83966c81c456d4744b04fd0f886646d..e57d86b0f66f5ca6e494c693128d67eedbb8ed0d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -581,6 +581,115 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/1006-Fix-missing-map-initialize-event-call.patch b/patches/server/1006-Fix-missing-map-initialize-event-call.patch index c04e5b3249..f3b3bbca54 100644 --- a/patches/server/1006-Fix-missing-map-initialize-event-call.patch +++ b/patches/server/1006-Fix-missing-map-initialize-event-call.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix missing map initialize event call public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index dcd3b58165df89fa57e37df532dad263cd124f6a..01c7b3623314bb0e6fa0a135de3db7c42ca5e373 100644 +index e57d86b0f66f5ca6e494c693128d67eedbb8ed0d..51f14e0c22dd66d8e33c132974139922fcadf095 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2133,13 +2133,25 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/1017-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/1017-Add-predicate-for-blocks-when-raytracing.patch index 750db7206c..c5b19df963 100644 --- a/patches/server/1017-Add-predicate-for-blocks-when-raytracing.patch +++ b/patches/server/1017-Add-predicate-for-blocks-when-raytracing.patch @@ -47,7 +47,7 @@ index 7df62a219d0bcffc793c1a8c55b6ed244fdeb199..4b7ea18a34675702c5b17c4819f79778 Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6bd86a7183042f9023b9e8cf6423e0a1cbfde97a..ed2a02514b7a6b67d45890fedb9bb9f4b10846d3 100644 +index eff91dcea1646ef3745d0576a656f25a37783dae..2794b85c36f22969cf6e4cfec60bc3911a7e4f38 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1125,9 +1125,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/1018-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/1018-Broadcast-take-item-packets-with-collector-as-source.patch index c028ab2ffc..62cbb0b509 100644 --- a/patches/server/1018-Broadcast-take-item-packets-with-collector-as-source.patch +++ b/patches/server/1018-Broadcast-take-item-packets-with-collector-as-source.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Broadcast take item packets with collector as source This fixes players (which can't view the collector) seeing item pickups with themselves as the target. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 484609925cc8cbed7b31d3c7780b6d30f6ad454c..03ca9ae4a195a6caacf2424e069a9644357e7e06 100644 +index d9019131e16e401ea057df14f095990e5c42adf4..6f7e05c6d73999613ae5980ec70b841299d021b1 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3704,7 +3704,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1019-Expand-LingeringPotion-API.patch b/patches/server/1019-Expand-LingeringPotion-API.patch index 9939920a04..1a12487d60 100644 --- a/patches/server/1019-Expand-LingeringPotion-API.patch +++ b/patches/server/1019-Expand-LingeringPotion-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand LingeringPotion API diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index 2f80d484ad523860322483cebe92cf7cd8cfad22..b34dbb083ecc3a6ead7721391a79e7061e098498 100644 +index d945c0a7b8ba87301e12b49f859e6fbe65de04f3..4f6e0161694c2f51642fffcf1ce1cb0ed45b194d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java @@ -288,7 +288,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie diff --git a/patches/server/1021-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/1021-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch index 7fb5a2b316..5c40b1b6f7 100644 --- a/patches/server/1021-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch +++ b/patches/server/1021-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix strikeLightningEffect powers lightning rods and clears diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java -index 17f664f75aaaea042477e4b467c17c17d1024e3d..da4297f756e389deacda6c06afeb39f1ee204aab 100644 +index 0db0d67f9ac15372becc1166c37f7f0aede4a4da..a9e70484b01fc082ea25d43d1d42833499b5e41d 100644 --- a/src/main/java/net/minecraft/world/entity/LightningBolt.java +++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java @@ -45,6 +45,7 @@ public class LightningBolt extends Entity { @@ -45,7 +45,7 @@ index 17f664f75aaaea042477e4b467c17c17d1024e3d..da4297f756e389deacda6c06afeb39f1 BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ed2a02514b7a6b67d45890fedb9bb9f4b10846d3..e7d503366c58e567c392b040e46a14457d86ad8d 100644 +index 2794b85c36f22969cf6e4cfec60bc3911a7e4f38..1e71506e079616028b4eaf577a5ca410ee38d5a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -773,7 +773,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/1023-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/1023-Fix-several-issues-with-EntityBreedEvent.patch index 7ed4b69881..1b42ca075f 100644 --- a/patches/server/1023-Fix-several-issues-with-EntityBreedEvent.patch +++ b/patches/server/1023-Fix-several-issues-with-EntityBreedEvent.patch @@ -69,7 +69,7 @@ index 25a7602670b9f736b3b9ff4523bc867e65c0998a..ead5060ae2840a0519c5bf8b4b84aa12 if (this.level().isClientSide || this.isSitting() || this.isInWater()) { return InteractionResult.PASS; diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 17cff1a4657f688ed704404f76f6ceead3be3be1..abd913079c00f335944c8eb590fd08bd518b1a10 100644 +index e89f454fe178483a7db381591a4a345ac24db2b8..f693d4d6a6a3c3d31c2d85ceb5b5b01366c970a1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java @@ -389,7 +389,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl @@ -104,7 +104,7 @@ index 8fe5a4ccf474c094b8081828c93e8973cdabb6ed..d9539f5275c4cb63910ba79aa522d956 } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 5f61c97478f005aaaaad1b027118079db7275cf7..4863586b1c54192e0228342a0c36561348ebb3fb 100644 +index 9b5b894d43f25566ab9c3698705e978ab823a0d2..6623674136b0f865d5b3d7a10d3bf05793b82f87 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java @@ -191,7 +191,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder { 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 03ca9ae4a195a6caacf2424e069a9644357e7e06..a42023793805b294dc167ec2cd5445f32b0c51eb 100644 +index 6f7e05c6d73999613ae5980ec70b841299d021b1..8713ee8ff8a2b269c6d138e7f483a80fa2521793 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 52c389472e013e658344496218689465350bf8a3..8c4d434bffa640a17d6870080f79cd0e492c7537 100644 +index 0540929bd362b266295ea6770ce2fb351b614463..4aacb6675e8fe577749fa83ad471eb6e6cf930df 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/1029-Restore-vanilla-entity-drops-behavior.patch b/patches/server/1029-Restore-vanilla-entity-drops-behavior.patch index f67401b44a..422b7f4acf 100644 --- a/patches/server/1029-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/1029-Restore-vanilla-entity-drops-behavior.patch @@ -9,7 +9,7 @@ on dropping the item instead of generalizing it for all dropped items like CB does. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ab8129da3d41c9e64897f66d0f6de24dc6d697d1..d186a46f9195d45aa91e3a2712e583ba024487f4 100644 +index f4f8c60a24664b6fb33361ae830987701a0e9394..3506cd1c5960b58fe2805d9cc7ea6758f45d4e2a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -944,22 +944,20 @@ public class ServerPlayer extends Player { @@ -28,7 +28,7 @@ index ab8129da3d41c9e64897f66d0f6de24dc6d697d1..d186a46f9195d45aa91e3a2712e583ba } } } - if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - preserve this check from vanilla + if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - fix player loottables running when mob loot gamerule is false // SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule) this.dropFromLootTable(damageSource, this.lastHurtByPlayerTime > 0); - for (org.bukkit.inventory.ItemStack item : this.drops) { @@ -36,7 +36,7 @@ index ab8129da3d41c9e64897f66d0f6de24dc6d697d1..d186a46f9195d45aa91e3a2712e583ba - } + loot.addAll(this.drops); // Paper this.drops.clear(); // SPIGOT-5188: make sure to clear - } // Paper + } // Paper - fix player loottables running when mob loot gamerule is false @@ -2442,8 +2440,8 @@ public class ServerPlayer extends Player { } @@ -50,7 +50,7 @@ index ab8129da3d41c9e64897f66d0f6de24dc6d697d1..d186a46f9195d45aa91e3a2712e583ba 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 8a7fc07a8500c25b427c13d38da005b56f0892c0..36e94a6afef269007384938aa0a2c25af212ec7c 100644 +index 96d2fa0278ada7fb706a39ca2a93f5259239229c..6f45f2fff258fa712c2637c8901453b13b34ee0b 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 8a7fc07a8500c25b427c13d38da005b56f0892c0..36e94a6afef269007384938aa0a2c25a 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 a42023793805b294dc167ec2cd5445f32b0c51eb..38793c3ab6db7e311866de88ba272b8e98178a4b 100644 +index 8713ee8ff8a2b269c6d138e7f483a80fa2521793..102fa2c9ed1a749503aa22f57666a9f28940f4a8 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/1030-Add-Structure-check-API.patch index 8785db4ed1..3ec45efbcd 100644 --- a/patches/server/1030-Add-Structure-check-API.patch +++ b/patches/server/1030-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 e7d503366c58e567c392b040e46a14457d86ad8d..f785e7b366175a32c834e1ebb56166a6fdcca3da 100644 +index 1e71506e079616028b4eaf577a5ca410ee38d5a8..44949a5a9351d8fcbae2987df77a61ec7de8d198 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/1031-Dont-resend-blocks-on-interactions.patch index cc93facb91..e09ac84311 100644 --- a/patches/server/1031-Dont-resend-blocks-on-interactions.patch +++ b/patches/server/1031-Dont-resend-blocks-on-interactions.patch @@ -8,7 +8,7 @@ In general, the client now has an acknowledgment system which will prevent block It should be noted that this system does not yet support block entities, so those still need to resynced when needed. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index be74f1360170c529b13979d865d7016f7f3ae5e8..8172449e198094d959d46d262c1136ec7e25a6da 100644 +index 82aabd5234102c3763891ebe3009e75f243e539b..f8fd44500fb2a5b8273d317dbb1789fae24252fd 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -199,7 +199,7 @@ public class ServerPlayerGameMode { @@ -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 32a3729b9f1caca789af8176737fc510761ee960..5caf48c84b8dd46903dbdacaa3a5e13272374e0e 100644 +index 74fb996f54783948ee1351f3d437666b4d462cba..94921512e50b7a4556101772e72d822897a04165 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/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index e22cda937c..b81e257b71 100644 --- a/patches/server/1037-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/1037-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 38793c3ab6db7e311866de88ba272b8e98178a4b..4cbb1f5d904191e59395df0177e76e94faae764c 100644 +index 102fa2c9ed1a749503aa22f57666a9f28940f4a8..ff2e6351e49dfdaab9639c28d34a6435e4a03047 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/1045-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/1045-Validate-ResourceLocation-in-NBT-reading.patch index 5860eeb99d..0a0ac3af7b 100644 --- a/patches/server/1045-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/1045-Validate-ResourceLocation-in-NBT-reading.patch @@ -66,7 +66,7 @@ index 42e2be9286b75a1d34845f303ffc65e96fdd5416..0b5334004b9d0489e8465824870662b4 } diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 6272b0e1e332789b983a486ee25226e2a1c9fdda..505fe5496044f090ce6f7d541b8c3e13c567b16d 100644 +index 2b2ff2a187410ef9431b0396c05935ffd17fd108..5a2144417783f859729fc93281edd9d577c59ca2 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -560,7 +560,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch index 904409a218..27f3eb631e 100644 --- a/patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch +++ b/patches/server/1046-Properly-handle-experience-dropping-on-block-break.patch @@ -7,7 +7,7 @@ This causes spawnAfterBreak to spawn xp by default, removing the need to manuall For classes that use custom xp amounts, they can drop the resources with disabling diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a8d22b48bd7108ca22faae178fcf82cb158ee7bb..b05e11e6b091c7616df5a9bbef867b06cafe3dc3 100644 +index 03c43220425411e0a135e7d63df276c4571d23d0..1496b870eaf99d4c3b6dd01159d7c2893fd9366b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1103,7 +1103,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {