Package net.minecraft.entity.ai.brain
Class BrainUtil
java.lang.Object
net.minecraft.entity.ai.brain.BrainUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canSee
(LivingEntity p_233876_0_, LivingEntity p_233876_1_) static boolean
entityIsVisible
(Brain<?> p_220619_0_, LivingEntity p_220619_1_) static SectionPos
findSectionClosestToVillage
(ServerWorld p_220617_0_, SectionPos p_220617_1_, int p_220617_2_) static Optional<LivingEntity>
getLivingEntityFromUUIDMemory
(LivingEntity p_233864_0_, MemoryModuleType<UUID> p_233864_1_) static Stream<VillagerEntity>
getNearbyVillagersWithCondition
(VillagerEntity p_233872_0_, Predicate<VillagerEntity> p_233872_1_) static LivingEntity
getNearestTarget
(LivingEntity p_233867_0_, Optional<LivingEntity> p_233867_1_, LivingEntity p_233867_2_) static LivingEntity
getTargetNearestMe
(LivingEntity p_233863_0_, LivingEntity p_233863_1_, LivingEntity p_233863_2_) static boolean
isOtherTargetMuchFurtherAwayThanCurrentAttackTarget
(LivingEntity p_233861_0_, LivingEntity p_233861_1_, double p_233861_2_) static boolean
isWithinAttackRange
(MobEntity p_233869_0_, LivingEntity p_233869_1_, int p_233869_2_) static boolean
isWithinMeleeAttackRange
(LivingEntity p_233874_0_, LivingEntity p_233874_1_) static void
lockGazeAndWalkToEachOther
(LivingEntity p_220618_0_, LivingEntity p_220618_1_, float p_220618_2_) private static void
lookAtEachOther
(LivingEntity p_220616_0_, LivingEntity p_220616_1_) static void
lookAtEntity
(LivingEntity p_220625_0_, LivingEntity p_220625_1_) static void
setWalkAndLookTargetMemories
(LivingEntity p_233860_0_, Entity p_233860_1_, float p_233860_2_, int p_233860_3_) static void
setWalkAndLookTargetMemories
(LivingEntity p_233866_0_, BlockPos p_233866_1_, float p_233866_2_, int p_233866_3_) private static void
setWalkAndLookTargetMemoriesToEachOther
(LivingEntity p_220626_0_, LivingEntity p_220626_1_, float p_220626_2_) private static boolean
targetIsValid
(Brain<?> p_233870_0_, MemoryModuleType<? extends LivingEntity> p_233870_1_, Predicate<LivingEntity> p_233870_2_) static boolean
targetIsValid
(Brain<?> p_220623_0_, MemoryModuleType<? extends LivingEntity> p_220623_1_, EntityType<?> p_220623_2_) static void
throwItem
(LivingEntity p_233865_0_, ItemStack p_233865_1_, Vector3d p_233865_2_)
-
Constructor Details
-
BrainUtil
public BrainUtil()
-
-
Method Details
-
lockGazeAndWalkToEachOther
public static void lockGazeAndWalkToEachOther(LivingEntity p_220618_0_, LivingEntity p_220618_1_, float p_220618_2_) -
entityIsVisible
-
targetIsValid
public static boolean targetIsValid(Brain<?> p_220623_0_, MemoryModuleType<? extends LivingEntity> p_220623_1_, EntityType<?> p_220623_2_) -
targetIsValid
private static boolean targetIsValid(Brain<?> p_233870_0_, MemoryModuleType<? extends LivingEntity> p_233870_1_, Predicate<LivingEntity> p_233870_2_) -
lookAtEachOther
-
lookAtEntity
-
setWalkAndLookTargetMemoriesToEachOther
private static void setWalkAndLookTargetMemoriesToEachOther(LivingEntity p_220626_0_, LivingEntity p_220626_1_, float p_220626_2_) -
setWalkAndLookTargetMemories
public static void setWalkAndLookTargetMemories(LivingEntity p_233860_0_, Entity p_233860_1_, float p_233860_2_, int p_233860_3_) -
setWalkAndLookTargetMemories
public static void setWalkAndLookTargetMemories(LivingEntity p_233866_0_, BlockPos p_233866_1_, float p_233866_2_, int p_233866_3_) -
throwItem
-
findSectionClosestToVillage
public static SectionPos findSectionClosestToVillage(ServerWorld p_220617_0_, SectionPos p_220617_1_, int p_220617_2_) -
isWithinAttackRange
public static boolean isWithinAttackRange(MobEntity p_233869_0_, LivingEntity p_233869_1_, int p_233869_2_) -
isWithinMeleeAttackRange
-
isOtherTargetMuchFurtherAwayThanCurrentAttackTarget
public static boolean isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(LivingEntity p_233861_0_, LivingEntity p_233861_1_, double p_233861_2_) -
canSee
-
getNearestTarget
public static LivingEntity getNearestTarget(LivingEntity p_233867_0_, Optional<LivingEntity> p_233867_1_, LivingEntity p_233867_2_) -
getTargetNearestMe
public static LivingEntity getTargetNearestMe(LivingEntity p_233863_0_, LivingEntity p_233863_1_, LivingEntity p_233863_2_) -
getLivingEntityFromUUIDMemory
public static Optional<LivingEntity> getLivingEntityFromUUIDMemory(LivingEntity p_233864_0_, MemoryModuleType<UUID> p_233864_1_) -
getNearbyVillagersWithCondition
public static Stream<VillagerEntity> getNearbyVillagersWithCondition(VillagerEntity p_233872_0_, Predicate<VillagerEntity> p_233872_1_)
-