Class EntityDropAction


  • public class EntityDropAction
    extends EntityAction
    An entity action for when an entity drops another entity.
    Author:
    Tim Neumann
    • Constructor Detail

      • EntityDropAction

        public EntityDropAction​(long tickNumber,
                                Entity entity,
                                CollectableEntity dropped,
                                Position dropperPos,
                                Position droppedPos)
        Create an entity drop action.
        Parameters:
        tickNumber - the tick the action happened at
        entity - the entity that caused the action
        dropped - the entity that was dropped
        dropperPos - the position the dropper was at while collecting
        droppedPos - the position the dropped entity was dropped to
    • Method Detail

      • getDroppedEntity

        public CollectableEntity getDroppedEntity()
        Returns:
        the entity that was dropped
      • getDroppedEntityPosition

        public Position getDroppedEntityPosition()
        Returns:
        the position the dropped entity was dropped to
      • getDropperPosition

        public Position getDropperPosition()
        Returns:
        the position the dropper was at while dropping
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in class Action
        Returns:
        the description of this action