Interface IEntity<T extends net.minecraft.entity.Entity>

All Known Subinterfaces:
IAnimal<T>, IArrow<T>, ICustomNpc<T>, IEntityItem<T>, IEntityLiving<T>, IEntityLivingBase<T>, IMonster<T>, IPixelmon<T>, IPlayer<T>, IProjectile<T>, IThrowable<T>, IVillager<T>

public interface IEntity<T extends net.minecraft.entity.Entity>
  • Method Details

    • getX

      double getX()
    • setX

      void setX​(double x)
    • getY

      double getY()
    • setY

      void setY​(double y)
    • getZ

      double getZ()
    • setZ

      void setZ​(double z)
    • getBlockX

      int getBlockX()
    • getBlockY

      int getBlockY()
    • getBlockZ

      int getBlockZ()
    • getPos

      IPos getPos()
    • setPos

      void setPos​(IPos pos)
    • setPosition

      void setPosition​(double x, double y, double z)
    • setRotation

      void setRotation​(float rotation)
      Parameters:
      rotation - The rotation to be set (0-360)
    • getRotation

      float getRotation()
      Returns:
      Current rotation of the entity
    • getHeight

      float getHeight()
      Returns:
      Returns the height of the bounding box
    • getEyeHeight

      float getEyeHeight()
      Returns:
      Returns the eye height of the entity, used in this like canSee and such
    • getWidth

      float getWidth()
      Returns:
      Returns the width of the bounding box
    • setPitch

      void setPitch​(float pitch)
      Parameters:
      pitch - The viewing pitch
    • getPitch

      float getPitch()
      Returns:
      Entities viewing pitch
    • getMount

      IEntity getMount()
    • setMount

      void setMount​(IEntity entity)
    • getRiders

      IEntity[] getRiders()
      Returns:
      Returns the entities riding this entity
    • getAllRiders

      IEntity[] getAllRiders()
      Returns:
      Returns the entities riding this entity including the entities riding those entities
    • addRider

      void addRider​(IEntity entity)
    • clearRiders

      void clearRiders()
    • knockback

      void knockback​(int power, float direction)
      Parameters:
      power - How strong the knockback is
      direction - The direction in which he flies back (0-360). Usually based on getRotation()
    • isSneaking

      boolean isSneaking()
    • isSprinting

      boolean isSprinting()
    • dropItem

      IEntityItem dropItem​(IItemStack item)
    • inWater

      boolean inWater()
    • inFire

      boolean inFire()
    • inLava

      boolean inLava()
    • getTempdata

      IData getTempdata()
      Temp data stores anything but only untill it's reloaded
    • getStoreddata

      IData getStoreddata()
      Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved
    • getNbt

      INbt getNbt()
      The Entity's extra stored NBT data
      Returns:
      The Entity's extra stored NBT data
    • isAlive

      boolean isAlive()
    • getAge

      long getAge()
      Returns:
      The age of this entity in ticks
    • despawn

      void despawn()
      Despawns this entity. Removes it permanently
    • spawn

      void spawn()
      Spawns this entity into the world (For NPCs dont forget to set their home position)
    • kill

      void kill()
      Kill the entity, doesnt't despawn it
    • isBurning

      boolean isBurning()
      Returns:
      Return whether or not this entity is on fire
    • setBurning

      void setBurning​(int seconds)
      Parameters:
      seconds - Amount of seconds this entity will burn.
    • extinguish

      void extinguish()
      Removes fire from this entity
    • getWorld

      IWorld getWorld()
      Returns:
      Returns the IWorld
    • getTypeName

      java.lang.String getTypeName()
      Returns:
      Name as which it's registered in minecraft
    • getType

      int getType()
      Returns:
      Returns the EntityType of this entity
    • typeOf

      boolean typeOf​(int type)
      Parameters:
      type - EntityType to check
      Returns:
      Returns whether the entity is type of the given EntityType
    • getMCEntity

      T getMCEntity()
      Expert users only
      Returns:
      Returns minecrafts entity
    • getUUID

      java.lang.String getUUID()
    • generateNewUUID

      java.lang.String generateNewUUID()
    • storeAsClone

      void storeAsClone​(int tab, java.lang.String name)
      Stores the entity as clone server side
      Parameters:
      tab -
      name -
    • getEntityNbt

      INbt getEntityNbt()
      This is not a function you should be calling every tick. Returns the entire entity as nbt
    • setEntityNbt

      void setEntityNbt​(INbt nbt)
      This is not a function you should be calling every tick
    • rayTraceBlock

      IRayTrace rayTraceBlock​(double distance, boolean stopOnLiquid, boolean ignoreBlockWithoutBoundingBox)
      Gets the first block within distance the npc is looking at
      Parameters:
      distance -
      stopOnLiquid -
      ignoreBlockWithoutBoundingBox -
      Returns:
    • rayTraceEntities

      IEntity[] rayTraceEntities​(double distance, boolean stopOnLiquid, boolean ignoreBlockWithoutBoundingBox)
      Gets the entities within distance the npc is looking at sorted by distance
      Parameters:
      distance -
      stopOnLiquid -
      ignoreBlockWithoutBoundingBox -
      Returns:
    • getTags

      java.lang.String[] getTags()
      Tags are used by scoreboards and can be used in commands
    • addTag

      void addTag​(java.lang.String tag)
    • hasTag

      boolean hasTag​(java.lang.String tag)
    • removeTag

      void removeTag​(java.lang.String tag)
    • playAnimation

      void playAnimation​(int type)
      Play specific minecraft animations client side 0 and 3 are for EntityLivingBase entities and 2 is only for players
      Parameters:
      type - 0:Swing main hand, 1:Hurt animation, 2:Wakeup Player 3:Swing offhand hand, 4:Crit particle, 5:Spell crit particle
    • damage

      void damage​(float amount)
    • getMotionX

      double getMotionX()
    • getMotionY

      double getMotionY()
    • getMotionZ

      double getMotionZ()
    • setMotionX

      void setMotionX​(double motion)
    • setMotionY

      void setMotionY​(double motion)
    • setMotionZ

      void setMotionZ​(double motion)
    • getName

      java.lang.String getName()
      Returns:
      Returns the current name displayed by the entity
    • setName

      void setName​(java.lang.String name)
      Parameters:
      name - Set a custom name for this entity
    • hasCustomName

      boolean hasCustomName()
    • getEntityName

      java.lang.String getEntityName()
      Returns:
      Returns the original name incase a custom name has been set