Interface Mob

    • Method Detail

      • setTarget

        void setTarget​(@Nullable
                       @Nullable LivingEntity target)
        Instructs this Mob to set the specified LivingEntity as its target.

        Hostile creatures may attack their target, and friendly creatures may follow their target.

        Parameters:
        target - New LivingEntity to target, or null to clear the target
      • getTarget

        @Nullable
        @Nullable LivingEntity getTarget()
        Gets the current target of this Mob
        Returns:
        Current target of this creature, or null if none exists
      • setAware

        void setAware​(boolean aware)
        Sets whether this mob is aware of its surroundings. Unaware mobs will still move if pushed, attacked, etc. but will not move or perform any actions on their own. Unaware mobs may also have other unspecified behaviours disabled, such as drowning.
        Parameters:
        aware - whether the mob is aware
      • isAware

        boolean isAware()
        Gets whether this mob is aware of its surroundings. Unaware mobs will still move if pushed, attacked, etc. but will not move or perform any actions on their own. Unaware mobs may also have other unspecified behaviours disabled, such as drowning.
        Returns:
        whether the mob is aware