mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 03:26:44 +01:00
Items can no longer stomp pies
This commit is contained in:
parent
cebf60f9ce
commit
7d97224fc8
1 changed files with 2 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue