Package net.minecraft.entity.ai.brain
Class BrainUtil
- java.lang.Object
-
- net.minecraft.entity.ai.brain.BrainUtil
-
public class BrainUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BrainUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 java.util.Optional<LivingEntity>
getLivingEntityFromUUIDMemory(LivingEntity p_233864_0_, MemoryModuleType<java.util.UUID> p_233864_1_)
static java.util.stream.Stream<VillagerEntity>
getNearbyVillagersWithCondition(VillagerEntity p_233872_0_, java.util.function.Predicate<VillagerEntity> p_233872_1_)
static LivingEntity
getNearestTarget(LivingEntity p_233867_0_, java.util.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_, java.util.function.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_)
-
-
-
Method Detail
-
lockGazeAndWalkToEachOther
public static void lockGazeAndWalkToEachOther(LivingEntity p_220618_0_, LivingEntity p_220618_1_, float p_220618_2_)
-
entityIsVisible
public static boolean entityIsVisible(Brain<?> p_220619_0_, LivingEntity p_220619_1_)
-
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_, java.util.function.Predicate<LivingEntity> p_233870_2_)
-
lookAtEachOther
private static void lookAtEachOther(LivingEntity p_220616_0_, LivingEntity p_220616_1_)
-
lookAtEntity
public static void lookAtEntity(LivingEntity p_220625_0_, LivingEntity p_220625_1_)
-
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
public static void throwItem(LivingEntity p_233865_0_, ItemStack p_233865_1_, Vector3d p_233865_2_)
-
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
public static boolean isWithinMeleeAttackRange(LivingEntity p_233874_0_, LivingEntity p_233874_1_)
-
isOtherTargetMuchFurtherAwayThanCurrentAttackTarget
public static boolean isOtherTargetMuchFurtherAwayThanCurrentAttackTarget(LivingEntity p_233861_0_, LivingEntity p_233861_1_, double p_233861_2_)
-
canSee
public static boolean canSee(LivingEntity p_233876_0_, LivingEntity p_233876_1_)
-
getNearestTarget
public static LivingEntity getNearestTarget(LivingEntity p_233867_0_, java.util.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 java.util.Optional<LivingEntity> getLivingEntityFromUUIDMemory(LivingEntity p_233864_0_, MemoryModuleType<java.util.UUID> p_233864_1_)
-
getNearbyVillagersWithCondition
public static java.util.stream.Stream<VillagerEntity> getNearbyVillagersWithCondition(VillagerEntity p_233872_0_, java.util.function.Predicate<VillagerEntity> p_233872_1_)
-
-