public class EntityDragon extends EntityLiving implements IEntityMultiPart, IMob
EntityLiving.SpawnPlacementType
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 |
dragonPartNeck |
EntityDragonPart |
dragonPartTail1 |
EntityDragonPart |
dragonPartTail2 |
EntityDragonPart |
dragonPartTail3 |
EntityDragonPart |
dragonPartWing1 |
EntityDragonPart |
dragonPartWing2 |
EntityEnderCrystal |
healingEnderCrystal
The current endercrystal that is healing this dragon
|
static DataParameter<java.lang.Integer> |
PHASE |
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.
|
experienceValue, inventoryArmorDropChances, inventoryHandsDropChances, jumpHelper, livingSoundTime, moveHelper, navigator, targetTasks, tasks
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, HAND_STATES, hurtTime, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, updateBlocked, velocityChanged, width, world
MOB_SELECTOR, VISIBLE_MOB_SELECTOR
Constructor and Description |
---|
EntityDragon(World worldIn) |
Modifier and Type | Method and Description |
---|---|
void |
addPotionEffect(PotionEffect potioneffectIn)
adds a PotionEffect to the entity
|
protected void |
applyEntityAttributes() |
protected boolean |
attackDragonFrom(DamageSource source,
float amount)
Provides a way to cause damage to an ender dragon.
|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
attackEntityFromPart(EntityDragonPart dragonPart,
DamageSource source,
float damage) |
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
protected boolean |
canBeRidden(Entity entityIn) |
protected void |
despawnEntity()
Makes the entity despawn if requirements are reached
|
protected void |
entityInit() |
Path |
findPath(int startIdx,
int finishIdx,
PathPoint andThen)
Find and return a path among the circles described by pathPoints, or null if the shortest path would just be
directly between the start and finish with no intermediate points.
|
protected SoundEvent |
getAmbientSound() |
DragonFightManager |
getFightManager() |
Vec3d |
getHeadLookVec(float p_184665_1_) |
float |
getHeadPartYOffset(int p_184667_1_,
double[] p_184667_2_,
double[] p_184667_3_) |
protected SoundEvent |
getHurtSound() |
protected ResourceLocation |
getLootTable() |
double[] |
getMovementOffsets(int p_70974_1_,
float p_70974_2_)
Returns a double[3] array with movement offsets, used to calculate trailing tail/neck positions.
|
int |
getNearestPpIdx(double x,
double y,
double z)
Returns the index into pathPoints of the nearest PathPoint.
|
Entity[] |
getParts()
Return the Entity parts making up this Entity (currently only for dragons)
|
PhaseManager |
getPhaseManager() |
SoundCategory |
getSoundCategory() |
protected float |
getSoundVolume()
Returns the volume for the sounds this mob makes.
|
World |
getWorld() |
int |
initPathPoints()
Generates values for the fields pathPoints, and neighbors, and then returns the nearest pathPoint to the
specified position.
|
boolean |
isNonBoss()
Returns false if this Entity is a boss, true otherwise.
|
void |
notifyDataManagerChange(DataParameter<?> key) |
void |
onCrystalDestroyed(EntityEnderCrystal crystal,
BlockPos pos,
DamageSource dmgSrc) |
protected void |
onDeathUpdate()
handles entity death timer, experience orb and particle creation
|
void |
onKillCommand()
Called by the /kill command.
|
void |
onLivingUpdate()
Called frequently so the entity can update its state every tick as required.
|
void |
readEntityFromNBT(NBTTagCompound compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
static void |
registerFixesDragon(DataFixer fixer) |
void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
canAttackClass, canBeLeashedTo, canBeSteered, canDespawn, canEquipItem, canPassengerSteer, canPickUpLoot, clearLeashed, createBodyHelper, createNavigator, dropEquipment, dropFewItems, dropLoot, eatGrassBonus, enablePersistence, faceEntity, getArmorByChance, getArmorInventoryList, getAttackTarget, getCanSpawnHere, getDropItem, getEntitySenses, getExperiencePoints, getHeldEquipment, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpHelper, getLeashed, getLeashedToEntity, getLookHelper, getMaxFallHeight, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getPathPriority, getPrimaryHand, getRenderSizeModifier, getSlotForItemStack, getTalkInterval, getVerticalFaceSpeed, handleStatusUpdate, initEntityAI, isAIDisabled, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, onInitialSpawn, onUpdate, playHurtSound, playLivingSound, processInitialInteract, processInteract, registerFixesMob, replaceItemInInventory, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setItemStackToSlot, setLeashedToEntity, setLeftHanded, setMoveForward, setMoveStrafing, setNoAI, setPathPriority, spawnExplosionParticle, startRiding, updateAITasks, updateDistance, updateEntityActionState, updateEquipmentIfNeeded, updateLeashedState
applyArmorCalculations, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityAsMob, attemptTeleport, blockUsingShield, canBeHitWithPotion, canBePushed, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, dismountEntity, dismountRidingEntity, fall, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttributeMap, getCapability, getCombatTracker, getCreatureAttribute, getDeathSound, getEntityAttribute, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLastDamageSource, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getWaterSlowDown, handleJumpLava, handleJumpWater, hasCapability, hasItemInSlot, heal, isActiveItemStackBlocking, isChild, isElytraFlying, isEntityAlive, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPlayerSleeping, isPotionActive, isPotionApplicable, jump, kill, knockBack, markPotionsDirty, moveEntityWithHeading, onChangedPotionEffect, onDeath, onFinishedPotionEffect, onItemPickup, onItemUseFinish, onNewPotionEffect, performHurtAnimation, playEquipSound, removeActivePotionEffect, removePotionEffect, renderBrokenItemStack, resetActiveHand, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBeenAttacked, setHealth, setHeldItem, setJumping, setLastAttacker, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, stopActiveHand, swingArm, updateActiveHand, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRidden
addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyEntityCollision, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canFitPassenger, canRenderOnFire, canRiderInteract, canTrample, canTriggerWalking, canUseCommand, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAdjustedHorizontalFacing, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFireImmuneTicks, getFlag, getForward, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLowestRidingEntity, getMaxInPortalTime, getMirroredYaw, getMountedYOffset, getName, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getServer, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onCollideWithPlayer, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setDead, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSize, setSneaking, setUniqueId, setVelocity, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, toString, turn, updatePassenger, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
public static final DataParameter<java.lang.Integer> PHASE
public double[][] ringBuffer
public int ringBufferIndex
public EntityDragonPart[] dragonPartArray
public EntityDragonPart dragonPartHead
public EntityDragonPart dragonPartNeck
public EntityDragonPart dragonPartBody
public EntityDragonPart dragonPartTail1
public EntityDragonPart dragonPartTail2
public EntityDragonPart dragonPartTail3
public EntityDragonPart dragonPartWing1
public EntityDragonPart dragonPartWing2
public float prevAnimTime
public float animTime
public boolean slowed
public int deathTicks
public EntityEnderCrystal healingEnderCrystal
public EntityDragon(World worldIn)
protected void applyEntityAttributes()
applyEntityAttributes
in class EntityLiving
protected void entityInit()
entityInit
in class EntityLiving
public double[] getMovementOffsets(int p_70974_1_, float p_70974_2_)
public void onLivingUpdate()
onLivingUpdate
in class EntityLiving
public boolean attackEntityFromPart(EntityDragonPart dragonPart, DamageSource source, float damage)
attackEntityFromPart
in interface IEntityMultiPart
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class EntityLivingBase
protected boolean attackDragonFrom(DamageSource source, float amount)
public void onKillCommand()
onKillCommand
in class EntityLivingBase
protected void onDeathUpdate()
onDeathUpdate
in class EntityLivingBase
public int initPathPoints()
public int getNearestPpIdx(double x, double y, double z)
public Path findPath(int startIdx, int finishIdx, PathPoint andThen)
public static void registerFixesDragon(DataFixer fixer)
public void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
in class EntityLiving
public void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class EntityLiving
protected void despawnEntity()
despawnEntity
in class EntityLiving
public Entity[] getParts()
public boolean canBeCollidedWith()
canBeCollidedWith
in class EntityLivingBase
public World getWorld()
getWorld
in interface IEntityMultiPart
public SoundCategory getSoundCategory()
getSoundCategory
in class Entity
protected SoundEvent getAmbientSound()
getAmbientSound
in class EntityLiving
protected SoundEvent getHurtSound()
getHurtSound
in class EntityLivingBase
protected float getSoundVolume()
getSoundVolume
in class EntityLivingBase
protected ResourceLocation getLootTable()
getLootTable
in class EntityLiving
public float getHeadPartYOffset(int p_184667_1_, double[] p_184667_2_, double[] p_184667_3_)
public Vec3d getHeadLookVec(float p_184665_1_)
public void onCrystalDestroyed(EntityEnderCrystal crystal, BlockPos pos, DamageSource dmgSrc)
public void notifyDataManagerChange(DataParameter<?> key)
notifyDataManagerChange
in class EntityLivingBase
public PhaseManager getPhaseManager()
public DragonFightManager getFightManager()
public void addPotionEffect(PotionEffect potioneffectIn)
addPotionEffect
in class EntityLivingBase
protected boolean canBeRidden(Entity entityIn)
canBeRidden
in class Entity