Skip to content

Commit

Permalink
fix spiked berry bushes deleting items
Browse files Browse the repository at this point in the history
  • Loading branch information
ix0rai committed Jul 24, 2024
1 parent 397c9aa commit ac6df26
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac6df26

Please sign in to comment.