Skip to content

Commit

Permalink
fix: fix Flesh Spikes destroying Items
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Sep 8, 2023
1 parent 778813b commit 0a6f1f6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.context.BlockPlaceContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.Level;
Expand Down Expand Up @@ -94,6 +95,7 @@ public void fallOn(Level level, BlockState state, BlockPos pos, Entity entity, f

@Override
public void entityInside(BlockState state, Level level, BlockPos pos, Entity entity) {
if (entity instanceof ItemEntity) return;
if (!isEntityInsideDamageArea(level, pos, state, entity)) return;

Direction direction = getFacing(state);
Expand Down

0 comments on commit 0a6f1f6

Please sign in to comment.