Class EntityDragon

All Implemented Interfaces:
IAnimals, IBossDisplayData, IEntityMultiPart, IMob

public class EntityDragon extends EntityLiving implements IBossDisplayData, IEntityMultiPart, IMob
  • Field Details

    • targetX

      public double targetX
    • targetY

      public double targetY
    • targetZ

      public double targetZ
    • ringBuffer

      public double[][] ringBuffer
      Ring buffer array for the last 64 Y-positions and yaw rotations. Used to calculate offsets for the animations.
    • ringBufferIndex

      public int ringBufferIndex
      Index into the ring buffer. Incremented once per tick and restarts at 0 once it reaches the end of the buffer.
    • dragonPartArray

      public EntityDragonPart[] dragonPartArray
      An array containing all body parts of this dragon
    • dragonPartHead

      public EntityDragonPart dragonPartHead
      The head bounding box of a dragon
    • dragonPartBody

      public EntityDragonPart dragonPartBody
      The body bounding box of a dragon
    • dragonPartTail1

      public EntityDragonPart dragonPartTail1
    • dragonPartTail2

      public EntityDragonPart dragonPartTail2
    • dragonPartTail3

      public EntityDragonPart dragonPartTail3
    • dragonPartWing1

      public EntityDragonPart dragonPartWing1
    • dragonPartWing2

      public EntityDragonPart dragonPartWing2
    • prevAnimTime

      public float prevAnimTime
      Animation time at previous tick.
    • animTime

      public float animTime
      Animation time, used to control the speed of the animation cycles (wings flapping, jaw opening, etc.)
    • forceNewTarget

      public boolean forceNewTarget
      Force selecting a new flight target at next tick if set to true.
    • slowed

      public boolean slowed
      Activated if the dragon is flying though obsidian, white stone or bedrock. Slows movement and animation speed.
    • deathTicks

      public int deathTicks
    • healingEnderCrystal

      public EntityEnderCrystal healingEnderCrystal
      The current endercrystal that is healing this dragon
  • Constructor Details

    • EntityDragon

      public EntityDragon(World par1World)
  • Method Details

    • applyEntityAttributes

      protected void applyEntityAttributes()
      Overrides:
      applyEntityAttributes in class EntityLiving
    • entityInit

      protected void entityInit()
      Overrides:
      entityInit in class EntityLiving
    • getMovementOffsets

      public double[] getMovementOffsets(int par1, float par2)
      Returns a double[3] array with movement offsets, used to calculate trailing tail/neck positions. [0] = yaw offset, [1] = y offset, [2] = unused, always 0. Parameters: buffer index offset, partial ticks.
    • onLivingUpdate

      public void onLivingUpdate()
      Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.
      Overrides:
      onLivingUpdate in class EntityLiving
    • attackEntityFromPart

      public boolean attackEntityFromPart(EntityDragonPart par1EntityDragonPart, DamageSource par2DamageSource, float par3)
      Specified by:
      attackEntityFromPart in interface IEntityMultiPart
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class EntityLivingBase
    • func_82195_e

      protected boolean func_82195_e(DamageSource par1DamageSource, float par2)
    • onDeathUpdate

      protected void onDeathUpdate()
      handles entity death timer, experience orb and particle creation
      Overrides:
      onDeathUpdate in class EntityLivingBase
    • despawnEntity

      protected void despawnEntity()
      Makes the entity despawn if requirements are reached
      Overrides:
      despawnEntity in class EntityLiving
    • getParts

      public Entity[] getParts()
      Return the Entity parts making up this Entity (currently only for dragons)
      Overrides:
      getParts in class Entity
    • canBeCollidedWith

      public boolean canBeCollidedWith()
      Returns true if other Entities should be prevented from moving through this Entity.
      Overrides:
      canBeCollidedWith in class EntityLivingBase
    • func_82194_d

      public World func_82194_d()
      Specified by:
      func_82194_d in interface IEntityMultiPart
    • getLivingSound

      protected String getLivingSound()
      Returns the sound this mob makes while it's alive.
      Overrides:
      getLivingSound in class EntityLiving
    • getHurtSound

      protected String getHurtSound()
      Returns the sound this mob makes when it is hurt.
      Overrides:
      getHurtSound in class EntityLivingBase
    • getSoundVolume

      protected float getSoundVolume()
      Returns the volume for the sounds this mob makes.
      Overrides:
      getSoundVolume in class EntityLivingBase