Class TargetUtil

java.lang.Object
net.minecraft.entity.ai.brain.task.TargetUtil

public class TargetUtil extends Object
Mappings:
Namespace Name
named net/minecraft/entity/ai/brain/task/TargetUtil
intermediary net/minecraft/class_4215
official bya
  • Constructor Details

    • TargetUtil

      private TargetUtil()
  • Method Details

    • lookAtAndWalkTowardsEachOther

      public static void lookAtAndWalkTowardsEachOther(LivingEntity first, LivingEntity second, float speed, int walkCompletionRange)
      Mappings:
      Namespace Name Mixin selector
      named lookAtAndWalkTowardsEachOther Lnet/minecraft/entity/ai/brain/task/TargetUtil;lookAtAndWalkTowardsEachOther(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;FI)V
      intermediary method_19548 Lnet/minecraft/class_4215;method_19548(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;FI)V
      official a Lbya;a(Lbwf;Lbwf;FI)V
    • canSee

      public static boolean canSee(Brain<?> brain, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named canSee Lnet/minecraft/entity/ai/brain/task/TargetUtil;canSee(Lnet/minecraft/entity/ai/brain/Brain;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_19550 Lnet/minecraft/class_4215;method_19550(Lnet/minecraft/class_4095;Lnet/minecraft/class_1309;)Z
      official a Lbya;a(Lbxh;Lbwf;)Z
    • canSee

      public static boolean canSee(Brain<?> brain, MemoryModuleType<? extends LivingEntity> memoryModuleType, EntityType<?> entityType)
      Mappings:
      Namespace Name Mixin selector
      named canSee Lnet/minecraft/entity/ai/brain/task/TargetUtil;canSee(Lnet/minecraft/entity/ai/brain/Brain;Lnet/minecraft/entity/ai/brain/MemoryModuleType;Lnet/minecraft/entity/EntityType;)Z
      intermediary method_19551 Lnet/minecraft/class_4215;method_19551(Lnet/minecraft/class_4095;Lnet/minecraft/class_4140;Lnet/minecraft/class_1299;)Z
      official a Lbya;a(Lbxh;Lcfj;Lbvq;)Z
    • canSee

      private static boolean canSee(Brain<?> brain, MemoryModuleType<? extends LivingEntity> memoryType, Predicate<LivingEntity> filter)
      Mappings:
      Namespace Name Mixin selector
      named canSee Lnet/minecraft/entity/ai/brain/task/TargetUtil;canSee(Lnet/minecraft/entity/ai/brain/Brain;Lnet/minecraft/entity/ai/brain/MemoryModuleType;Ljava/util/function/Predicate;)Z
      intermediary method_24564 Lnet/minecraft/class_4215;method_24564(Lnet/minecraft/class_4095;Lnet/minecraft/class_4140;Ljava/util/function/Predicate;)Z
      official a Lbya;a(Lbxh;Lcfj;Ljava/util/function/Predicate;)Z
    • lookAtEachOther

      private static void lookAtEachOther(LivingEntity first, LivingEntity second)
      Mappings:
      Namespace Name Mixin selector
      named lookAtEachOther Lnet/minecraft/entity/ai/brain/task/TargetUtil;lookAtEachOther(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_19552 Lnet/minecraft/class_4215;method_19552(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)V
      official c Lbya;c(Lbwf;Lbwf;)V
    • lookAt

      public static void lookAt(LivingEntity entity, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/brain/task/TargetUtil;lookAt(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_19554 Lnet/minecraft/class_4215;method_19554(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)V
      official a Lbya;a(Lbwf;Lbwf;)V
    • walkTowardsEachOther

      private static void walkTowardsEachOther(LivingEntity first, LivingEntity second, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      named walkTowardsEachOther Lnet/minecraft/entity/ai/brain/task/TargetUtil;walkTowardsEachOther(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;FI)V
      intermediary method_19555 Lnet/minecraft/class_4215;method_19555(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;FI)V
      official b Lbya;b(Lbwf;Lbwf;FI)V
    • walkTowards

      public static void walkTowards(LivingEntity entity, Entity target, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      named walkTowards Lnet/minecraft/entity/ai/brain/task/TargetUtil;walkTowards(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/Entity;FI)V
      intermediary method_24557 Lnet/minecraft/class_4215;method_24557(Lnet/minecraft/class_1309;Lnet/minecraft/class_1297;FI)V
      official a Lbya;a(Lbwf;Lbvj;FI)V
    • walkTowards

      public static void walkTowards(LivingEntity entity, BlockPos target, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      named walkTowards Lnet/minecraft/entity/ai/brain/task/TargetUtil;walkTowards(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/math/BlockPos;FI)V
      intermediary method_24561 Lnet/minecraft/class_4215;method_24561(Lnet/minecraft/class_1309;Lnet/minecraft/class_2338;FI)V
      official a Lbya;a(Lbwf;Ljh;FI)V
    • walkTowards

      public static void walkTowards(LivingEntity entity, LookTarget target, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      named walkTowards Lnet/minecraft/entity/ai/brain/task/TargetUtil;walkTowards(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/ai/brain/LookTarget;FI)V
      intermediary method_42647 Lnet/minecraft/class_4215;method_42647(Lnet/minecraft/class_1309;Lnet/minecraft/class_4115;FI)V
      official a Lbya;a(Lbwf;Lbzm;FI)V
    • give

      public static void give(LivingEntity entity, ItemStack stack, Vec3d targetLocation)
      Mappings:
      Namespace Name Mixin selector
      named give Lnet/minecraft/entity/ai/brain/task/TargetUtil;give(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Vec3d;)V
      intermediary method_19949 Lnet/minecraft/class_4215;method_19949(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;Lnet/minecraft/class_243;)V
      official a Lbya;a(Lbwf;Lcxo;Lfbx;)V
    • give

      public static void give(LivingEntity entity, ItemStack stack, Vec3d targetLocation, Vec3d velocityFactor, float yOffset)
      Mappings:
      Namespace Name Mixin selector
      named give Lnet/minecraft/entity/ai/brain/task/TargetUtil;give(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;F)V
      intermediary method_43392 Lnet/minecraft/class_4215;method_43392(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;Lnet/minecraft/class_243;Lnet/minecraft/class_243;F)V
      official a Lbya;a(Lbwf;Lcxo;Lfbx;Lfbx;F)V
    • getPosClosestToOccupiedPointOfInterest

      public static ChunkSectionPos getPosClosestToOccupiedPointOfInterest(ServerWorld world, ChunkSectionPos center, int radius)
      Mappings:
      Namespace Name Mixin selector
      named getPosClosestToOccupiedPointOfInterest Lnet/minecraft/entity/ai/brain/task/TargetUtil;getPosClosestToOccupiedPointOfInterest(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/ChunkSectionPos;I)Lnet/minecraft/util/math/ChunkSectionPos;
      intermediary method_20419 Lnet/minecraft/class_4215;method_20419(Lnet/minecraft/class_3218;Lnet/minecraft/class_4076;I)Lnet/minecraft/class_4076;
      official a Lbya;a(Lash;Lkj;I)Lkj;
    • isTargetWithinAttackRange

      public static boolean isTargetWithinAttackRange(MobEntity mob, LivingEntity target, int rangedWeaponReachReduction)
      Mappings:
      Namespace Name Mixin selector
      named isTargetWithinAttackRange Lnet/minecraft/entity/ai/brain/task/TargetUtil;isTargetWithinAttackRange(Lnet/minecraft/entity/mob/MobEntity;Lnet/minecraft/entity/LivingEntity;I)Z
      intermediary method_25940 Lnet/minecraft/class_4215;method_25940(Lnet/minecraft/class_1308;Lnet/minecraft/class_1309;I)Z
      official a Lbya;a(Lbwh;Lbwf;I)Z
    • isNewTargetTooFar

      public static boolean isNewTargetTooFar(LivingEntity source, LivingEntity target, double extraDistance)
      Checks if an entity can be a new attack target for the source entity.
      Parameters:
      source - the source entity
      target - the attack target candidate
      extraDistance - the max distance this new target can be farther compared to the existing target
      Mappings:
      Namespace Name Mixin selector
      named isNewTargetTooFar Lnet/minecraft/entity/ai/brain/task/TargetUtil;isNewTargetTooFar(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;D)Z
      intermediary method_24558 Lnet/minecraft/class_4215;method_24558(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;D)Z
      official a Lbya;a(Lbwf;Lbwf;D)Z
    • isVisibleInMemory

      public static boolean isVisibleInMemory(LivingEntity source, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named isVisibleInMemory Lnet/minecraft/entity/ai/brain/task/TargetUtil;isVisibleInMemory(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_24565 Lnet/minecraft/class_4215;method_24565(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
      official b Lbya;b(Lbwf;Lbwf;)Z
    • getCloserEntity

      public static LivingEntity getCloserEntity(LivingEntity source, Optional<LivingEntity> first, LivingEntity second)
      Mappings:
      Namespace Name Mixin selector
      named getCloserEntity Lnet/minecraft/entity/ai/brain/task/TargetUtil;getCloserEntity(Lnet/minecraft/entity/LivingEntity;Ljava/util/Optional;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/entity/LivingEntity;
      intermediary method_24562 Lnet/minecraft/class_4215;method_24562(Lnet/minecraft/class_1309;Ljava/util/Optional;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1309;
      official a Lbya;a(Lbwf;Ljava/util/Optional;Lbwf;)Lbwf;
    • getCloserEntity

      public static LivingEntity getCloserEntity(LivingEntity source, LivingEntity first, LivingEntity second)
      Mappings:
      Namespace Name Mixin selector
      named getCloserEntity Lnet/minecraft/entity/ai/brain/task/TargetUtil;getCloserEntity(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/entity/LivingEntity;
      intermediary method_24559 Lnet/minecraft/class_4215;method_24559(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Lnet/minecraft/class_1309;
      official a Lbya;a(Lbwf;Lbwf;Lbwf;)Lbwf;
    • getEntity

      public static Optional<LivingEntity> getEntity(LivingEntity entity, MemoryModuleType<UUID> uuidMemoryModule)
      Mappings:
      Namespace Name Mixin selector
      named getEntity Lnet/minecraft/entity/ai/brain/task/TargetUtil;getEntity(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/ai/brain/MemoryModuleType;)Ljava/util/Optional;
      intermediary method_24560 Lnet/minecraft/class_4215;method_24560(Lnet/minecraft/class_1309;Lnet/minecraft/class_4140;)Ljava/util/Optional;
      official a Lbya;a(Lbwf;Lcfj;)Ljava/util/Optional;
    • find

      @Nullable public static @Nullable Vec3d find(PathAwareEntity entity, int horizontalRange, int verticalRange)
      Mappings:
      Namespace Name Mixin selector
      named find Lnet/minecraft/entity/ai/brain/task/TargetUtil;find(Lnet/minecraft/entity/mob/PathAwareEntity;II)Lnet/minecraft/util/math/Vec3d;
      intermediary method_33193 Lnet/minecraft/class_4215;method_33193(Lnet/minecraft/class_1314;II)Lnet/minecraft/class_243;
      official a Lbya;a(Lbwn;II)Lfbx;
    • hasBreedTarget

      public static boolean hasBreedTarget(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named hasBreedTarget Lnet/minecraft/entity/ai/brain/task/TargetUtil;hasBreedTarget(Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_41331 Lnet/minecraft/class_4215;method_41331(Lnet/minecraft/class_1309;)Z
      official a Lbya;a(Lbwf;)Z