Class PatrollingMonster

All Implemented Interfaces:
CommandSource, Attackable, Enemy, Targeting, EntityAccess, Nameable, ScoreHolder, ICapabilityProvider, ICapabilityProviderImpl<Entity>, ICapabilitySerializable<CompoundTag>, IForgeEntity, IForgeLivingEntity, 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_, @Nullable CompoundTag p_33053_)
      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
    • 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_)