Class Behavior<E extends LivingEntity>

java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
Direct Known Subclasses:
AcquirePoi, AnimalMakeLove, AnimalPanic, AssignProfessionFromJobSite, BabyFollowAdult, BackUpIfTooClose, BecomePassiveIfMemoryPresent, CelebrateVillagersSurvivedRaid, CopyMemoryWithExpiry, CountDownCooldownTicks, Croak, CrossbowAttack, Digging, DismountOrSkipMounting, DoNothing, Emerging, EraseMemoryIf, FollowTemptation, ForceUnmount, GateBehavior, GiveGiftToHero, GoAndGiveItemsToTarget, GoToClosestVillage, GoToPotentialJobSite, GoToTargetLocation, GoToWantedItem, HarvestFarmland, InsideBrownianWalk, InteractWith, InteractWithDoor, JumpOnBed, LocateHidingPlace, LongJumpMidJump, LongJumpToRandomPos, LookAndFollowTradingPlayerSink, LookAtTargetSink, MeleeAttack, Mount, MoveToSkySeeingSpot, MoveToTargetSink, PlayDead, PlayTagWithOtherKids, PoiCompetitorScan, PrepareRamNearestTarget, RamTarget, RandomStroll, ReactToBell, RememberIfHoglinWasKilled, ResetProfession, ResetRaidStatus, RingBell, Roar, RunIf, RunSometimes, SetClosestHomeAsWalkTarget, SetEntityLookTarget, SetHiddenState, SetLookAndInteract, SetRaidStatus, SetRoarTarget, SetWalkTargetAwayFrom, SetWalkTargetFromAttackTargetIfTargetOutOfReach, SetWalkTargetFromBlockMemory, SetWalkTargetFromLookTarget, SetWardenLookTarget, ShootTongue, ShowTradesToPlayer, SleepInBed, Sniffing, SocializeAtBell, SonicBoom, StartAdmiringItemIfSeen, StartAttacking, StartCelebratingIfTargetDead, StartHuntingHoglin, StayCloseToTarget, StopAdmiringIfItemTooFarAway, StopAdmiringIfTiredOfTryingToReachItem, StopAttackingIfTargetInvalid, StopBeingAngryIfTargetDead, StopHoldingItemIfNoLongerAdmiring, StrollAroundPoi, StrollToPoi, StrollToPoiList, Swim, TradeWithVillager, TryFindLand, TryFindLandNearWater, TryFindWater, TryLaySpawnOnWaterNearLand, TryToSniff, UpdateActivityFromSchedule, UseBonemeal, ValidateNearbyPoi, ValidatePlayDead, VillageBoundRandomStroll, VillagerCalmDown, VillagerMakeLove, VillagerPanicTrigger, WakeUp, WorkAtPoi, YieldJobSite

public abstract class Behavior<E extends LivingEntity> extends Object
  • Field Details

    • DEFAULT_DURATION

      public static final int DEFAULT_DURATION
      See Also:
    • entryCondition

      protected final Map<MemoryModuleType<?>,MemoryStatus> entryCondition
    • status

      private Behavior.Status status
    • endTimestamp

      private long endTimestamp
    • minDuration

      private final int minDuration
    • maxDuration

      private final int maxDuration
  • Constructor Details

  • Method Details

    • getStatus

      public Behavior.Status getStatus()
    • tryStart

      public final boolean tryStart(ServerLevel p_22555_, E p_22556_, long p_22557_)
    • start

      protected void start(ServerLevel p_22540_, E p_22541_, long p_22542_)
    • tickOrStop

      public final void tickOrStop(ServerLevel p_22559_, E p_22560_, long p_22561_)
    • tick

      protected void tick(ServerLevel p_22551_, E p_22552_, long p_22553_)
    • doStop

      public final void doStop(ServerLevel p_22563_, E p_22564_, long p_22565_)
    • stop

      protected void stop(ServerLevel p_22548_, E p_22549_, long p_22550_)
    • canStillUse

      protected boolean canStillUse(ServerLevel p_22545_, E p_22546_, long p_22547_)
    • timedOut

      protected boolean timedOut(long p_22537_)
    • checkExtraStartConditions

      protected boolean checkExtraStartConditions(ServerLevel p_22538_, E p_22539_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hasRequiredMemories

      private boolean hasRequiredMemories(E p_22544_)