net.minecraft.entity.boss

## Class EntityDragon

- java.lang.Object
- - net.minecraft.entity.Entity
  - - net.minecraft.entity.EntityLiving
    - - net.minecraft.entity.boss.EntityDragon

- All Implemented Interfaces:
    IBossDisplayData, IEntityMultiPart

      public class EntityDragon
      extends EntityLiving
      implements IBossDisplayData, IEntityMultiPart

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float` | `animTime` Animation time, used to control the speed of the animation cycles (wings flapping, jaw opening, etc.)
    `int` | `deathTicks`
    `EntityDragonPart[]` | `dragonPartArray` An array containing all body parts of this dragon
    `EntityDragonPart` | `dragonPartBody` The body bounding box of a dragon
    `EntityDragonPart` | `dragonPartHead` The head bounding box of a dragon
    `EntityDragonPart` | `dragonPartTail1`
    `EntityDragonPart` | `dragonPartTail2`
    `EntityDragonPart` | `dragonPartTail3`
    `EntityDragonPart` | `dragonPartWing1`
    `EntityDragonPart` | `dragonPartWing2`
    `boolean` | `forceNewTarget` Force selecting a new flight target at next tick if set to true.
    `EntityEnderCrystal` | `healingEnderCrystal` The current endercrystal that is healing this dragon
    `float` | `prevAnimTime` Animation time at previous tick.
    `double[][]` | `ringBuffer` Ring buffer array for the last 64 Y-positions and yaw rotations.
    `int` | `ringBufferIndex` Index into the ring buffer.
    `boolean` | `slowed` Activated if the dragon is flying though obsidian, white stone or bedrock.
    `double` | `targetX`
    `double` | `targetY`
    `double` | `targetZ`

    - ### Fields inherited from class net.minecraft.entity.EntityLiving

      `arrowHitTimer, attackedAtYaw, attackTime, cameraPitch, carryoverDamage, deathTime, experienceValue, field_70730_aX, field_70731_aW, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, landMovementFactor, limbSwing, limbYaw, livingSoundTime, maxHurtResistantTime, maxHurtTime, pickUpLootProability, prevCameraPitch, prevHealth, prevLimbYaw, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, renderYawOffset, rotationYawHead, swingProgress, swingProgressInt, tasks`

    - ### Fields inherited from class net.minecraft.entity.Entity

      `addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, cloakUrl, dimension, distanceWalkedModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, field_82151_R, field_98038_p, fireResistance, height, hurtResistantTime, ignoreFrustumCheck, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, skinUrl, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityDragon(World par1World)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `attackEntityFrom(DamageSource par1DamageSource, int par2)` Called when the entity is attacked.
    `boolean` | `attackEntityFromPart(EntityDragonPart par1EntityDragonPart, DamageSource par2DamageSource, int par3)`
    `boolean` | `canBeCollidedWith()` Returns true if other Entities should be prevented from moving through this Entity.
    `World` | `func_82194_d()`
    `int` | `getDragonHealth()` Returns the health points of the dragon.
    `int` | `getMaxHealth()`
    `double[]` | `getMovementOffsets(int par1, float par2)` Returns a double[3] array with movement offsets, used to calculate trailing tail/neck positions.
    `Entity[]` | `getParts()` Return the Entity parts making up this Entity (currently only for dragons)
    `void` | `onLivingUpdate()` Called frequently so the entity can update its state every tick as required.

    - ### Methods inherited from class net.minecraft.entity.EntityLiving

      `addPotionEffect, attackEntityAsMob, canAttackClass, canBePushed, canBeSteered, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, curePotionEffects, detachHome, eatGrassBonus, faceEntity, func_82143_as, func_82159_b, func_94056_bM, func_94057_bL, func_94058_c, func_94059_bO, func_94060_bK, func_94061_f, func_94062_bN, func_96120_a, func_98052_bS, func_98053_h, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getArmorItemForSlot, getArrowCountInEntity, getAttackTarget, getCanSpawnHere, getCreatureAttribute, getCurrentArmor, getCurrentItemOrArmor, getEntityName, getEntitySenses, getEyeHeight, getHealth, getHeldItem, getHomePosition, getItemIcon, getJumpHelper, getLastActiveItems, getLastAttackingEntity, getLook, getLookHelper, getLookVec, getMaximumHomeDistance, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getPosition, getRenderSizeModifier, getRNG, getRotationYawHead, getSpeedModifier, getSwingProgress, getTalkInterval, getTexture, getTotalArmorValue, getVerticalFaceSpeed, handleHealthUpdate, hasHome, heal, initCreature, isBlocking, isChild, isEntityAlive, isEntityUndead, isOnLadder, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, isWithinHomeDistance, isWithinHomeDistanceCurrentPosition, knockBack, moveEntityWithHeading, onDeath, onEntityUpdate, onItemPickup, onUpdate, performHurtAnimation, playLivingSound, rayTrace, readEntityFromNBT, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAIMoveSpeed, setArrowCountInEntity, setAttackTarget, setCurrentItemOrArmor, setEntityHealth, setHomeArea, setJumping, setLastAttackingEntity, setMoveForward, setPositionAndRotation2, setPositionAndUpdate, setRevengeTarget, setRotationYawHead, shouldRiderFaceForward, spawnExplosionParticle, swingItem, updateRidden, writeEntityToNBT`

    - ### Methods inherited from class net.minecraft.entity.Entity

      `addEntityID, addToPlayerScore, addVelocity, applyEntityCollision, canAttackWithItem, canRenderOnFire, copyDataFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_82146_a, func_82148_at, func_82149_j, func_85029_a, func_85031_j, func_96090_ax, func_96091_a, func_96092_aw, func_98034_c, func_98035_c, getAir, getBoundingBox, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBox, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getHasActivePotion, getMaxInPortalTime, getMountedYOffset, getPersistentID, getPickedResult, getPortalCooldown, getShadowSize, getYOffset, handleLavaMovement, handleWaterMovement, hashCode, interact, isBurning, isCreatureType, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInWater, isOffsetPositionInLiquid, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, readFromNBT, resetEntityId, setAir, setAngles, setDead, setEating, setFire, setHasActivePotion, setInPortal, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setSneaking, setSprinting, setVelocity, setWorld, shouldRenderInPass, shouldRiderSit, toString, travelToDimension, unmountEntity, updateCloak, updateRiderPosition, writeToNBT`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface net.minecraft.entity.boss.IBossDisplayData

      `getEntityName`

- - ### Field Detail

    - #### 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 Detail

    - #### EntityDragon

          public EntityDragon(World par1World)

  - ### Method Detail

    - #### getMaxHealth

          public int getMaxHealth()

      Specified by:
        `getMaxHealth` in interface `IBossDisplayData`
      Specified by:
        `getMaxHealth` 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,
                                     int par3)

      Specified by:
        `attackEntityFromPart` in interface `IEntityMultiPart`

    - #### attackEntityFrom

          public boolean attackEntityFrom(DamageSource par1DamageSource,
                                 int par2)

      Called when the entity is attacked.
      Overrides:
        `attackEntityFrom` 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 `EntityLiving`

    - #### getDragonHealth

          public int getDragonHealth()

      Description copied from interface: `IBossDisplayData`
      Returns the health points of the dragon.
      Specified by:
        `getDragonHealth` in interface `IBossDisplayData`

    - #### func_82194_d

          public World func_82194_d()

      Specified by:
        `func_82194_d` in interface `IEntityMultiPart`