From 7d97224fc81c8fc07f93c683e482da5d3b3905f2 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 16 Aug 2023 17:09:30 +0100 Subject: [PATCH] Items can no longer stomp pies --- src/main/java/com/minelittlepony/unicopia/block/PieBlock.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/PieBlock.java b/src/main/java/com/minelittlepony/unicopia/block/PieBlock.java index debda068..1ebb41af 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/PieBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/PieBlock.java @@ -5,6 +5,7 @@ import com.minelittlepony.unicopia.util.SoundEmitter; import net.minecraft.block.*; import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; import net.minecraft.entity.ai.pathing.NavigationType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.fluid.FluidState; @@ -150,7 +151,7 @@ public class PieBlock extends Block implements Waterloggable { @Override public void onSteppedOn(World world, BlockPos pos, BlockState state, Entity entity) { - if (!state.get(STOMPED)) { + if (!state.get(STOMPED) && entity instanceof LivingEntity && !entity.bypassesSteppingEffects()) { world.setBlockState(pos, state.cycle(STOMPED)); world.syncWorldEvent(WorldEvents.BLOCK_BROKEN, pos, Block.getRawIdFromState(state)); world.emitGameEvent(UGameEvents.PIE_STOMP, pos, GameEvent.Emitter.of(entity, state));