Fix MC-224454 (#9195)

This commit is contained in:
Warrior 2023-05-15 17:33:15 +02:00 committed by GitHub
parent 4ba5aacc37
commit a61b4845f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 c35375e15c0368fec12d37a4b82668b51d9fe9ff..0c975875f1f2d0236d42a291486a7e78
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 023ed8441d629629828051b4098b09b06ce51a75..95b53450a807fccfa55b59852da52785b8cf3e3d 100644
--- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java
@@ -45,4 +45,11 @@ 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 2932419b7ca3f066b1db329829af36ba31e17c65..e11eced0bf15dfecaf64f5e1c28e973c38746095 100644
--- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java