net.minecraft.world.entity.monster.piglin

public class PiglinAi

com
net.minecraft.world.entity.monster.piglin.PiglinAi
net.minecraft.class_4838
net.minecraft.entity.mob.PiglinBrain
net.minecraft.world.entity.monster.piglin.PiglinAI

Field summary

Modifier and TypeField
public static final int
a
REPELLENT_DETECTION_RANGE_HORIZONTAL
field_30565
field_30565
public static final int
b
REPELLENT_DETECTION_RANGE_VERTICAL
field_30566
field_30566
public static final Item
c
BARTERING_ITEM
field_23826
BARTERING_ITEM
private static final int
e
PLAYER_ANGER_RANGE
field_30567
field_30567
private static final int
f
ANGER_DURATION
field_30568
field_30568
private static final int
g
ADMIRE_DURATION
field_30569
field_30569
private static final int
h
MAX_DISTANCE_TO_WALK_TO_ITEM
field_30570
field_30570
private static final int
i
MAX_TIME_TO_WALK_TO_ITEM
field_30571
field_30571
private static final int
j
HOW_LONG_TIME_TO_DISABLE_ADMIRE_WALKING_IF_CANT_REACH_ITEM
field_30572
field_30572
private static final int
k
CELEBRATION_TIME
field_30573
field_30573
protected static final UniformInt
d
TIME_BETWEEN_HUNTS
field_22388
HUNT_MEMORY_DURATION
private static final int
l
BABY_FLEE_DURATION_AFTER_GETTING_HIT
field_30574
AVOID_TARGET_EXPIRY
private static final int
m
HIT_BY_PLAYER_MEMORY_TIMEOUT
field_30575
ADMIRING_DISABLED_EXPIRY
private static final int
n
MAX_WALK_DISTANCE_TO_START_RIDING
field_30576
field_30576
private static final UniformInt
o
RIDE_START_INTERVAL
field_22389
MEMORY_TRANSFER_TASK_DURATION
private static final UniformInt
p
RIDE_DURATION
field_22390
RIDE_TARGET_MEMORY_DURATION
private static final UniformInt
q
RETREAT_DURATION
field_22391
AVOID_MEMORY_DURATION
private static final int
r
MELEE_ATTACK_COOLDOWN
field_30577
field_30577
private static final int
s
EAT_COOLDOWN
field_30578
field_30578
private static final int
t
DESIRED_DISTANCE_FROM_ENTITY_WHEN_AVOIDING
field_30579
field_30579
private static final int
u
MAX_LOOK_DIST
field_30580
field_30580
private static final int
v
MAX_LOOK_DIST_FOR_PLAYER_HOLDING_LOVED_ITEM
field_30581
field_30581
private static final int
w
INTERACTION_RANGE
field_30582
field_30582
private static final int
x
MIN_DESIRED_DIST_FROM_TARGET_WHEN_HOLDING_CROSSBOW
field_30583
field_30583
private static final float
y
SPEED_WHEN_STRAFING_BACK_FROM_TARGET
field_30584
CROSSBOW_ATTACK_FORWARD_MOVEMENT
private static final int
z
DESIRED_DISTANCE_FROM_ZOMBIFIED
field_30585
field_30585
private static final UniformInt
A
AVOID_ZOMBIFIED_DURATION
field_25384
GO_TO_ZOMBIFIED_MEMORY_DURATION
private static final UniformInt
B
BABY_AVOID_NEMESIS_DURATION
field_25698
GO_TO_NEMESIS_MEMORY_DURATION
private static final float
C
PROBABILITY_OF_CELEBRATION_DANCE
field_30557
field_30557
private static final float
D
SPEED_MULTIPLIER_WHEN_AVOIDING
field_30558
field_30558
private static final float
E
SPEED_MULTIPLIER_WHEN_RETREATING
field_30559
field_30559
private static final float
F
SPEED_MULTIPLIER_WHEN_MOUNTING
field_30560
START_RIDING_SPEED
private static final float
G
SPEED_MULTIPLIER_WHEN_GOING_TO_WANTED_ITEM
field_30561
field_30561
private static final float
H
SPEED_MULTIPLIER_WHEN_GOING_TO_CELEBRATE_LOCATION
field_30562
field_30562
private static final float
I
SPEED_MULTIPLIER_WHEN_DANCING
field_30563
field_30563
private static final float
J
SPEED_MULTIPLIER_WHEN_IDLING
field_30564
field_30564

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
protected static Brain<?>
a(col arg0, bxi<col> arg1)
makeBrain(Piglin arg0, Brain<Piglin> arg1)
method_24732(class_4836 arg0, class_4095<class_4836> arg1)
create(PiglinEntity piglin, Brain<PiglinEntity> brain)
protected static void
a(col arg0, bam arg1)
initMemories(Piglin arg0, RandomSource arg1)
method_24736(class_4836 arg0, class_5819 arg1)
setHuntedRecently(PiglinEntity piglin, Random random)
private static void
a(bxi<col> arg0)
initCoreActivity(Brain<Piglin> arg0)
method_24725(class_4095<class_4836> arg0)
addCoreActivities(Brain<PiglinEntity> brain)
private static void
b(bxi<col> arg0)
initIdleActivity(Brain<Piglin> arg0)
method_24743(class_4095<class_4836> arg0)
addIdleActivities(Brain<PiglinEntity> brain)
private static void
b(col arg0, bxi<col> arg1)
initFightActivity(Piglin arg0, Brain<Piglin> arg1)
method_24751(class_4836 arg0, class_4095<class_4836> arg1)
addFightActivities(PiglinEntity piglin, Brain<PiglinEntity> brain)
private static void
c(bxi<col> arg0)
initCelebrateActivity(Brain<Piglin> arg0)
method_24756(class_4095<class_4836> arg0)
addCelebrateActivities(Brain<PiglinEntity> brain)
private static void
d(bxi<col> arg0)
initAdmireItemActivity(Brain<Piglin> arg0)
method_24760(class_4095<class_4836> arg0)
addAdmireItemActivities(Brain<PiglinEntity> brain)
private static void
e(bxi<col> arg0)
initRetreatActivity(Brain<Piglin> arg0)
method_24764(class_4095<class_4836> arg0)
addAvoidActivities(Brain<PiglinEntity> brain)
private static void
f(bxi<col> arg0)
initRideHoglinActivity(Brain<Piglin> arg0)
method_24768(class_4095<class_4836> arg0)
addRideActivities(Brain<PiglinEntity> brain)
private static com.google.common.collect.ImmutableList<com.mojang.datafixers.util.Pair<OneShot<LivingEntity>, Integer>>
a()
createLookBehaviors()
method_47272()
makeFollowTasks()
private static RunOne<LivingEntity>
b()
createIdleLookBehaviors()
method_24717()
makeRandomFollowTask()
private static RunOne<Piglin>
c()
createIdleMovementBehaviors()
method_24718()
makeRandomWanderTask()
private static BehaviorControl<PathfinderMob>
d()
avoidRepellent()
method_24738()
makeGoToSoulFireTask()
private static BehaviorControl<Piglin>
e()
babyAvoidNemesis()
method_30090()
goToNemesisTask()
private static BehaviorControl<Piglin>
f()
avoidZombified()
method_24747()
makeFleeFromZombifiedPiglinTask()
protected static void
a(col arg0)
updateActivity(Piglin arg0)
method_24722(class_4836 arg0)
tickActivities(PiglinEntity piglin)
private static boolean
e(col arg0)
isBabyRidingBaby(Piglin arg0)
method_29277(class_4836 arg0)
canRideHoglin(PiglinEntity piglin)
protected static void
a(ash arg0, col arg1, cmb arg2)
pickUpItem(ServerLevel arg0, Piglin arg1, ItemEntity arg2)
method_24726(class_3218 arg0, class_4836 arg1, class_1542 arg2)
loot(ServerWorld world, PiglinEntity piglin, ItemEntity itemEntity)
private static void
a(ash arg0, col arg1, cxp arg2)
holdInOffhand(ServerLevel arg0, Piglin arg1, ItemStack arg2)
method_30089(class_3218 arg0, class_4836 arg1, class_1799 arg2)
swapItemWithOffHand(ServerWorld world, PiglinEntity piglin, ItemStack stack)
private static ItemStack
a(cmb arg0)
removeOneItemFromItemEntity(ItemEntity arg0)
method_24848(class_1542 arg0)
getItemFromStack(ItemEntity stack)
protected static void
a(ash arg0, col arg1, boolean arg2)
stopHoldingOffHandItem(ServerLevel arg0, Piglin arg1, boolean arg2)
method_24741(class_3218 arg0, class_4836 arg1, boolean arg2)
consumeOffHandItem(ServerWorld world, PiglinEntity piglin, boolean barter)
protected static void
a(ash arg0, col arg1)
cancelAdmiring(ServerLevel arg0, Piglin arg1)
method_25948(class_3218 arg0, class_4836 arg1)
pickupItemWithOffHand(ServerWorld world, PiglinEntity piglin)
private static void
c(col arg0, cxp arg1)
putInInventory(Piglin arg0, ItemStack arg1)
method_24849(class_4836 arg0, class_1799 arg1)
barterItem(PiglinEntity piglin, ItemStack stack)
private static void
a(col arg0, List<cxp> arg1)
throwItems(Piglin arg0, List<ItemStack> arg1)
method_24772(class_4836 arg0, List<class_1799> arg1)
doBarter(PiglinEntity piglin, List<ItemStack> items)
private static void
b(col arg0, List<cxp> arg1)
throwItemsTowardRandomPos(Piglin arg0, List<ItemStack> arg1)
method_24774(class_4836 arg0, List<class_1799> arg1)
dropBarteredItem(PiglinEntity piglin, List<ItemStack> items)
private static void
a(col arg0, cpx arg1, List<cxp> arg2)
throwItemsTowardPlayer(Piglin arg0, Player arg1, List<ItemStack> arg2)
method_24727(class_4836 arg0, class_1657 arg1, List<class_1799> arg2)
dropBarteredItem(PiglinEntity piglin, PlayerEntity player, List<ItemStack> items)
private static void
a(col arg0, List<cxp> arg1, fby arg2)
throwItemsTowardPos(Piglin arg0, List<ItemStack> arg1, Vec3 arg2)
method_24731(class_4836 arg0, List<class_1799> arg1, class_243 arg2)
drop(PiglinEntity piglin, List<ItemStack> items, Vec3d pos)
private static List<ItemStack>
f(col arg0)
getBarterResponseItems(Piglin arg0)
method_24776(class_4836 arg0)
getBarteredItem(PiglinEntity piglin)
private static boolean
a(bwg arg0, bwg arg1)
wantsToDance(LivingEntity arg0, LivingEntity arg1)
method_29276(class_1309 arg0, class_1309 arg1)
isHuntingTarget(LivingEntity piglin, LivingEntity target)
protected static boolean
a(col arg0, cxp arg1)
wantsToPickup(Piglin arg0, ItemStack arg1)
method_24730(class_4836 arg0, class_1799 arg1)
canGather(PiglinEntity piglin, ItemStack stack)
protected static boolean
a(cxp arg0)
isLovedItem(ItemStack arg0)
method_24735(class_1799 arg0)
isGoldenItem(ItemStack stack)
private static boolean
a(col arg0, bvk arg1)
wantsToStopRiding(Piglin arg0, Entity arg1)
method_24723(class_4836 arg0, class_1297 arg1)
canRide(PiglinEntity piglin, Entity ridden)
private static boolean
b(ash arg0, col arg1, bwg arg2)
isNearestValidAttackTarget(ServerLevel arg0, Piglin arg1, LivingEntity arg2)
method_24755(class_3218 arg0, class_4836 arg1, class_1309 arg2)
isPreferredAttackTarget(ServerWorld world, PiglinEntity piglin, LivingEntity target)
private static boolean
g(col arg0)
isNearZombified(Piglin arg0)
method_29537(class_4836 arg0)
getNearestZombifiedPiglin(PiglinEntity piglin)
private static Optional<? extends LivingEntity>
b(ash arg0, col arg1)
findNearestValidAttackTarget(ServerLevel arg0, Piglin arg1)
method_24777(class_3218 arg0, class_4836 arg1)
getPreferredTarget(ServerWorld world, PiglinEntity piglin)
public static void
a(ash arg0, cpx arg1, boolean arg2)
angerNearbyPiglins(ServerLevel arg0, Player arg1, boolean arg2)
method_24733(class_3218 arg0, class_1657 arg1, boolean arg2)
onGuardedBlockInteracted(ServerWorld world, PlayerEntity player, boolean blockOpen)
public static InteractionResult
a(ash arg0, col arg1, cpx arg2, bti arg3)
mobInteract(ServerLevel arg0, Piglin arg1, Player arg2, InteractionHand arg3)
method_24728(class_3218 arg0, class_4836 arg1, class_1657 arg2, class_1268 arg3)
playerInteract(ServerWorld world, PiglinEntity piglin, PlayerEntity player, Hand hand)
protected static boolean
b(col arg0, cxp arg1)
canAdmire(Piglin arg0, ItemStack arg1)
method_27086(class_4836 arg0, class_1799 arg1)
isWillingToTrade(PiglinEntity piglin, ItemStack nearbyItems)
protected static void
a(ash arg0, col arg1, bwg arg2)
wasHurtBy(ServerLevel arg0, Piglin arg1, LivingEntity arg2)
method_24724(class_3218 arg0, class_4836 arg1, class_1309 arg2)
onAttacked(ServerWorld world, PiglinEntity piglin, LivingEntity attacker)
protected static void
a(ash arg0, cok arg1, bwg arg2)
maybeRetaliate(ServerLevel arg0, AbstractPiglin arg1, LivingEntity arg2)
method_24759(class_3218 arg0, class_5418 arg1, class_1309 arg2)
tryRevenge(ServerWorld world, AbstractPiglinEntity piglin, LivingEntity target)
public static Optional<SoundEvent>
b(col arg0)
getSoundForCurrentActivity(Piglin arg0)
method_30091(class_4836 arg0)
getCurrentActivitySound(PiglinEntity piglin)
private static SoundEvent
a(col arg0, cro arg1)
getSoundForActivity(Piglin arg0, Activity arg1)
method_30087(class_4836 arg0, class_4168 arg1)
getSound(PiglinEntity piglin, Activity activity)
private static boolean
h(col arg0)
isNearAvoidTarget(Piglin arg0)
method_29538(class_4836 arg0)
hasTargetToAvoid(PiglinEntity piglin)
protected static List<AbstractPiglin>
c(col arg0)
getVisibleAdultPiglins(Piglin arg0)
method_24780(class_4836 arg0)
getNearbyVisiblePiglins(PiglinEntity piglin)
private static List<AbstractPiglin>
d(cok arg0)
getAdultPiglins(AbstractPiglin arg0)
method_26350(class_5418 arg0)
getNearbyPiglins(AbstractPiglinEntity piglin)
public static boolean
a(bwg arg0)
isWearingSafeArmor(LivingEntity arg0)
method_63665(class_1309 arg0)
isWearingPiglinSafeArmor(LivingEntity entity)
private static void
i(col arg0)
stopWalking(Piglin arg0)
method_24781(class_4836 arg0)
stopWalking(PiglinEntity piglin)
private static BehaviorControl<LivingEntity>
g()
babySometimesRideBabyHoglin()
method_24737()
makeRememberRideableHoglinTask()
protected static void
b(ash arg0, cok arg1, bwg arg2)
broadcastAngerTarget(ServerLevel arg0, AbstractPiglin arg1, LivingEntity arg2)
method_24742(class_3218 arg0, class_5418 arg1, class_1309 arg2)
angerAtCloserTargets(ServerWorld world, AbstractPiglinEntity piglin, LivingEntity target)
protected static void
a(ash arg0, cok arg1)
broadcastUniversalAnger(ServerLevel arg0, AbstractPiglin arg1)
method_29945(class_3218 arg0, class_5418 arg1)
angerNearbyPiglins(ServerWorld world, AbstractPiglinEntity piglin)
protected static void
c(ash arg0, cok arg1, bwg arg2)
setAngerTarget(ServerLevel arg0, AbstractPiglin arg1, LivingEntity arg2)
method_24750(class_3218 arg0, class_5418 arg1, class_1309 arg2)
becomeAngryWith(ServerWorld world, AbstractPiglinEntity piglin, LivingEntity target)
private static void
d(ash arg0, cok arg1, bwg arg2)
setAngerTargetToNearestTargetablePlayerIfFound(ServerLevel arg0, AbstractPiglin arg1, LivingEntity arg2)
method_29946(class_3218 arg0, class_5418 arg1, class_1309 arg2)
becomeAngryWithPlayer(ServerWorld world, AbstractPiglinEntity piglin, LivingEntity target)
private static void
e(ash arg0, cok arg1, bwg arg2)
setAngerTargetIfCloserThanCurrent(ServerLevel arg0, AbstractPiglin arg1, LivingEntity arg2)
method_24763(class_3218 arg0, class_5418 arg1, class_1309 arg2)
angerAtIfCloser(ServerWorld world, AbstractPiglinEntity piglin, LivingEntity target)
private static Optional<LivingEntity>
e(cok arg0)
getAngerTarget(AbstractPiglin arg0)
method_24782(class_5418 arg0)
getAngryAt(AbstractPiglinEntity piglin)
public static Optional<LivingEntity>
d(col arg0)
getAvoidTarget(Piglin arg0)
method_29536(class_4836 arg0)
getAvoiding(PiglinEntity piglin)
public static Optional<Player>
a(cok arg0)
getNearestVisibleTargetablePlayer(AbstractPiglin arg0)
method_29947(class_5418 arg0)
getNearestDetectedPlayer(AbstractPiglinEntity piglin)
private static void
a(col arg0, bwg arg1)
broadcastRetreat(Piglin arg0, LivingEntity arg1)
method_24767(class_4836 arg0, class_1309 arg1)
groupRunAwayFrom(PiglinEntity piglin, LivingEntity target)
private static void
b(col arg0, bwg arg1)
retreatFromNearestTarget(Piglin arg0, LivingEntity arg1)
method_24771(class_4836 arg0, class_1309 arg1)
runAwayFromClosestTarget(PiglinEntity piglin, LivingEntity target)
private static boolean
j(col arg0)
wantsToStopFleeing(Piglin arg0)
method_24783(class_4836 arg0)
shouldRunAwayFromHoglins(PiglinEntity piglin)
private static boolean
k(col arg0)
piglinsEqualOrOutnumberHoglins(Piglin arg0)
method_24784(class_4836 arg0)
hasNoAdvantageAgainstHoglins(PiglinEntity piglin)
private static boolean
l(col arg0)
hoglinsOutnumberPiglins(Piglin arg0)
method_24785(class_4836 arg0)
hasOutnumberedHoglins(PiglinEntity piglins)
private static void
c(col arg0, bwg arg1)
setAvoidTargetAndDontHuntForAWhile(Piglin arg0, LivingEntity arg1)
method_24773(class_4836 arg0, class_1309 arg1)
runAwayFrom(PiglinEntity piglin, LivingEntity target)
protected static void
b(cok arg0)
dontKillAnyMoreHoglinsForAWhile(AbstractPiglin arg0)
method_24762(class_5418 arg0)
rememberHunting(AbstractPiglinEntity piglin)
private static void
m(col arg0)
eat(Piglin arg0)
method_24787(class_4836 arg0)
setEatenRecently(PiglinEntity piglin)
private static Vec3
n(col arg0)
getRandomNearbyPos(Piglin arg0)
method_24788(class_4836 arg0)
findGround(PiglinEntity piglin)
private static boolean
o(col arg0)
hasEatenRecently(Piglin arg0)
method_24789(class_4836 arg0)
hasAteRecently(PiglinEntity piglin)
protected static boolean
c(cok arg0)
isIdle(AbstractPiglin arg0)
method_24766(class_5418 arg0)
hasIdleActivity(AbstractPiglinEntity piglin)
private static boolean
c(bwg arg0)
hasCrossbow(LivingEntity arg0)
method_24748(class_1309 arg0)
isHoldingCrossbow(LivingEntity piglin)
private static void
d(bwg arg0)
admireGoldItem(LivingEntity arg0)
method_24753(class_1309 arg0)
setAdmiringItem(LivingEntity entity)
private static boolean
p(col arg0)
isAdmiringItem(Piglin arg0)
method_24790(class_4836 arg0)
isAdmiringItem(PiglinEntity entity)
private static boolean
b(cxp arg0)
isBarterCurrency(ItemStack arg0)
method_24746(class_1799 arg0)
acceptsForBarter(ItemStack stack)
private static boolean
c(cxp arg0)
isFood(ItemStack arg0)
method_24752(class_1799 arg0)
isFood(ItemStack stack)
private static boolean
q(col arg0)
isNearRepellent(Piglin arg0)
method_24791(class_4836 arg0)
hasSoulFireNearby(PiglinEntity piglin)
private static boolean
e(bwg arg0)
seesPlayerHoldingLovedItem(LivingEntity arg0)
method_24761(class_1309 arg0)
hasPlayerHoldingWantedItemNearby(LivingEntity entity)
private static boolean
f(bwg arg0)
doesntSeeAnyPlayerHoldingLovedItem(LivingEntity arg0)
method_24765(class_1309 arg0)
canWander(LivingEntity piglin)
public static boolean
b(bwg arg0)
isPlayerHoldingLovedItem(LivingEntity arg0)
method_24739(class_1309 arg0)
isGoldHoldingPlayer(LivingEntity target)
private static boolean
r(col arg0)
isAdmiringDisabled(Piglin arg0)
method_24714(class_4836 arg0)
hasBeenHitByPlayer(PiglinEntity piglin)
private static boolean
g(bwg arg0)
wasHurtRecently(LivingEntity arg0)
method_24769(class_1309 arg0)
hasBeenHurt(LivingEntity piglin)
private static boolean
s(col arg0)
isHoldingItemInOffHand(Piglin arg0)
method_24917(class_4836 arg0)
hasItemInOffHand(PiglinEntity piglin)
private static boolean
t(col arg0)
isNotHoldingLovedItemInOffHand(Piglin arg0)
method_24850(class_4836 arg0)
doesNotHaveGoldInOffHand(PiglinEntity piglin)
public static boolean
a(bvr<?> arg0)
isZombified(EntityType<?> arg0)
method_29534(class_1299<?> arg0)
isZombified(EntityType<?> entityType)