Class Goal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
Direct Known Subclasses:
AmbientStandGoal, AnimalMateGoal, AttackGoal, AvoidSunlightGoal, BeeEntity.BeeWanderAroundGoal, BeeEntity.NotAngryGoal, BlazeEntity.ShootFireballGoal, BowAttackGoal, BreatheAirGoal, CatEntity.SleepWithOwnerGoal, ChaseBoatGoal, CreeperIgniteGoal, CrossbowAttackGoal, DiveJumpingGoal, DolphinEntity.LeadToNearbyTreasureGoal, DolphinEntity.PlayWithItemsGoal, DolphinEntity.SwimWithPlayerGoal, DoorInteractGoal, DrownedEntity.TargetAboveWaterGoal, DrownedEntity.WanderAroundOnSurfaceGoal, EatGrassGoal, EndermanEntity.ChasePlayerGoal, EndermanEntity.PickUpBlockGoal, EndermanEntity.PlaceBlockGoal, EscapeDangerGoal, EscapeSunlightGoal, FleeEntityGoal, FollowGroupLeaderGoal, FollowMobGoal, FollowOwnerGoal, FollowParentGoal, FormCaravanGoal, FoxEntity.CalmDownGoal, FoxEntity.MoveToHuntGoal, FoxEntity.PickupItemGoal, FoxEntity.StopWanderingGoal, GhastEntity.FlyRandomlyGoal, GhastEntity.LookAtTargetGoal, GhastEntity.ShootFireballGoal, GoToVillageGoal, GoToWalkTargetGoal, GuardianEntity.FireBeamGoal, HoldInHandsGoal, HorseBondWithPlayerGoal, IronGolemLookGoal, LookAroundGoal, LookAtEntityGoal, MeleeAttackGoal, MoveIntoWaterGoal, MoveThroughVillageGoal, MoveToRaidCenterGoal, MoveToTargetPosGoal, PandaEntity.LieOnBackGoal, PandaEntity.PickUpFoodGoal, PandaEntity.PlayGoal, PandaEntity.SneezeGoal, PatrolEntity.PatrolGoal, PhantomEntity.FindTargetGoal, PhantomEntity.MovementGoal, PhantomEntity.StartAttackGoal, PounceAtTargetGoal, PowderSnowJumpGoal, PrioritizedGoal, ProjectileAttackGoal, PufferfishEntity.InflateGoal, RaiderEntity.AttackHomeGoal, RaiderEntity.CelebrateGoal, RaiderEntity.PatrolApproachGoal, RaiderEntity.PickupBannerAsLeaderGoal, ShulkerEntity.PeekGoal, ShulkerEntity.ShootBulletGoal, SilverfishEntity.CallForHelpGoal, SitGoal, SitOnOwnerShoulderGoal, SkeletonHorseTrapTriggerGoal, SlimeEntity.FaceTowardTargetGoal, SlimeEntity.MoveGoal, SlimeEntity.RandomLookGoal, SlimeEntity.SwimmingGoal, SpellcastingIllagerEntity.CastSpellGoal, SpellcastingIllagerEntity.LookAtTargetGoal, SquidEntity.EscapeAttackerGoal, SquidEntity.SwimGoal, StopFollowingCustomerGoal, SwimGoal, TemptGoal, TrackTargetGoal, TurtleEntity.GoHomeGoal, TurtleEntity.TravelGoal, UniversalAngerGoal, VexEntity.ChargeTargetGoal, VexEntity.LookAtTargetGoal, WanderAroundGoal, WanderingTraderEntity.WanderToTargetGoal, WanderNearTargetGoal, WitherEntity.DescendAtHalfHealthGoal, WolfBegGoal

public abstract class Goal extends Object
Mappings:
Namespace Name
named net/minecraft/entity/ai/goal/Goal
intermediary net/minecraft/class_1352
official cak
  • Field Details

    • controls

      private final EnumSet<Goal.Control> controls
      Mappings:
      Namespace Name Mixin selector
      named controls Lnet/minecraft/entity/ai/goal/Goal;controls:Ljava/util/EnumSet;
      intermediary field_6451 Lnet/minecraft/class_1352;field_6451:Ljava/util/EnumSet;
      official a Lcak;a:Ljava/util/EnumSet;
  • Constructor Details

    • Goal

      public Goal()
  • Method Details

    • canStart

      public abstract boolean canStart()
      Mappings:
      Namespace Name Mixin selector
      named canStart Lnet/minecraft/entity/ai/goal/Goal;canStart()Z
      intermediary method_6264 Lnet/minecraft/class_1352;method_6264()Z
      official b Lcak;b()Z
    • shouldContinue

      public boolean shouldContinue()
      Mappings:
      Namespace Name Mixin selector
      named shouldContinue Lnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
      intermediary method_6266 Lnet/minecraft/class_1352;method_6266()Z
      official c Lcak;c()Z
    • canStop

      public boolean canStop()
      Mappings:
      Namespace Name Mixin selector
      named canStop Lnet/minecraft/entity/ai/goal/Goal;canStop()Z
      intermediary method_6267 Lnet/minecraft/class_1352;method_6267()Z
      official Q_ Lcak;Q_()Z
    • start

      public void start()
      Mappings:
      Namespace Name Mixin selector
      named start Lnet/minecraft/entity/ai/goal/Goal;start()V
      intermediary method_6269 Lnet/minecraft/class_1352;method_6269()V
      official d Lcak;d()V
    • stop

      public void stop()
      Mappings:
      Namespace Name Mixin selector
      named stop Lnet/minecraft/entity/ai/goal/Goal;stop()V
      intermediary method_6270 Lnet/minecraft/class_1352;method_6270()V
      official e Lcak;e()V
    • shouldRunEveryTick

      public boolean shouldRunEveryTick()
      Returns if the goal should run every tick or not.

      This returns false by default. If this returns false, the goal will tick once after the entity is spawned, and will tick every other tick.

      Returns:
      if the goal should run every tick or not
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named shouldRunEveryTick Lnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
      intermediary method_38846 Lnet/minecraft/class_1352;method_38846()Z
      official R_ Lcak;R_()Z
    • tick

      public void tick()
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/ai/goal/Goal;tick()V
      intermediary method_6268 Lnet/minecraft/class_1352;method_6268()V
      official a Lcak;a()V
    • setControls

      public void setControls(EnumSet<Goal.Control> controls)
      Mappings:
      Namespace Name Mixin selector
      named setControls Lnet/minecraft/entity/ai/goal/Goal;setControls(Ljava/util/EnumSet;)V
      intermediary method_6265 Lnet/minecraft/class_1352;method_6265(Ljava/util/EnumSet;)V
      official a Lcak;a(Ljava/util/EnumSet;)V
    • toString

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

      public EnumSet<Goal.Control> getControls()
      Mappings:
      Namespace Name Mixin selector
      named getControls Lnet/minecraft/entity/ai/goal/Goal;getControls()Ljava/util/EnumSet;
      intermediary method_6271 Lnet/minecraft/class_1352;method_6271()Ljava/util/EnumSet;
      official j Lcak;j()Ljava/util/EnumSet;
    • getTickCount

      protected int getTickCount(int ticks)
      Returns how many times a goal can tick in the given at most.
      Returns:
      how many times a goal can tick in the given at most
      Mappings:
      Namespace Name Mixin selector
      named getTickCount Lnet/minecraft/entity/ai/goal/Goal;getTickCount(I)I
      intermediary method_38847 Lnet/minecraft/class_1352;method_38847(I)I
      official a Lcak;a(I)I
    • toGoalTicks

      protected static int toGoalTicks(int serverTicks)
      Mappings:
      Namespace Name Mixin selector
      named toGoalTicks Lnet/minecraft/entity/ai/goal/Goal;toGoalTicks(I)I
      intermediary method_38848 Lnet/minecraft/class_1352;method_38848(I)I
      official b Lcak;b(I)I