Interface EnderSignal

    • Method Detail

      • getTargetLocation

        @NotNull
        Location getTargetLocation()
        Get the location this EnderSignal is moving towards.
        Returns:
        the Location this EnderSignal is moving towards.
      • setTargetLocation

        void setTargetLocation​(@NotNull
                               Location location)
        Set the Location this EnderSignal is moving towards.
        When setting a new target location, the getDropItem() resets to a random value and the despawn timer gets set back to 0.
        Parameters:
        location - the new target location
      • getDropItem

        boolean getDropItem()
        Gets if the EnderSignal should drop an item on death.
        If true, it will drop an item. If false, it will shatter.
        Returns:
        true if the EnderSignal will drop an item on death, or false if it will shatter
      • setDropItem

        void setDropItem​(boolean drop)
        Sets if the EnderSignal should drop an item on death; or if it should shatter.
        Parameters:
        drop - true if the EnderSignal should drop an item on death, or false if it should shatter.
      • getDespawnTimer

        int getDespawnTimer()
        Gets the amount of time this entity has been alive (in ticks).
        When this number is greater than 80, it will despawn on the next tick.
        Returns:
        the number of ticks this EnderSignal has been alive.
      • setDespawnTimer

        void setDespawnTimer​(int timer)
        Set how long this entity has been alive (in ticks).
        When this number is greater than 80, it will despawn on the next tick.
        Parameters:
        timer - how long (in ticks) this EnderSignal has been alive.