net.minecraft.world.entity.monster.piglin

public class PiglinAi

beq
net.minecraft.world.entity.monster.piglin.PiglinAi
net.minecraft.class_4838
net.minecraft.entity.mob.PiglinBrain
net.minecraft.entity.monster.piglin.PiglinTasks
net.minecraft.server.v1_16_R2.PiglinAI

Field summary

Modifier and TypeField
public static final Item
a
BARTERING_ITEM
field_23826
BARTERING_ITEM
field_234444_a_
private static final IntRange
b
TIME_BETWEEN_HUNTS
field_22388
HUNT_MEMORY_DURATION
field_234445_b_
private static final IntRange
c
RIDE_START_INTERVAL
field_22389
MEMORY_TRANSFER_TASK_DURATION
field_234446_c_
private static final IntRange
d
RIDE_DURATION
field_22390
RIDE_TARGET_MEMORY_DURATION
field_234447_d_
private static final IntRange
e
RETREAT_DURATION
field_22391
AVOID_MEMORY_DURATION
field_234448_e_
private static final IntRange
f
AVOID_ZOMBIFIED_DURATION
field_25384
field_25384
field_234449_f_
private static final IntRange
g
BABY_AVOID_NEMESIS_DURATION
field_25698
field_25698
field_241418_g_
private static final Set<Item>
h
FOOD_ITEMS
field_22392
FOOD
field_234450_g_

Method summary

Modifier and TypeMethod
protected static Brain<?>
a(bep arg0, arc<bep> arg1)
makeBrain(Piglin arg0, Brain<Piglin> arg1)
method_24732(class_4836 arg0, class_4095<class_4836> arg1)
create(PiglinEntity piglin, Brain<PiglinEntity> brain)
func_234469_a_(PiglinEntity arg0, Brain<PiglinEntity> arg1)
protected static void
a(bep arg0)
initMemories(Piglin arg0)
method_24736(class_4836 arg0)
setHuntedRecently(PiglinEntity piglin)
func_234466_a_(PiglinEntity arg0)
private static void
a(arc<bep> arg0)
initCoreActivity(Brain<Piglin> arg0)
method_24725(class_4095<class_4836> arg0)
addCoreActivities(Brain<PiglinEntity> piglin)
func_234464_a_(Brain<PiglinEntity> arg0)
private static void
b(arc<bep> arg0)
initIdleActivity(Brain<Piglin> arg0)
method_24743(class_4095<class_4836> arg0)
addIdleActivities(Brain<PiglinEntity> piglin)
func_234485_b_(Brain<PiglinEntity> arg0)
private static void
b(bep arg0, arc<bep> arg1)
initFightActivity(Piglin arg0, Brain<Piglin> arg1)
method_24751(class_4836 arg0, class_4095<class_4836> arg1)
addFightActivities(PiglinEntity piglin, Brain<PiglinEntity> brain)
func_234488_b_(PiglinEntity arg0, Brain<PiglinEntity> arg1)
private static void
c(arc<bep> arg0)
initCelebrateActivity(Brain<Piglin> arg0)
method_24756(class_4095<class_4836> arg0)
addCelebrateActivities(Brain<PiglinEntity> brain)
func_234495_c_(Brain<PiglinEntity> arg0)
private static void
d(arc<bep> arg0)
initAdmireItemActivity(Brain<Piglin> arg0)
method_24760(class_4095<class_4836> arg0)
addAdmireItemActivities(Brain<PiglinEntity> brain)
func_234502_d_(Brain<PiglinEntity> arg0)
private static void
e(arc<bep> arg0)
initRetreatActivity(Brain<Piglin> arg0)
method_24764(class_4095<class_4836> arg0)
addAvoidActivities(Brain<PiglinEntity> brain)
func_234507_e_(Brain<PiglinEntity> arg0)
private static void
f(arc<bep> arg0)
initRideHoglinActivity(Brain<Piglin> arg0)
method_24768(class_4095<class_4836> arg0)
addRideActivities(Brain<PiglinEntity> brain)
func_234511_f_(Brain<PiglinEntity> arg0)
private static RunOne<Piglin>
a()
createIdleLookBehaviors()
method_24717()
makeRandomFollowTask()
func_234458_a_()
private static RunOne<Piglin>
b()
createIdleMovementBehaviors()
method_24718()
makeRandomWanderTask()
func_234481_b_()
private static SetWalkTargetAwayFrom<BlockPos>
c()
avoidRepellent()
method_24738()
makeGoToSoulFireTask()
func_234493_c_()
private static CopyMemoryWithExpiry<Piglin, LivingEntity>
d()
babyAvoidNemesis()
method_30090()
method_30090()
func_241428_d_()
private static CopyMemoryWithExpiry<Piglin, LivingEntity>
e()
avoidZombified()
method_24747()
makeGoToZombifiedPiglinTask()
func_234500_d_()
protected static void
b(bep arg0)
updateActivity(Piglin arg0)
method_24722(class_4836 arg0)
tickActivities(PiglinEntity piglin)
func_234486_b_(PiglinEntity arg0)
private static boolean
h(bep arg0)
isBabyRidingBaby(Piglin arg0)
method_29277(class_4836 arg0)
canRideHoglin(PiglinEntity piglin)
func_234522_j_(PiglinEntity arg0)
protected static void
a(bep arg0, bcs arg1)
pickUpItem(Piglin arg0, ItemEntity arg1)
method_24726(class_4836 arg0, class_1542 arg1)
loot(PiglinEntity piglin, ItemEntity drop)
func_234470_a_(PiglinEntity arg0, ItemEntity arg1)
private static void
c(bep arg0, bly arg1)
holdInOffhand(Piglin arg0, ItemStack arg1)
method_30089(class_4836 arg0, class_1799 arg1)
swapItemWithOffHand(PiglinEntity piglin, ItemStack stack)
func_241427_c_(PiglinEntity arg0, ItemStack arg1)
private static ItemStack
a(bcs arg0)
removeOneItemFromItemEntity(ItemEntity arg0)
method_24848(class_1542 arg0)
getItemFromStack(ItemEntity stack)
func_234465_a_(ItemEntity arg0)
protected static void
a(bep arg0, boolean arg1)
stopHoldingOffHandItem(Piglin arg0, boolean arg1)
method_24741(class_4836 arg0, boolean arg1)
consumeOffHandItem(PiglinEntity piglin, boolean arg1)
func_234477_a_(PiglinEntity arg0, boolean arg1)
protected static void
c(bep arg0)
cancelAdmiring(Piglin arg0)
method_25948(class_4836 arg0)
pickupItemWithOffHand(PiglinEntity piglin)
func_234496_c_(PiglinEntity arg0)
private static void
d(bep arg0, bly arg1)
putInInventory(Piglin arg0, ItemStack arg1)
method_24849(class_4836 arg0, class_1799 arg1)
barterItem(PiglinEntity piglin, ItemStack stack)
func_234498_c_(PiglinEntity arg0, ItemStack arg1)
private static void
a(bep arg0, List<bly> arg1)
throwItems(Piglin arg0, List<ItemStack> arg1)
method_24772(class_4836 arg0, List<class_1799> arg1)
doBarter(PiglinEntity piglin, List<ItemStack> arg1)
func_234475_a_(PiglinEntity arg0, List<ItemStack> arg1)
private static void
b(bep arg0, List<bly> arg1)
throwItemsTowardRandomPos(Piglin arg0, List<ItemStack> arg1)
method_24774(class_4836 arg0, List<class_1799> arg1)
dropBarteredItem(PiglinEntity piglin, List<ItemStack> arg1)
func_234490_b_(PiglinEntity arg0, List<ItemStack> arg1)
private static void
a(bep arg0, bft arg1, List<bly> 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> arg2)
func_234472_a_(PiglinEntity arg0, PlayerEntity arg1, List<ItemStack> arg2)
private static void
a(bep arg0, List<bly> arg1, dck 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> arg1, Vec3d arg2)
func_234476_a_(PiglinEntity arg0, List<ItemStack> arg1, Vector3d arg2)
private static List<ItemStack>
i(bep arg0)
getBarterResponseItems(Piglin arg0)
method_24776(class_4836 arg0)
getBarteredItem(PiglinEntity piglin)
func_234524_k_(PiglinEntity arg0)
private static boolean
a(aqj arg0, aqj arg1)
wantsToDance(LivingEntity arg0, LivingEntity arg1)
method_29276(class_1309 arg0, class_1309 arg1)
method_29276(LivingEntity arg0, LivingEntity arg1)
func_234461_a_(LivingEntity arg0, LivingEntity arg1)
protected static boolean
a(bep arg0, bly arg1)
wantsToPickup(Piglin arg0, ItemStack arg1)
method_24730(class_4836 arg0, class_1799 arg1)
canGather(PiglinEntity piglin, ItemStack stack)
func_234474_a_(PiglinEntity arg0, ItemStack arg1)
protected static boolean
a(blu arg0)
isLovedItem(Item arg0)
method_24735(class_1792 arg0)
isGoldenItem(Item item)
func_234480_a_(Item arg0)
private static boolean
a(bep arg0, apx arg1)
wantsToStopRiding(Piglin arg0, Entity arg1)
method_24723(class_4836 arg0, class_1297 arg1)
canRide(PiglinEntity piglin, Entity ridden)
func_234467_a_(PiglinEntity arg0, Entity arg1)
private static boolean
b(bep arg0, aqj arg1)
isNearestValidAttackTarget(Piglin arg0, LivingEntity arg1)
method_24755(class_4836 arg0, class_1309 arg1)
isPreferredAttackTarget(PiglinEntity piglin, LivingEntity target)
func_234504_d_(PiglinEntity arg0, LivingEntity arg1)
private static boolean
j(bep arg0)
isNearZombified(Piglin arg0)
method_29537(class_4836 arg0)
getNearestZombifiedPiglin(PiglinEntity piglin)
func_234525_l_(PiglinEntity arg0)
private static Optional<? extends LivingEntity>
k(bep arg0)
findNearestValidAttackTarget(Piglin arg0)
method_24777(class_4836 arg0)
getPreferredTarget(PiglinEntity piglin)
func_234526_m_(PiglinEntity arg0)
public static void
a(bft arg0, boolean arg1)
angerNearbyPiglins(Player arg0, boolean arg1)
method_24733(class_1657 arg0, boolean arg1)
onGuardedBlockInteracted(PlayerEntity player, boolean blockOpen)
func_234478_a_(PlayerEntity arg0, boolean arg1)
public static InteractionResult
a(bep arg0, bft arg1, aoq arg2)
mobInteract(Piglin arg0, Player arg1, InteractionHand arg2)
method_24728(class_4836 arg0, class_1657 arg1, class_1268 arg2)
playerInteract(PiglinEntity piglin, PlayerEntity player, Hand hand)
func_234471_a_(PiglinEntity arg0, PlayerEntity arg1, Hand arg2)
protected static boolean
b(bep arg0, bly arg1)
canAdmire(Piglin arg0, ItemStack arg1)
method_27086(class_4836 arg0, class_1799 arg1)
isWillingToTrade(PiglinEntity piglin, ItemStack nearbyItems)
func_234489_b_(PiglinEntity arg0, ItemStack arg1)
protected static void
a(bep arg0, aqj arg1)
wasHurtBy(Piglin arg0, LivingEntity arg1)
method_24724(class_4836 arg0, class_1309 arg1)
onAttacked(PiglinEntity piglin, LivingEntity attacker)
func_234468_a_(PiglinEntity arg0, LivingEntity arg1)
protected static void
a(beo arg0, aqj arg1)
maybeRetaliate(AbstractPiglin arg0, LivingEntity arg1)
method_24759(class_5418 arg0, class_1309 arg1)
tryRevenge(AbstractPiglinEntity arg0, LivingEntity arg1)
func_234509_e_(AbstractPiglinEntity arg0, LivingEntity arg1)
public static Optional<SoundEvent>
d(bep arg0)
getSoundForCurrentActivity(Piglin arg0)
method_30091(class_4836 arg0)
method_30091(PiglinEntity piglin)
func_241429_d_(PiglinEntity arg0)
private static SoundEvent
a(bep arg0, bhc arg1)
getSoundForActivity(Piglin arg0, Activity arg1)
method_30087(class_4836 arg0, class_4168 arg1)
method_30087(PiglinEntity piglin, Activity activity)
func_241422_a_(PiglinEntity arg0, Activity arg1)
private static boolean
l(bep arg0)
isNearAvoidTarget(Piglin arg0)
method_29538(class_4836 arg0)
hasTargetToAvoid(PiglinEntity piglin)
func_234528_o_(PiglinEntity arg0)
protected static boolean
e(bep arg0)
hasAnyoneNearbyHuntedRecently(Piglin arg0)
method_24754(class_4836 arg0)
haveHuntedHoglinsRecently(PiglinEntity piglin)
func_234508_e_(PiglinEntity arg0)
private static List<AbstractPiglin>
m(bep arg0)
getVisibleAdultPiglins(Piglin arg0)
method_24780(class_4836 arg0)
getNearbyVisiblePiglins(PiglinEntity piglin)
func_234529_p_(PiglinEntity arg0)
private static List<AbstractPiglin>
e(beo arg0)
getAdultPiglins(AbstractPiglin arg0)
method_26350(class_5418 arg0)
getNearbyPiglins(AbstractPiglinEntity piglin)
func_234530_q_(AbstractPiglinEntity arg0)
public static boolean
a(aqj arg0)
isWearingGold(LivingEntity arg0)
method_24719(class_1309 arg0)
wearsGoldArmor(LivingEntity entity)
func_234460_a_(LivingEntity arg0)
private static void
n(bep arg0)
stopWalking(Piglin arg0)
method_24781(class_4836 arg0)
stopWalking(PiglinEntity piglin)
func_234531_r_(PiglinEntity arg0)
private static RunSometimes<Piglin>
f()
babySometimesRideBabyHoglin()
method_24737()
makeRememberRideableHoglinTask()
func_234505_e_()
protected static void
b(beo arg0, aqj arg1)
broadcastAngerTarget(AbstractPiglin arg0, LivingEntity arg1)
method_24742(class_5418 arg0, class_1309 arg1)
angerAtCloserTargets(AbstractPiglinEntity piglin, LivingEntity target)
func_234487_b_(AbstractPiglinEntity arg0, LivingEntity arg1)
protected static void
a(beo arg0)
broadcastUniversalAnger(AbstractPiglin arg0)
method_29945(class_5418 arg0)
angerNearbyPiglins(AbstractPiglinEntity piglin)
func_241430_f_(AbstractPiglinEntity arg0)
protected static void
f(bep arg0)
broadcastDontKillAnyMoreHoglinsForAWhile(Piglin arg0)
method_24758(class_4836 arg0)
rememberGroupHunting(PiglinEntity piglin)
func_234512_f_(PiglinEntity arg0)
protected static void
c(beo arg0, aqj arg1)
setAngerTarget(AbstractPiglin arg0, LivingEntity arg1)
method_24750(class_5418 arg0, class_1309 arg1)
becomeAngryWith(AbstractPiglinEntity piglin, LivingEntity target)
func_234497_c_(AbstractPiglinEntity arg0, LivingEntity arg1)
private static void
d(beo arg0, aqj arg1)
setAngerTargetToNearestTargetablePlayerIfFound(AbstractPiglin arg0, LivingEntity arg1)
method_29946(class_5418 arg0, class_1309 arg1)
becomeAngryWithPlayer(AbstractPiglinEntity piglin, LivingEntity player)
func_241431_f_(AbstractPiglinEntity arg0, LivingEntity arg1)
private static void
e(beo arg0, aqj arg1)
setAngerTargetIfCloserThanCurrent(AbstractPiglin arg0, LivingEntity arg1)
method_24763(class_5418 arg0, class_1309 arg1)
angerAtIfCloser(AbstractPiglinEntity piglin, LivingEntity target)
func_234513_f_(AbstractPiglinEntity arg0, LivingEntity arg1)
private static Optional<LivingEntity>
f(beo arg0)
getAngerTarget(AbstractPiglin arg0)
method_24782(class_5418 arg0)
getAngryAt(AbstractPiglinEntity piglin)
func_234532_s_(AbstractPiglinEntity arg0)
public static Optional<LivingEntity>
g(bep arg0)
getAvoidTarget(Piglin arg0)
method_29536(class_4836 arg0)
method_29536(PiglinEntity arg0)
func_234515_g_(PiglinEntity arg0)
public static Optional<Player>
b(beo arg0)
getNearestVisibleTargetablePlayer(AbstractPiglin arg0)
method_29947(class_5418 arg0)
getNearestDetectedPlayer(AbstractPiglinEntity piglin)
func_241432_i_(AbstractPiglinEntity arg0)
private static void
c(bep arg0, aqj arg1)
broadcastRetreat(Piglin arg0, LivingEntity arg1)
method_24767(class_4836 arg0, class_1309 arg1)
groupRunAwayFrom(PiglinEntity piglin, LivingEntity target)
func_234516_g_(PiglinEntity arg0, LivingEntity arg1)
private static void
d(bep arg0, aqj arg1)
retreatFromNearestTarget(Piglin arg0, LivingEntity arg1)
method_24771(class_4836 arg0, class_1309 arg1)
runAwayFromClosestTarget(PiglinEntity piglin, LivingEntity target)
func_234519_h_(PiglinEntity arg0, LivingEntity arg1)
private static boolean
o(bep arg0)
wantsToStopFleeing(Piglin arg0)
method_24783(class_4836 arg0)
shouldRunAwayFromHoglins(PiglinEntity piglin)
func_234533_t_(PiglinEntity arg0)
private static boolean
p(bep arg0)
piglinsEqualOrOutnumberHoglins(Piglin arg0)
method_24784(class_4836 arg0)
hasNoAdvantageAgainstHoglins(PiglinEntity piglin)
func_234534_u_(PiglinEntity arg0)
private static boolean
q(bep arg0)
hoglinsOutnumberPiglins(Piglin arg0)
method_24785(class_4836 arg0)
hasOutnumberedHoglins(PiglinEntity piglins)
func_234535_v_(PiglinEntity arg0)
private static void
e(bep arg0, aqj arg1)
setAvoidTargetAndDontHuntForAWhile(Piglin arg0, LivingEntity arg1)
method_24773(class_4836 arg0, class_1309 arg1)
runAwayFrom(PiglinEntity piglin, LivingEntity target)
func_234521_i_(PiglinEntity arg0, LivingEntity arg1)
protected static void
c(beo arg0)
dontKillAnyMoreHoglinsForAWhile(AbstractPiglin arg0)
method_24762(class_5418 arg0)
rememberHunting(AbstractPiglinEntity piglin)
func_234518_h_(AbstractPiglinEntity arg0)
private static void
s(bep arg0)
eat(Piglin arg0)
method_24787(class_4836 arg0)
setEatenRecently(PiglinEntity piglin)
func_234536_x_(PiglinEntity arg0)
private static Vec3
t(bep arg0)
getRandomNearbyPos(Piglin arg0)
method_24788(class_4836 arg0)
findGround(PiglinEntity piglin)
func_234537_y_(PiglinEntity arg0)
private static boolean
u(bep arg0)
hasEatenRecently(Piglin arg0)
method_24789(class_4836 arg0)
hasAteRecently(PiglinEntity piglin)
func_234538_z_(PiglinEntity arg0)
protected static boolean
d(beo arg0)
isIdle(AbstractPiglin arg0)
method_24766(class_5418 arg0)
hasIdleActivity(AbstractPiglinEntity piglin)
func_234520_i_(AbstractPiglinEntity arg0)
private static boolean
c(aqj arg0)
hasCrossbow(LivingEntity arg0)
method_24748(class_1309 arg0)
isHoldingCrossbow(LivingEntity piglin)
func_234494_c_(LivingEntity arg0)
private static void
d(aqj arg0)
admireGoldItem(LivingEntity arg0)
method_24753(class_1309 arg0)
setAdmiringItem(LivingEntity entity)
func_234501_d_(LivingEntity arg0)
private static boolean
v(bep arg0)
isAdmiringItem(Piglin arg0)
method_24790(class_4836 arg0)
isAdmiringItem(PiglinEntity entity)
func_234451_A_(PiglinEntity arg0)
private static boolean
b(blu arg0)
isBarterCurrency(Item arg0)
method_24746(class_1792 arg0)
acceptsForBarter(Item item)
func_234492_b_(Item arg0)
private static boolean
c(blu arg0)
isFood(Item arg0)
method_24752(class_1792 arg0)
isFood(Item item)
func_234499_c_(Item arg0)
private static boolean
e(aqj arg0)
isAttackAllowed(LivingEntity arg0)
method_24757(class_1309 arg0)
shouldAttack(LivingEntity target)
func_234506_e_(LivingEntity arg0)
private static boolean
w(bep arg0)
isNearRepellent(Piglin arg0)
method_24791(class_4836 arg0)
hasSoulFireNearby(PiglinEntity piglin)
func_234452_B_(PiglinEntity arg0)
private static boolean
f(aqj arg0)
seesPlayerHoldingLovedItem(LivingEntity arg0)
method_24761(class_1309 arg0)
hasPlayerHoldingWantedItemNearby(LivingEntity entity)
func_234510_f_(LivingEntity arg0)
private static boolean
g(aqj arg0)
doesntSeeAnyPlayerHoldingLovedItem(LivingEntity arg0)
method_24765(class_1309 arg0)
canWander(LivingEntity piglin)
func_234514_g_(LivingEntity arg0)
public static boolean
b(aqj arg0)
isPlayerHoldingLovedItem(LivingEntity arg0)
method_24739(class_1309 arg0)
isGoldHoldingPlayer(LivingEntity target)
func_234482_b_(LivingEntity arg0)
private static boolean
x(bep arg0)
isAdmiringDisabled(Piglin arg0)
method_24714(class_4836 arg0)
hasBeenHitByPlayer(PiglinEntity piglin)
func_234453_C_(PiglinEntity arg0)
private static boolean
h(aqj arg0)
wasHurtRecently(LivingEntity arg0)
method_24769(class_1309 arg0)
hasBeenHurt(LivingEntity piglin)
func_234517_h_(LivingEntity arg0)
private static boolean
y(bep arg0)
isHoldingItemInOffHand(Piglin arg0)
method_24917(class_4836 arg0)
hasItemInOffHand(PiglinEntity piglin)
func_234454_D_(PiglinEntity arg0)
private static boolean
z(bep arg0)
isNotHoldingLovedItemInOffHand(Piglin arg0)
method_24850(class_4836 arg0)
doesNotHaveGoldInOffHand(PiglinEntity piglin)
func_234455_E_(PiglinEntity arg0)
public static boolean
a(aqb arg0)
isZombified(EntityType arg0)
method_29534(class_1299 arg0)
isZombified(EntityType entityType)
func_234459_a_(EntityType arg0)