From ac6df26c19abad3e303c6915a4982a297b26afa3 Mon Sep 17 00:00:00 2001 From: ix0rai Date: Tue, 23 Jul 2024 21:01:58 -0500 Subject: [PATCH] fix spiked berry bushes deleting items --- .../java/io/ix0rai/bodacious_berries/block/SpikedBerryBush.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/ix0rai/bodacious_berries/block/SpikedBerryBush.java b/src/main/java/io/ix0rai/bodacious_berries/block/SpikedBerryBush.java index 1f587a7..bb29ae1 100644 --- a/src/main/java/io/ix0rai/bodacious_berries/block/SpikedBerryBush.java +++ b/src/main/java/io/ix0rai/bodacious_berries/block/SpikedBerryBush.java @@ -32,7 +32,7 @@ public SpikedBerryBush(Berry berry, int maxAge, VoxelShape smallShape, VoxelShap public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) { super.onEntityCollision(state, world, pos, entity); - if (!(world.isClient) && !UNSLOWED_ENTITIES.contains(entity.getType()) && state.get(getAge()) >= sizeChangeAge) { + if (!(world.isClient) && entity.isLiving() && !UNSLOWED_ENTITIES.contains(entity.getType()) && state.get(getAge()) >= sizeChangeAge) { boolean movedMinDistance = movedMinDistance(entity); if (movedMinDistance) { entity.damage(world.getDamageSources().sweetBerryBush(), damage);