Class WitherBoss

All Implemented Interfaces:
CommandSource, Enemy, RangedAttackMob, PowerableMob, EntityAccess, Nameable, ICapabilityProvider, ICapabilitySerializable<CompoundTag>, IForgeEntity, INBTSerializable<CompoundTag>

public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
  • Field Details

    • DATA_TARGET_A

      private static final EntityDataAccessor<Integer> DATA_TARGET_A
    • DATA_TARGET_B

      private static final EntityDataAccessor<Integer> DATA_TARGET_B
    • DATA_TARGET_C

      private static final EntityDataAccessor<Integer> DATA_TARGET_C
    • DATA_TARGETS

      private static final List<EntityDataAccessor<Integer>> DATA_TARGETS
    • DATA_ID_INV

      private static final EntityDataAccessor<Integer> DATA_ID_INV
    • INVULNERABLE_TICKS

      private static final int INVULNERABLE_TICKS
      See Also:
      Constant Field Values
    • xRotHeads

      private final float[] xRotHeads
    • yRotHeads

      private final float[] yRotHeads
    • xRotOHeads

      private final float[] xRotOHeads
    • yRotOHeads

      private final float[] yRotOHeads
    • nextHeadUpdate

      private final int[] nextHeadUpdate
    • idleHeadUpdates

      private final int[] idleHeadUpdates
    • destroyBlocksTick

      private int destroyBlocksTick
    • bossEvent

      private final ServerBossEvent bossEvent
    • LIVING_ENTITY_SELECTOR

      private static final Predicate<LivingEntity> LIVING_ENTITY_SELECTOR
    • TARGETING_CONDITIONS

      private static final TargetingConditions TARGETING_CONDITIONS
  • Constructor Details

  • Method Details

    • registerGoals

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

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

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

      public void readAdditionalSaveData(CompoundTag p_31474_)
      Overrides:
      readAdditionalSaveData in class Mob
    • setCustomName

      public void setCustomName(@Nullable Component p_31476_)
      Overrides:
      setCustomName in class Entity
    • getAmbientSound

      protected SoundEvent getAmbientSound()
      Overrides:
      getAmbientSound in class Mob
    • getHurtSound

      protected SoundEvent getHurtSound(DamageSource p_31500_)
      Overrides:
      getHurtSound in class Monster
    • getDeathSound

      protected SoundEvent getDeathSound()
      Overrides:
      getDeathSound in class Monster
    • aiStep

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

      protected void customServerAiStep()
      Overrides:
      customServerAiStep in class Mob
    • canDestroy

      @Deprecated public static boolean canDestroy(BlockState p_31492_)
      Deprecated.
    • makeInvulnerable

      public void makeInvulnerable()
    • makeStuckInBlock

      public void makeStuckInBlock(BlockState p_31471_, Vec3 p_31472_)
      Overrides:
      makeStuckInBlock in class Entity
    • startSeenByPlayer

      public void startSeenByPlayer(ServerPlayer p_31483_)
      Overrides:
      startSeenByPlayer in class Entity
    • stopSeenByPlayer

      public void stopSeenByPlayer(ServerPlayer p_31488_)
      Overrides:
      stopSeenByPlayer in class Entity
    • getHeadX

      private double getHeadX(int p_31515_)
    • getHeadY

      private double getHeadY(int p_31517_)
    • getHeadZ

      private double getHeadZ(int p_31519_)
    • rotlerp

      private float rotlerp(float p_31443_, float p_31444_, float p_31445_)
    • performRangedAttack

      private void performRangedAttack(int p_31458_, LivingEntity p_31459_)
    • performRangedAttack

      private void performRangedAttack(int p_31449_, double p_31450_, double p_31451_, double p_31452_, boolean p_31453_)
    • performRangedAttack

      public void performRangedAttack(LivingEntity p_31468_, float p_31469_)
      Specified by:
      performRangedAttack in interface RangedAttackMob
    • hurt

      public boolean hurt(DamageSource p_31461_, float p_31462_)
      Overrides:
      hurt in class LivingEntity
    • dropCustomDeathLoot

      protected void dropCustomDeathLoot(DamageSource p_31464_, int p_31465_, boolean p_31466_)
      Overrides:
      dropCustomDeathLoot in class Mob
    • checkDespawn

      public void checkDespawn()
      Overrides:
      checkDespawn in class Mob
    • causeFallDamage

      public boolean causeFallDamage(float p_149589_, float p_149590_, DamageSource p_149591_)
      Overrides:
      causeFallDamage in class LivingEntity
    • addEffect

      public boolean addEffect(MobEffectInstance p_182397_, @Nullable Entity p_182398_)
      Overrides:
      addEffect in class LivingEntity
    • createAttributes

      public static AttributeSupplier.Builder createAttributes()
    • getHeadYRot

      public float getHeadYRot(int p_31447_)
    • getHeadXRot

      public float getHeadXRot(int p_31481_)
    • getInvulnerableTicks

      public int getInvulnerableTicks()
    • setInvulnerableTicks

      public void setInvulnerableTicks(int p_31511_)
    • getAlternativeTarget

      public int getAlternativeTarget(int p_31513_)
    • setAlternativeTarget

      public void setAlternativeTarget(int p_31455_, int p_31456_)
    • isPowered

      public boolean isPowered()
      Specified by:
      isPowered in interface PowerableMob
    • getMobType

      public MobType getMobType()
      Overrides:
      getMobType in class LivingEntity
    • canRide

      protected boolean canRide(Entity p_31508_)
      Overrides:
      canRide in class Entity
    • canChangeDimensions

      public boolean canChangeDimensions()
      Overrides:
      canChangeDimensions in class Entity
    • canBeAffected

      public boolean canBeAffected(MobEffectInstance p_31495_)
      Overrides:
      canBeAffected in class LivingEntity