Fix MC-224454 (#9195)

This commit is contained in:
Warrior 2023-05-15 17:33:15 +02:00
parent 687db1c410
commit 41ea1348fd

View file

@ -38,6 +38,9 @@ https://bugs.mojang.com/browse/MC-260219
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
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@ -248,6 +251,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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) {
TREE_GROWER.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
}
+
+ // Paper start - Fix MC-224454
+ @Override
+ public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, 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