Class PatrollingMonster

All Implemented Interfaces:
CommandSource, Enemy, EntityAccess, Nameable, ICapabilityProvider, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>
Direct Known Subclasses:
Raider

public abstract class PatrollingMonster extends Monster
  • Field Details

    • patrolTarget

      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
    • getMyRidingOffset

      public double getMyRidingOffset()
      Overrides:
      getMyRidingOffset in class Entity
    • 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_)
      Overrides:
      finalizeSpawn in class Mob
    • checkPatrollingMonsterSpawnRules

      public static boolean checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster> p_33057_, LevelAccessor p_33058_, MobSpawnType p_33059_, BlockPos p_33060_, Random p_33061_)
    • 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_)