public class HoglinBrain extends Object
Modifier and Type | Field and Description |
---|---|
private static IntRange |
AVOID_MEMORY_DURATION |
private static IntRange |
WALK_TOWARD_CLOSEST_ADULT_RANGE |
Constructor and Description |
---|
HoglinBrain() |
Modifier and Type | Method and Description |
---|---|
private static void |
addAvoidTasks(Brain<HoglinEntity> brain) |
private static void |
addCoreTasks(Brain<HoglinEntity> brain) |
private static void |
addFightTasks(Brain<HoglinEntity> brain) |
private static void |
addIdleTasks(Brain<HoglinEntity> brain) |
private static void |
askAdultsForHelp(HoglinEntity hoglin,
LivingEntity target) |
private static void |
askAdultsToAvoid(HoglinEntity hoglin,
LivingEntity target) |
private static void |
avoid(HoglinEntity hoglin,
LivingEntity target) |
private static void |
avoidEnemy(HoglinEntity hoglin,
LivingEntity target) |
protected static Brain<?> |
create(Brain<HoglinEntity> brain) |
private static List<HoglinEntity> |
getAdultHoglinsAround(HoglinEntity hoglin) |
private static Optional<? extends LivingEntity> |
getNearestVisibleTargetablePlayer(HoglinEntity hoglin) |
private static boolean |
hasBreedTarget(HoglinEntity hoglin) |
private static boolean |
hasMoreHoglinsAround(HoglinEntity hoglin) |
protected static boolean |
isNearPlayer(HoglinEntity hoglin) |
(package private) static boolean |
isWarpedFungusAround(HoglinEntity hoglin,
BlockPos pos) |
private static RandomTask<HoglinEntity> |
makeRandomWalkTask() |
private static boolean |
method_25947(HoglinEntity hoglinEntity) |
private static SoundEvent |
method_30082(HoglinEntity hoglinEntity,
Activity activity) |
static Optional<SoundEvent> |
method_30083(HoglinEntity hoglinEntity) |
private static boolean |
method_30085(HoglinEntity hoglinEntity) |
protected static void |
onAttacked(HoglinEntity hoglin,
LivingEntity attacker) |
protected static void |
onAttacking(HoglinEntity hoglin,
LivingEntity target) |
protected static void |
refreshActivities(HoglinEntity hoglin) |
private static void |
setAttackTarget(HoglinEntity hoglin,
LivingEntity target) |
private static void |
setAttackTargetIfCloser(HoglinEntity hoglin,
LivingEntity targetCandidate) |
private static void |
targetEnemy(HoglinEntity hoglin,
LivingEntity target) |
private static final IntRange AVOID_MEMORY_DURATION
private static final IntRange WALK_TOWARD_CLOSEST_ADULT_RANGE
protected static Brain<?> create(Brain<HoglinEntity> brain)
private static void addCoreTasks(Brain<HoglinEntity> brain)
private static void addIdleTasks(Brain<HoglinEntity> brain)
private static void addFightTasks(Brain<HoglinEntity> brain)
private static void addAvoidTasks(Brain<HoglinEntity> brain)
private static RandomTask<HoglinEntity> makeRandomWalkTask()
protected static void refreshActivities(HoglinEntity hoglin)
protected static void onAttacking(HoglinEntity hoglin, LivingEntity target)
private static void askAdultsToAvoid(HoglinEntity hoglin, LivingEntity target)
private static void avoidEnemy(HoglinEntity hoglin, LivingEntity target)
private static void avoid(HoglinEntity hoglin, LivingEntity target)
private static Optional<? extends LivingEntity> getNearestVisibleTargetablePlayer(HoglinEntity hoglin)
static boolean isWarpedFungusAround(HoglinEntity hoglin, BlockPos pos)
private static boolean method_25947(HoglinEntity hoglinEntity)
private static boolean hasMoreHoglinsAround(HoglinEntity hoglin)
protected static void onAttacked(HoglinEntity hoglin, LivingEntity attacker)
private static void targetEnemy(HoglinEntity hoglin, LivingEntity target)
private static void setAttackTarget(HoglinEntity hoglin, LivingEntity target)
private static void askAdultsForHelp(HoglinEntity hoglin, LivingEntity target)
private static void setAttackTargetIfCloser(HoglinEntity hoglin, LivingEntity targetCandidate)
public static Optional<SoundEvent> method_30083(HoglinEntity hoglinEntity)
private static SoundEvent method_30082(HoglinEntity hoglinEntity, Activity activity)
private static List<HoglinEntity> getAdultHoglinsAround(HoglinEntity hoglin)
private static boolean method_30085(HoglinEntity hoglinEntity)
private static boolean hasBreedTarget(HoglinEntity hoglin)
protected static boolean isNearPlayer(HoglinEntity hoglin)