Class AbstractSchoolingFish

All Implemented Interfaces:
CommandSource, Bucketable, Attackable, Targeting, EntityAccess, Nameable, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
Cod, Salmon, TropicalFish

public abstract class AbstractSchoolingFish extends AbstractFish
  • Field Details

  • Constructor Details

  • Method Details

    • registerGoals

      protected void registerGoals()
      Overrides:
      registerGoals in class AbstractFish
    • getMaxSpawnClusterSize

      public int getMaxSpawnClusterSize()
      Overrides:
      getMaxSpawnClusterSize in class AbstractFish
    • getMaxSchoolSize

      public int getMaxSchoolSize()
    • canRandomSwim

      protected boolean canRandomSwim()
      Overrides:
      canRandomSwim in class AbstractFish
    • isFollower

      public boolean isFollower()
    • startFollowing

      public AbstractSchoolingFish startFollowing(AbstractSchoolingFish p_27526_)
    • stopFollowing

      public void stopFollowing()
    • addFollower

      private void addFollower()
    • removeFollower

      private void removeFollower()
    • canBeFollowed

      public boolean canBeFollowed()
    • tick

      public void tick()
      Overrides:
      tick in class Mob
    • hasFollowers

      public boolean hasFollowers()
    • inRangeOfLeader

      public boolean inRangeOfLeader()
    • pathToLeader

      public void pathToLeader()
    • addFollowers

      public void addFollowers(Stream<? extends AbstractSchoolingFish> p_27534_)
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_27528_, DifficultyInstance p_27529_, MobSpawnType p_27530_, @Nullable SpawnGroupData p_27531_, @Nullable CompoundTag p_27532_)
      Description copied from class: Mob
      Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
      Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
      Vanilla calls are replaced with a transformer, and are not visible in source.

      Be certain to either call super.finalizeSpawn or set the Mob.spawnType field from within your override.

      Overrides:
      finalizeSpawn in class Mob