Class EntityDragon

  • All Implemented Interfaces:
    IBossDisplayData, IEntityMultiPart, IMob, IAnimals, org.teavm.jso.JSObject

    public class EntityDragon
    extends EntityLiving
    implements IBossDisplayData, IEntityMultiPart, IMob
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • 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.
      • prevAnimTime

        public float prevAnimTime
      • animTime

        public float animTime
      • forceNewTarget

        public boolean forceNewTarget
      • slowed

        public boolean slowed
      • deathTicks

        public int deathTicks
    • Constructor Detail

      • EntityDragon

        public EntityDragon​(World worldIn)
    • Method Detail

      • getMovementOffsets

        public double[] getMovementOffsets​(int parInt1,
                                           float parFloat1)
        + 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 EntityLivingBase
      • attackDragonFrom

        protected boolean attackDragonFrom​(DamageSource source,
                                           float amount)
        + Provides a way to cause damage to an ender dragon.
      • 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
      • getLivingSound

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

        protected java.lang.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