Class EntityMobGriefingEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityMobGriefingEvent

public class EntityMobGriefingEvent extends EntityEvent
EntityMobGriefingEvent is fired when mob griefing is about to occur and allows an event listener to specify whether it should or not.
This event is fired when ever the mobGriefing game rule is checked.

This event has a result:
  • Event.Result.ALLOW means this instance of mob griefing is allowed.
  • Event.Result.DEFAULT means the mobGriefing game rule is used to determine the behaviour.
  • Event.Result.DENY means this instance of mob griefing is not allowed.

  • This event is fired on the MinecraftForge.EVENT_BUS.
    • Constructor Details

      • EntityMobGriefingEvent

        public EntityMobGriefingEvent(Entity entity)