Class PatrollingMonster

All Implemented Interfaces:
CommandSource, SyncedDataHolder, Attackable, EquipmentUser, Enemy, Targeting, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, ILivingEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
Raider

public abstract class PatrollingMonster extends Monster
  • Field Details

    • patrolTarget

      @Nullable private BlockPos patrolTarget
    • patrolLeader

      private boolean patrolLeader
    • patrolling

      private boolean patrolling
  • Constructor Details

  • Method Details

    • registerGoals

      protected void registerGoals()
      Overrides:
      registerGoals in class Mob
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_33063_)
      Overrides:
      addAdditionalSaveData in class Mob
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_33055_)
      Overrides:
      readAdditionalSaveData in class Mob
    • canBeLeader

      public boolean canBeLeader()
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_33049_, DifficultyInstance p_33050_, MobSpawnType p_33051_, @Nullable SpawnGroupData p_33052_)
      Overrides:
      finalizeSpawn in class Mob
    • checkPatrollingMonsterSpawnRules

      public static boolean checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster> p_219026_, LevelAccessor p_219027_, MobSpawnType p_219028_, BlockPos p_219029_, RandomSource p_219030_)
    • removeWhenFarAway

      public boolean removeWhenFarAway(double p_33073_)
      Overrides:
      removeWhenFarAway in class Mob
    • setPatrolTarget

      public void setPatrolTarget(BlockPos p_33071_)
    • getPatrolTarget

      public BlockPos getPatrolTarget()
    • hasPatrolTarget

      public boolean hasPatrolTarget()
    • setPatrolLeader

      public void setPatrolLeader(boolean p_33076_)
    • isPatrolLeader

      public boolean isPatrolLeader()
    • canJoinPatrol

      public boolean canJoinPatrol()
    • findPatrolTarget

      public void findPatrolTarget()
    • isPatrolling

      protected boolean isPatrolling()
    • setPatrolling

      protected void setPatrolling(boolean p_33078_)