Class ItemEvent.AttackEvent

java.lang.Object
net.minecraftforge.fml.common.eventhandler.Event
noppes.npcs.api.event.CustomNPCsEvent
noppes.npcs.api.event.ItemEvent
noppes.npcs.api.event.ItemEvent.AttackEvent
Enclosing class:
ItemEvent

public static class ItemEvent.AttackEvent
extends ItemEvent
attack
Will trigger if you have an item and left click into the air or left click a block or left click an entity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.fml.common.eventhandler.Event

    net.minecraftforge.fml.common.eventhandler.Event.HasResult, net.minecraftforge.fml.common.eventhandler.Event.Result
  • Field Summary

    Fields
    Modifier and Type Field Description
    IPlayer player  
    java.lang.Object target  
    int type
    0:air, 1:entity, 2:block

    Fields inherited from class noppes.npcs.api.event.ItemEvent

    item

    Fields inherited from class noppes.npcs.api.event.CustomNPCsEvent

    API
  • Constructor Summary

    Constructors
    Constructor Description
    AttackEvent​(IItemScripted item, IPlayer player, int type, java.lang.Object target)  
  • Method Summary

    Methods inherited from class net.minecraftforge.fml.common.eventhandler.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • type

      public final int type
      0:air, 1:entity, 2:block
    • target

      public final java.lang.Object target
    • player

      public IPlayer player
  • Constructor Details

    • AttackEvent

      public AttackEvent​(IItemScripted item, IPlayer player, int type, java.lang.Object target)