diff options
Diffstat (limited to 'patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch')
-rw-r--r-- | patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch index 80d7e8f072..4b96d454ab 100644 --- a/patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0789-Fix-a-bunch-of-vanilla-bugs.patch @@ -87,31 +87,31 @@ index 829c72333664da0c06ce04af93ea39bb90ce0b67..b4f7e3ae855cbf48925f0db916501adf this.setSuccess(true); return stack; diff --git a/src/main/java/net/minecraft/server/commands/DeOpCommands.java b/src/main/java/net/minecraft/server/commands/DeOpCommands.java -index 40490d10649e92cf622849f1bb87538102b130c7..797efca662dcc0fe7f4cf0b4b7baa235ea044f1f 100644 +index 0283f26151488d715dc823a0008c9a37ef6740fb..d98447e58233745665f0833196226077d972cc2a 100644 --- a/src/main/java/net/minecraft/server/commands/DeOpCommands.java +++ b/src/main/java/net/minecraft/server/commands/DeOpCommands.java -@@ -34,7 +34,7 @@ public class DeOpCommands { +@@ -35,7 +35,7 @@ public class DeOpCommands { + if (playerList.isOp(gameProfile)) { playerList.deop(gameProfile); - ++i; - source.sendSuccess(() -> { -- return Component.translatable("commands.deop.success", targets.iterator().next().getName()); -+ return Component.translatable("commands.deop.success", gameProfile.getName()); // Paper - fixes MC-253721 - }, true); + i++; +- source.sendSuccess(() -> Component.translatable("commands.deop.success", targets.iterator().next().getName()), true); ++ source.sendSuccess(() -> Component.translatable("commands.deop.success", gameProfile.getName()), true); // Paper - fixes MC-253721 } } + diff --git a/src/main/java/net/minecraft/server/commands/OpCommand.java b/src/main/java/net/minecraft/server/commands/OpCommand.java -index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb10f662a6d 100644 +index 6854ca4d4fec2b4fa541c3fabf63787665572609..e7b444a10b244828827b3c66c53465206ea8e0ec 100644 --- a/src/main/java/net/minecraft/server/commands/OpCommand.java +++ b/src/main/java/net/minecraft/server/commands/OpCommand.java -@@ -39,7 +39,7 @@ public class OpCommand { +@@ -46,7 +46,7 @@ public class OpCommand { + if (!playerList.isOp(gameProfile)) { playerList.op(gameProfile); - ++i; - source.sendSuccess(() -> { -- return Component.translatable("commands.op.success", targets.iterator().next().getName()); -+ return Component.translatable("commands.op.success", gameProfile.getName()); // Paper - fixes MC-253721 - }, true); + i++; +- source.sendSuccess(() -> Component.translatable("commands.op.success", targets.iterator().next().getName()), true); ++ source.sendSuccess(() -> Component.translatable("commands.op.success", gameProfile.getName()), true); // Paper - fixes MC-253721 } } + diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java index f2d3dc066b00b685715eb5104234945c41a15f92..43c8f6a0615f392cc560b2259b116cc9d5fba4e7 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -139,7 +139,7 @@ index 57f54e3399f9d2d7fecdae62858d20e50caf7afd..b804941c76582871813ba813b9eef242 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 bc95420dcf5d23d028e5df6595899a8712550be8..84792f21cbb727bdb8f72b3574b39c4dad631612 100644 +index c99a672dd2d2e4972e9d4025e10e8863d0af1e6a..d831fb1f66dc38b6c9d3592944f94cc5eeaac864 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -419,14 +419,14 @@ public class ServerPlayer extends Player { @@ -206,12 +206,12 @@ index effe4c4fb37fe13aece70cdef4966047d4719af9..7152674d3f3fb98198585cb5ece2bb88 default SoundEvent getSaddleSoundEvent() { return SoundEvents.HORSE_SADDLE; diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/BegGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/BegGoal.java -index 9a46007245399481fb6e749d95e9e4791e799250..2afca5652541c9166278f8f2590ddb81003ae579 100644 +index 95ec11bfd4df6c53d6a4828f55c621cd08b0e666..f1b28965f6fe785e6e3a24fdb6db6676701338b9 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/BegGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/BegGoal.java -@@ -65,7 +65,7 @@ public class BegGoal extends Goal { +@@ -62,7 +62,7 @@ public class BegGoal extends Goal { private boolean playerHoldingInteresting(Player player) { - for(InteractionHand interactionHand : InteractionHand.values()) { + for (InteractionHand interactionHand : InteractionHand.values()) { ItemStack itemStack = player.getItemInHand(interactionHand); - if (this.wolf.isTame() && itemStack.is(Items.BONE)) { + if (!this.wolf.isTame() && itemStack.is(Items.BONE)) { // Paper - Fix MC-84789 @@ -264,11 +264,11 @@ index 11cc26954b4e97114b59df35a4f9b75a09132e20..0a3f7dcc0e205a85dbaa6dee1fc9ae2c @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java -index 19540fd4a7f992888fadb6501d0c8a5a7e71fcf6..e241ae250f4f04a17ef2c583d00b065a4ca56a4c 100644 +index ef71b3ef4444c05b4211de87e1c8ec52cbe3e72a..137ec75ee803789deb7b1ca93dd9369c9af362b9 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java @@ -21,6 +21,13 @@ public class SwellGoal extends Goal { - return this.creeper.getSwellDir() > 0 || livingEntity != null && this.creeper.distanceToSqr(livingEntity) < 9.0D; + return this.creeper.getSwellDir() > 0 || livingEntity != null && this.creeper.distanceToSqr(livingEntity) < 9.0; } + // Paper start - Fix MC-179072 @@ -336,15 +336,15 @@ index ab85050a64d4897aff11d0780d8cb26660918ac7..bfb9694087821de206fafe867f207e07 this.getFramedMapId().ifPresent((i) -> { MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java -index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a9b977707 100644 +index c718cee92522a0d3c0e30eafd09fa8178c7e6e4a..5d1610eddcaf0cf65c726a5438b42e53bab85332 100644 --- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java -@@ -87,8 +87,8 @@ public class CatSpawner implements CustomSpawner { +@@ -83,8 +83,8 @@ public class CatSpawner implements CustomSpawner { if (cat == null) { return 0; } else { + cat.moveTo(pos, 0.0F, 0.0F); // Paper - move up - Fix MC-147659 - cat.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, (SpawnGroupData)null, (CompoundTag)null); + cat.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null, null); - cat.moveTo(pos, 0.0F, 0.0F); world.addFreshEntityWithPassengers(cat); return 1; @@ -388,11 +388,11 @@ index b670c0cb3886c99d38a91b5c13aa2cefaae702cf..9599a5f96601030bf7f7cbd3392861d6 // Paper start - Add PlayerChangeBeaconEffectEvent io.papermc.paper.event.player.PlayerChangeBeaconEffectEvent event = new io.papermc.paper.event.player.PlayerChangeBeaconEffectEvent((org.bukkit.entity.Player) this.player.player.getBukkitEntity(), convert(primary), convert(secondary), this.access.getLocation().getBlock()); diff --git a/src/main/java/net/minecraft/world/item/BundleItem.java b/src/main/java/net/minecraft/world/item/BundleItem.java -index 10b0720ce7eed58fa3cd8c8051efa6225f7d73e1..ac0bc87f60c4e1562d1301522183e449558d42f8 100644 +index 1e538c691d867a96a57fec9350b4f663d01f8e93..c4c966c555407b7146053187e2ed16cfb99a2dc9 100644 --- a/src/main/java/net/minecraft/world/item/BundleItem.java +++ b/src/main/java/net/minecraft/world/item/BundleItem.java -@@ -52,7 +52,7 @@ public class BundleItem extends Item { - }); +@@ -49,7 +49,7 @@ public class BundleItem extends Item { + removeOne(stack).ifPresent(removedStack -> add(stack, slot.safeInsert(removedStack))); } else if (itemStack.getItem().canFitInsideContainerItems()) { int i = (64 - getContentWeight(stack)) / getWeight(itemStack); - int j = add(stack, slot.safeTake(itemStack.getCount(), i, player)); @@ -400,7 +400,7 @@ index 10b0720ce7eed58fa3cd8c8051efa6225f7d73e1..ac0bc87f60c4e1562d1301522183e449 if (j > 0) { this.playInsertSound(player); } -@@ -121,7 +121,7 @@ public class BundleItem extends Item { +@@ -120,7 +120,7 @@ public class BundleItem extends Item { int i = getContentWeight(bundle); int j = getWeight(stack); int k = Math.min(stack.getCount(), (64 - i) / j); @@ -410,20 +410,20 @@ index 10b0720ce7eed58fa3cd8c8051efa6225f7d73e1..ac0bc87f60c4e1562d1301522183e449 } else { ListTag listTag = compoundTag.getList("Items", 10); diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java -index ca6a2b9840c9ade87ec8effab01d4f184fe876b7..43129ecefcc8beccbcf2978f262b1ce8cf49ca43 100644 +index a569b404ece21fa9571e73947334f5aa57a8080c..51d350add4ca1756cb9e364e066bbee7949ffb8c 100644 --- a/src/main/java/net/minecraft/world/item/SaddleItem.java +++ b/src/main/java/net/minecraft/world/item/SaddleItem.java -@@ -18,7 +18,7 @@ public class SaddleItem extends Item { - if (entity instanceof Saddleable saddleable) { - if (entity.isAlive() && !saddleable.isSaddled() && saddleable.isSaddleable()) { - if (!user.level().isClientSide) { -- saddleable.equipSaddle(SoundSource.NEUTRAL); -+ saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591 - entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); - stack.shrink(1); - } +@@ -17,7 +17,7 @@ public class SaddleItem extends Item { + public InteractionResult interactLivingEntity(ItemStack stack, Player user, LivingEntity entity, InteractionHand hand) { + if (entity instanceof Saddleable saddleable && entity.isAlive() && !saddleable.isSaddled() && saddleable.isSaddleable()) { + if (!user.level().isClientSide) { +- saddleable.equipSaddle(SoundSource.NEUTRAL); ++ saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591 + entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); + stack.shrink(1); + } diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java -index 6e45582f8ea7dd2a46f58369c5581764538bff0d..3ecc92439fc85d224ff52f41c5e34079e042a5e6 100644 +index 655956f3c50d6a78b0cbfaa23d6a62cd776c1e52..85484d061090d989de8246df81f8e9e5f8906072 100644 --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java @@ -51,4 +51,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { |