mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
425 lines
25 KiB
Diff
425 lines
25 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Mon, 11 Jul 2022 11:56:41 -0700
|
|
Subject: [PATCH] Fix a bunch of vanilla bugs
|
|
|
|
https://bugs.mojang.com/browse/MC-253721
|
|
wrong msg for opping multiple players
|
|
|
|
https://bugs.mojang.com/browse/MC-248588
|
|
respect mob griefing gamerule for draining water cauldrons
|
|
|
|
https://bugs.mojang.com/browse/MC-244739
|
|
play goat eating sound for last item in stack
|
|
|
|
https://bugs.mojang.com/browse/MC-243057
|
|
ignore furnace fuel slot in recipe book click
|
|
|
|
https://bugs.mojang.com/browse/MC-147659
|
|
Some witch huts spawn the incorrect cat
|
|
Note: Marked as Won't Fix, makes 0 sense
|
|
|
|
https://bugs.mojang.com/browse/MC-179072
|
|
Creepers do not defuse when switching from Survival to Creative/Spectator
|
|
|
|
https://bugs.mojang.com/browse/MC-191591
|
|
Fix items equipped on AbstractHorse losing NBT
|
|
|
|
https://bugs.mojang.com/browse/MC-259571
|
|
Fix changeGameModeForPlayer to use gameModeForPlayer
|
|
|
|
https://bugs.mojang.com/browse/MC-262422
|
|
Fix lightning being able to hit spectators
|
|
|
|
https://bugs.mojang.com/browse/MC-224454
|
|
Fix mobs attempting to pathfind through azalea blocks
|
|
|
|
https://bugs.mojang.com/browse/MC-263999
|
|
Fix mobs breaking doors not spawning block break particles
|
|
|
|
https://bugs.mojang.com/browse/MC-210802
|
|
Fixes sheep eating blocks outside of ticking range
|
|
|
|
https://bugs.mojang.com/browse/MC-123848
|
|
Fixes item frames dropping items above when pointing down
|
|
|
|
https://bugs.mojang.com/browse/MC-84789
|
|
Fix wild wolves not considering bones interesting
|
|
|
|
https://bugs.mojang.com/browse/MC-174630
|
|
Fix secondary beacon effect remaining after switching effect
|
|
|
|
https://bugs.mojang.com/browse/MC-153086
|
|
Fix the beacon deactivation sound always playing when broken
|
|
|
|
https://bugs.mojang.com/browse/MC-200092
|
|
Fix yaw being ignored for a player's first spawn pos
|
|
|
|
https://bugs.mojang.com/browse/MC-158900
|
|
Fix error when joining after tempban expired
|
|
|
|
== AT ==
|
|
public net/minecraft/world/entity/Mob leashInfoTag
|
|
|
|
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
|
|
@@ -0,0 +0,0 @@ public interface DispenseItemBehavior {
|
|
}
|
|
}
|
|
// CraftBukkit end
|
|
- ((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS);
|
|
+ ((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591
|
|
// itemstack.shrink(1); // CraftBukkit - handled above
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/DeOpCommands.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/DeOpCommands.java
|
|
@@ -0,0 +0,0 @@ public class DeOpCommands {
|
|
if (playerList.isOp(gameProfile)) {
|
|
playerList.deop(gameProfile);
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/OpCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/OpCommand.java
|
|
@@ -0,0 +0,0 @@ public class OpCommand {
|
|
if (!playerList.isOp(gameProfile)) {
|
|
playerList.op(gameProfile);
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
|
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
|
// CraftBukkit end
|
|
}
|
|
|
|
- boolean anyPlayerCloseEnoughForSpawning(ChunkPos pos) {
|
|
+ public boolean anyPlayerCloseEnoughForSpawning(ChunkPos pos) { // Paper - public
|
|
// Spigot start
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
} else {
|
|
AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, new BlockPos(blockposition1.atY(this.getMaxBuildHeight()))).inflate(3.0D);
|
|
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
|
- return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition());
|
|
+ return entityliving != null && entityliving.isAlive() && this.canSeeSky(entityliving.blockPosition()) && !entityliving.isSpectator(); // Paper - Fix lightning being able to hit spectators (MC-262422)
|
|
});
|
|
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
|
BlockPos blockposition1 = PlayerRespawnLogic.getOverworldRespawnPos(world, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i);
|
|
|
|
if (blockposition1 != null) {
|
|
- this.moveTo(blockposition1, 0.0F, 0.0F);
|
|
+ this.moveTo(blockposition1, world.getSharedSpawnAngle(), 0.0F); // Paper - MC-200092 - fix first spawn pos yaw being ignored
|
|
if (world.noCollision((Entity) this)) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
- this.moveTo(blockposition, 0.0F, 0.0F);
|
|
+ this.moveTo(blockposition, world.getSharedSpawnAngle(), 0.0F); // Paper - MC-200092 - fix first spawn pos yaw being ignored
|
|
|
|
while (!world.noCollision((Entity) this) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) {
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
|
@@ -0,0 +0,0 @@ public class ServerPlayerGameMode {
|
|
return event; // Paper - Expand PlayerGameModeChangeEvent
|
|
}
|
|
// CraftBukkit end
|
|
- this.setGameModeForPlayer(gameMode, this.previousGameModeForPlayer);
|
|
+ this.setGameModeForPlayer(gameMode, this.gameModeForPlayer); // Paper - Fix MC-259571
|
|
this.player.onUpdateAbilities();
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
|
Player player = entity.getBukkitEntity();
|
|
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
|
|
|
|
- if (this.bans.isBanned(gameprofile)) {
|
|
- UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
|
|
+ // Paper start - Fix MC-158900
|
|
+ UserBanListEntry gameprofilebanentry;
|
|
+ if (this.bans.isBanned(gameprofile) && (gameprofilebanentry = this.bans.get(gameprofile)) != null) {
|
|
+ // Paper end - Fix MC-158900
|
|
|
|
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason());
|
|
if (gameprofilebanentry.getExpires() != null) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Saddleable.java b/src/main/java/net/minecraft/world/entity/Saddleable.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Saddleable.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Saddleable.java
|
|
@@ -0,0 +0,0 @@ public interface Saddleable {
|
|
boolean isSaddleable();
|
|
|
|
void equipSaddle(@Nullable SoundSource sound);
|
|
+ // Paper start - Fix saddles losing nbt data - MC-191591
|
|
+ default void equipSaddle(final @Nullable SoundSource sound, final @Nullable net.minecraft.world.item.ItemStack stack) {
|
|
+ this.equipSaddle(sound);
|
|
+ }
|
|
+ // Paper end
|
|
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
|
@@ -0,0 +0,0 @@ public class BegGoal extends Goal {
|
|
private boolean playerHoldingInteresting(Player player) {
|
|
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
|
|
return true;
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
|
|
@@ -0,0 +0,0 @@ public class BreakDoorGoal extends DoorInteractGoal {
|
|
return;
|
|
}
|
|
// CraftBukkit end
|
|
+ final net.minecraft.world.level.block.state.BlockState oldState = this.mob.level().getBlockState(this.doorPos); // Paper - fix MC-263999
|
|
this.mob.level().removeBlock(this.doorPos, false);
|
|
this.mob.level().levelEvent(1021, this.doorPos, 0);
|
|
- this.mob.level().levelEvent(2001, this.doorPos, Block.getId(this.mob.level().getBlockState(this.doorPos)));
|
|
+ this.mob.level().levelEvent(2001, this.doorPos, Block.getId(oldState)); // Paper - fix MC-263999
|
|
}
|
|
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
|
|
@@ -0,0 +0,0 @@ public class EatBlockGoal extends Goal {
|
|
|
|
@Override
|
|
public boolean canUse() {
|
|
+ // Paper start - Fix MC-210802
|
|
+ if (!((net.minecraft.server.level.ServerLevel) this.level).chunkSource.chunkMap.anyPlayerCloseEnoughForSpawning(this.mob.chunkPosition())) {
|
|
+ return false;
|
|
+ }
|
|
+ // Paper end
|
|
if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) {
|
|
return false;
|
|
} else {
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
|
@@ -0,0 +0,0 @@ public class SwellGoal extends Goal {
|
|
return this.creeper.getSwellDir() > 0 || livingEntity != null && this.creeper.distanceToSqr(livingEntity) < 9.0;
|
|
}
|
|
|
|
+ // Paper start - Fix MC-179072
|
|
+ @Override
|
|
+ public boolean canContinueToUse() {
|
|
+ return !net.minecraft.world.entity.EntitySelector.NO_CREATIVE_OR_SPECTATOR.test(this.creeper.getTarget()) && canUse();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void start() {
|
|
this.creeper.getNavigation().stop();
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
|
@@ -0,0 +0,0 @@ public class Goat extends Animal {
|
|
player.setItemInHand(hand, itemstack1);
|
|
return InteractionResult.sidedSuccess(this.level().isClientSide);
|
|
} else {
|
|
+ boolean isFood = this.isFood(itemstack); // Paper - track before stack is possibly decreased to 0 (Fixes MC-244739)
|
|
InteractionResult enuminteractionresult = super.mobInteract(player, hand);
|
|
|
|
- if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) {
|
|
+ if (enuminteractionresult.consumesAction() && isFood) { // Paper
|
|
this.level().playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F));
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
|
@@ -0,0 +0,0 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
|
|
|
@Override
|
|
public void equipSaddle(@Nullable SoundSource sound) {
|
|
- this.inventory.setItem(0, new ItemStack(Items.SADDLE));
|
|
+ // Paper start - Fix saddles losing nbt data - MC-191591
|
|
+ this.equipSaddle(sound, null);
|
|
+ }
|
|
+ @Override
|
|
+ public void equipSaddle(@Nullable SoundSource sound, @Nullable ItemStack stack) {
|
|
+ this.inventory.setItem(0, stack != null ? stack : new ItemStack(Items.SADDLE));
|
|
+ // Paper end
|
|
}
|
|
|
|
public void equipBodyArmor(Player player, ItemStack stack) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
|
@@ -0,0 +0,0 @@ public class ItemFrame extends HangingEntity {
|
|
return (ItemStack) this.getEntityData().get(ItemFrame.DATA_ITEM);
|
|
}
|
|
|
|
+ // Paper start - Fix MC-123848 (spawn item frame drops above block)
|
|
+ @Nullable
|
|
+ @Override
|
|
+ public net.minecraft.world.entity.item.ItemEntity spawnAtLocation(ItemStack stack) {
|
|
+ return this.spawnAtLocation(stack, getDirection().equals(Direction.DOWN) ? -0.6F : 0.0F);
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Nullable
|
|
public MapId getFramedMapId() {
|
|
return (MapId) this.getItem().get(DataComponents.MAP_ID);
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java
|
|
@@ -0,0 +0,0 @@ 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, null);
|
|
- cat.moveTo(pos, 0.0F, 0.0F);
|
|
world.addFreshEntityWithPassengers(cat);
|
|
return 1;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java
|
|
@@ -0,0 +0,0 @@ public class BeaconMenu extends AbstractContainerMenu {
|
|
// Paper end - Add PlayerChangeBeaconEffectEvent
|
|
|
|
public void updateEffects(Optional<Holder<MobEffect>> primary, Optional<Holder<MobEffect>> secondary) {
|
|
+ // Paper start - fix MC-174630 - validate secondary power
|
|
+ if (secondary.isPresent() && secondary.get() != net.minecraft.world.effect.MobEffects.REGENERATION && (primary.isPresent() && secondary.get() != primary.get())) {
|
|
+ secondary = Optional.empty();
|
|
+ }
|
|
+ // Paper end
|
|
if (this.paymentSlot.hasItem()) {
|
|
// 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/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/item/SaddleItem.java
|
|
+++ b/src/main/java/net/minecraft/world/item/SaddleItem.java
|
|
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
|
|
@@ -0,0 +0,0 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock {
|
|
public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
|
|
TreeGrower.AZALEA.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
|
|
}
|
|
+
|
|
+ // Paper start - Fix MC-224454
|
|
+ @Override
|
|
+ public boolean isPathfindable(BlockState state, net.minecraft.world.level.pathfinder.PathComputationType type) {
|
|
+ return false;
|
|
+ }
|
|
+ // 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java
|
|
@@ -0,0 +0,0 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock {
|
|
if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent
|
|
if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) {
|
|
// CraftBukkit start
|
|
- if (entity.mayInteract(world, pos)) {
|
|
+ if ((entity instanceof net.minecraft.world.entity.player.Player || world.getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_MOBGRIEFING)) && entity.mayInteract(world, pos)) { // Paper - Fixes MC-248588
|
|
if (!this.handleEntityOnFireInsideWithEvent(state, world, pos, entity)) { // Paper - fix powdered snow cauldron extinguishing entities
|
|
return;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
|
@@ -0,0 +0,0 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
|
|
|
@Override
|
|
public void fillStackedContents(StackedContents finder) {
|
|
- Iterator iterator = this.items.iterator();
|
|
-
|
|
- while (iterator.hasNext()) {
|
|
- ItemStack itemstack = (ItemStack) iterator.next();
|
|
-
|
|
- finder.accountStack(itemstack);
|
|
- }
|
|
+ // Paper start - don't account fuel stack (fixes MC-243057)
|
|
+ finder.accountStack(this.items.get(SLOT_INPUT));
|
|
+ finder.accountStack(this.items.get(SLOT_RESULT));
|
|
+ // Paper end
|
|
|
|
}
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
|
@@ -0,0 +0,0 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
|
|
org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, worldPosition);
|
|
new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent();
|
|
// Paper end - beacon activation/deactivation events
|
|
+ // Paper start - fix MC-153086
|
|
+ if (this.levels > 0 && !this.beamSections.isEmpty()) {
|
|
BeaconBlockEntity.playSound(this.level, this.worldPosition, SoundEvents.BEACON_DEACTIVATE);
|
|
+ }
|
|
+ // Paper end
|
|
super.setRemoved();
|
|
}
|
|
|