Class Raider

All Implemented Interfaces:
CommandSource, Attackable, Enemy, Targeting, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, ILivingEntityExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
AbstractIllager, Ravager, Witch

public abstract class Raider extends PatrollingMonster
  • Field Details

    • IS_CELEBRATING

      protected static final EntityDataAccessor<Boolean> IS_CELEBRATING
    • ALLOWED_ITEMS

      static final Predicate<ItemEntity> ALLOWED_ITEMS
    • raid

      @Nullable protected Raid raid
    • wave

      private int wave
    • canJoinRaid

      private boolean canJoinRaid
    • ticksOutsideRaid

      private int ticksOutsideRaid
  • Constructor Details

  • Method Details

    • registerGoals

      protected void registerGoals()
      Overrides:
      registerGoals in class PatrollingMonster
    • defineSynchedData

      protected void defineSynchedData()
      Overrides:
      defineSynchedData in class Mob
    • applyRaidBuffs

      public abstract void applyRaidBuffs(int p_37844_, boolean p_37845_)
    • canJoinRaid

      public boolean canJoinRaid()
    • setCanJoinRaid

      public void setCanJoinRaid(boolean p_37898_)
    • aiStep

      public void aiStep()
      Overrides:
      aiStep in class Monster
    • updateNoActionTime

      protected void updateNoActionTime()
      Overrides:
      updateNoActionTime in class Monster
    • die

      public void die(DamageSource p_37847_)
      Overrides:
      die in class LivingEntity
    • canJoinPatrol

      public boolean canJoinPatrol()
      Overrides:
      canJoinPatrol in class PatrollingMonster
    • setCurrentRaid

      public void setCurrentRaid(@Nullable Raid p_37852_)
    • getCurrentRaid

      @Nullable public Raid getCurrentRaid()
    • hasActiveRaid

      public boolean hasActiveRaid()
    • setWave

      public void setWave(int p_37843_)
    • getWave

      public int getWave()
    • isCelebrating

      public boolean isCelebrating()
    • setCelebrating

      public void setCelebrating(boolean p_37900_)
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag p_37870_)
      Overrides:
      addAdditionalSaveData in class PatrollingMonster
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag p_37862_)
      Overrides:
      readAdditionalSaveData in class PatrollingMonster
    • pickUpItem

      protected void pickUpItem(ItemEntity p_37866_)
      Overrides:
      pickUpItem in class Mob
    • removeWhenFarAway

      public boolean removeWhenFarAway(double p_37894_)
      Overrides:
      removeWhenFarAway in class PatrollingMonster
    • requiresCustomPersistence

      public boolean requiresCustomPersistence()
      Overrides:
      requiresCustomPersistence in class Mob
    • getTicksOutsideRaid

      public int getTicksOutsideRaid()
    • setTicksOutsideRaid

      public void setTicksOutsideRaid(int p_37864_)
    • hurt

      public boolean hurt(DamageSource p_37849_, float p_37850_)
      Overrides:
      hurt in class LivingEntity
    • finalizeSpawn

      @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_37856_, DifficultyInstance p_37857_, MobSpawnType p_37858_, @Nullable SpawnGroupData p_37859_, @Nullable CompoundTag p_37860_)
      Description copied from class: Mob
      Forge: Override-Only, call via EventHooks.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 PatrollingMonster
    • getCelebrateSound

      public abstract SoundEvent getCelebrateSound()