Class PiglinTasks


  • public class PiglinTasks
    extends java.lang.Object
    • Field Detail

      • BARTERING_ITEM

        public static final Item BARTERING_ITEM
      • TIME_BETWEEN_HUNTS

        private static final RangedInteger TIME_BETWEEN_HUNTS
      • RIDE_START_INTERVAL

        private static final RangedInteger RIDE_START_INTERVAL
      • RIDE_DURATION

        private static final RangedInteger RIDE_DURATION
      • RETREAT_DURATION

        private static final RangedInteger RETREAT_DURATION
      • AVOID_ZOMBIFIED_DURATION

        private static final RangedInteger AVOID_ZOMBIFIED_DURATION
      • BABY_AVOID_NEMESIS_DURATION

        private static final RangedInteger BABY_AVOID_NEMESIS_DURATION
      • FOOD_ITEMS

        private static final java.util.Set<Item> FOOD_ITEMS
    • Constructor Detail

      • PiglinTasks

        public PiglinTasks()
    • Method Detail

      • initMemories

        protected static void initMemories​(PiglinEntity p_234466_0_)
      • initCoreActivity

        private static void initCoreActivity​(Brain<PiglinEntity> p_234464_0_)
      • initIdleActivity

        private static void initIdleActivity​(Brain<PiglinEntity> p_234485_0_)
      • initCelebrateActivity

        private static void initCelebrateActivity​(Brain<PiglinEntity> p_234495_0_)
      • initAdmireItemActivity

        private static void initAdmireItemActivity​(Brain<PiglinEntity> p_234502_0_)
      • initRetreatActivity

        private static void initRetreatActivity​(Brain<PiglinEntity> p_234507_0_)
      • initRideHoglinActivity

        private static void initRideHoglinActivity​(Brain<PiglinEntity> p_234511_0_)
      • updateActivity

        protected static void updateActivity​(PiglinEntity p_234486_0_)
      • isBabyRidingBaby

        private static boolean isBabyRidingBaby​(PiglinEntity p_234522_0_)
      • holdInOffhand

        private static void holdInOffhand​(PiglinEntity p_241427_0_,
                                          ItemStack p_241427_1_)
      • removeOneItemFromItemEntity

        private static ItemStack removeOneItemFromItemEntity​(ItemEntity p_234465_0_)
      • stopHoldingOffHandItem

        protected static void stopHoldingOffHandItem​(PiglinEntity p_234477_0_,
                                                     boolean p_234477_1_)
      • cancelAdmiring

        protected static void cancelAdmiring​(PiglinEntity p_234496_0_)
      • putInInventory

        private static void putInInventory​(PiglinEntity p_234498_0_,
                                           ItemStack p_234498_1_)
      • throwItems

        private static void throwItems​(PiglinEntity p_234475_0_,
                                       java.util.List<ItemStack> p_234475_1_)
      • throwItemsTowardRandomPos

        private static void throwItemsTowardRandomPos​(PiglinEntity p_234490_0_,
                                                      java.util.List<ItemStack> p_234490_1_)
      • throwItemsTowardPlayer

        private static void throwItemsTowardPlayer​(PiglinEntity p_234472_0_,
                                                   PlayerEntity p_234472_1_,
                                                   java.util.List<ItemStack> p_234472_2_)
      • throwItemsTowardPos

        private static void throwItemsTowardPos​(PiglinEntity p_234476_0_,
                                                java.util.List<ItemStack> p_234476_1_,
                                                Vector3d p_234476_2_)
      • getBarterResponseItems

        private static java.util.List<ItemStack> getBarterResponseItems​(PiglinEntity p_234524_0_)
      • wantsToPickup

        protected static boolean wantsToPickup​(PiglinEntity p_234474_0_,
                                               ItemStack p_234474_1_)
      • isLovedItem

        protected static boolean isLovedItem​(Item p_234480_0_)
      • wantsToStopRiding

        private static boolean wantsToStopRiding​(PiglinEntity p_234467_0_,
                                                 Entity p_234467_1_)
      • isNearestValidAttackTarget

        private static boolean isNearestValidAttackTarget​(PiglinEntity p_234504_0_,
                                                          LivingEntity p_234504_1_)
      • isNearZombified

        private static boolean isNearZombified​(PiglinEntity p_234525_0_)
      • findNearestValidAttackTarget

        private static java.util.Optional<? extends LivingEntity> findNearestValidAttackTarget​(PiglinEntity p_234526_0_)
      • angerNearbyPiglins

        public static void angerNearbyPiglins​(PlayerEntity p_234478_0_,
                                              boolean p_234478_1_)
      • getSoundForCurrentActivity

        public static java.util.Optional<SoundEvent> getSoundForCurrentActivity​(PiglinEntity p_241429_0_)
      • isNearAvoidTarget

        private static boolean isNearAvoidTarget​(PiglinEntity p_234528_0_)
      • hasAnyoneNearbyHuntedRecently

        protected static boolean hasAnyoneNearbyHuntedRecently​(PiglinEntity p_234508_0_)
      • isWearingGold

        public static boolean isWearingGold​(LivingEntity p_234460_0_)
      • stopWalking

        private static void stopWalking​(PiglinEntity p_234531_0_)
      • broadcastUniversalAnger

        protected static void broadcastUniversalAnger​(AbstractPiglinEntity p_241430_0_)
      • broadcastDontKillAnyMoreHoglinsForAWhile

        protected static void broadcastDontKillAnyMoreHoglinsForAWhile​(PiglinEntity p_234512_0_)
      • setAngerTargetToNearestTargetablePlayerIfFound

        private static void setAngerTargetToNearestTargetablePlayerIfFound​(AbstractPiglinEntity p_241431_0_,
                                                                           LivingEntity p_241431_1_)
      • retreatFromNearestTarget

        private static void retreatFromNearestTarget​(PiglinEntity p_234519_0_,
                                                     LivingEntity p_234519_1_)
      • wantsToStopFleeing

        private static boolean wantsToStopFleeing​(PiglinEntity p_234533_0_)
      • piglinsEqualOrOutnumberHoglins

        private static boolean piglinsEqualOrOutnumberHoglins​(PiglinEntity p_234534_0_)
      • hoglinsOutnumberPiglins

        private static boolean hoglinsOutnumberPiglins​(PiglinEntity p_234535_0_)
      • setAvoidTargetAndDontHuntForAWhile

        private static void setAvoidTargetAndDontHuntForAWhile​(PiglinEntity p_234521_0_,
                                                               LivingEntity p_234521_1_)
      • dontKillAnyMoreHoglinsForAWhile

        protected static void dontKillAnyMoreHoglinsForAWhile​(AbstractPiglinEntity p_234518_0_)
      • eat

        private static void eat​(PiglinEntity p_234536_0_)
      • hasEatenRecently

        private static boolean hasEatenRecently​(PiglinEntity p_234538_0_)
      • hasCrossbow

        private static boolean hasCrossbow​(LivingEntity p_234494_0_)
      • admireGoldItem

        private static void admireGoldItem​(LivingEntity p_234501_0_)
      • isAdmiringItem

        private static boolean isAdmiringItem​(PiglinEntity p_234451_0_)
      • isBarterCurrency

        private static boolean isBarterCurrency​(Item p_234492_0_)
      • isFood

        private static boolean isFood​(Item p_234499_0_)
      • isAttackAllowed

        private static boolean isAttackAllowed​(LivingEntity p_234506_0_)
      • isNearRepellent

        private static boolean isNearRepellent​(PiglinEntity p_234452_0_)
      • seesPlayerHoldingLovedItem

        private static boolean seesPlayerHoldingLovedItem​(LivingEntity p_234510_0_)
      • doesntSeeAnyPlayerHoldingLovedItem

        private static boolean doesntSeeAnyPlayerHoldingLovedItem​(LivingEntity p_234514_0_)
      • isPlayerHoldingLovedItem

        public static boolean isPlayerHoldingLovedItem​(LivingEntity p_234482_0_)
      • isAdmiringDisabled

        private static boolean isAdmiringDisabled​(PiglinEntity p_234453_0_)
      • wasHurtRecently

        private static boolean wasHurtRecently​(LivingEntity p_234517_0_)
      • isHoldingItemInOffHand

        private static boolean isHoldingItemInOffHand​(PiglinEntity p_234454_0_)
      • isNotHoldingLovedItemInOffHand

        private static boolean isNotHoldingLovedItemInOffHand​(PiglinEntity p_234455_0_)
      • isZombified

        public static boolean isZombified​(EntityType p_234459_0_)