Class EntityHanging

    • Field Detail

      • hangingPosition

        protected BlockPos hangingPosition
      • facingDirection

        public EnumFacing facingDirection
    • Constructor Detail

      • EntityHanging

        public EntityHanging​(World worldIn)
      • EntityHanging

        public EntityHanging​(World worldIn,
                             BlockPos hangingPositionIn)
    • Method Detail

      • entityInit

        protected void entityInit()
        Specified by:
        entityInit in class Entity
      • updateFacingWithBoundingBox

        protected void updateFacingWithBoundingBox​(EnumFacing facingDirectionIn)
        + Updates facing and bounding box based on it
      • onUpdate

        public void onUpdate()
        + Called to update the entity's position/logic.
        Overrides:
        onUpdate in class Entity
      • onValidSurface

        public boolean onValidSurface()
        + checks to make sure painting can be placed there
      • canBeCollidedWith

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

        public boolean hitByEntity​(Entity entity)
        + Called when a player attacks an entity. If this returns true the attack will not happen.
        Overrides:
        hitByEntity in class Entity
      • moveEntity

        public void moveEntity​(double d0,
                               double d1,
                               double d2)
        + Tries to moves the entity by the passed in displacement. Args: x, y, z
        Overrides:
        moveEntity in class Entity
      • addVelocity

        public void addVelocity​(double d0,
                                double d1,
                                double d2)
        + Adds to the current velocity of the entity. Args: x, y, z
        Overrides:
        addVelocity in class Entity
      • writeEntityToNBT

        public void writeEntityToNBT​(NBTTagCompound nbttagcompound)
        + (abstract) Protected helper method to write subclass entity data to NBT.
        Specified by:
        writeEntityToNBT in class Entity
      • readEntityFromNBT

        public void readEntityFromNBT​(NBTTagCompound nbttagcompound)
        + (abstract) Protected helper method to read subclass entity data from NBT.
        Specified by:
        readEntityFromNBT in class Entity
      • getWidthPixels

        public abstract int getWidthPixels()
      • getHeightPixels

        public abstract int getHeightPixels()
      • onBroken

        public abstract void onBroken​(Entity var1)
      • setPosition

        public void setPosition​(double d0,
                                double d1,
                                double d2)
        + Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
        Overrides:
        setPosition in class Entity
      • getHangingPosition

        public BlockPos getHangingPosition()