Class EntityXPOrb

java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityXPOrb

public class EntityXPOrb extends Entity
  • Field Details

    • notPlayerOwned

      public boolean notPlayerOwned
    • xpColor

      public int xpColor
      A constantly increasing value that RenderXPOrb uses to control the colour shifting (Green / yellow)
    • xpOrbAge

      public int xpOrbAge
      The age of the XP orb in ticks.
    • field_70532_c

      public int field_70532_c
    • xpValue

      public int xpValue
      This is how much XP this orb has.
  • Constructor Details

    • EntityXPOrb

      public EntityXPOrb(World par1World, double par2, double par4, double par6, int par8, boolean bNotPlayerOwned)
    • EntityXPOrb

      public EntityXPOrb(World par1World, double par2, double par4, double par6, int par8)
    • EntityXPOrb

      public EntityXPOrb(World par1World)
  • Method Details

    • canTriggerWalking

      protected boolean canTriggerWalking()
      returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to prevent them from trampling crops
      Overrides:
      canTriggerWalking in class Entity
    • entityInit

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

      public int getBrightnessForRender(float par1)
      Overrides:
      getBrightnessForRender in class Entity
    • onUpdate

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

      public boolean handleWaterMovement()
      Returns if this entity is in water and will end up adding the waters velocity to the entity
      Overrides:
      handleWaterMovement in class Entity
    • dealFireDamage

      public void dealFireDamage(int par1)
      Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args: amountDamage
      Overrides:
      dealFireDamage in class Entity
    • attackEntityFrom

      public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
      Called when the entity is attacked.
      Overrides:
      attackEntityFrom in class Entity
    • pushOutOfBlocks

      protected boolean pushOutOfBlocks(double par1, double par3, double par5)
      Description copied from class: Entity
      Adds velocity to push the entity out of blocks at the specified x, y, z position Args: x, y, z
      Overrides:
      pushOutOfBlocks in class Entity
    • writeEntityToNBT

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

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

      public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
      Called by a player entity when they collide with an entity
      Overrides:
      onCollideWithPlayer in class Entity
    • getXpValue

      public int getXpValue()
      Returns the XP value of this XP orb.
    • getTextureByXP

      public int getTextureByXP()
      Returns a number from 1 to 10 based on how much XP this orb is worth. This is used by RenderXPOrb to determine what texture to use.
    • getXPSplit

      public static int getXPSplit(int par0)
      Get xp split rate (Is called until the xp drop code in EntityLiving.onEntityUpdate is complete)
    • canAttackWithItem

      public boolean canAttackWithItem()
      If returns false, the item will not inflict any damage against entities.
      Overrides:
      canAttackWithItem in class Entity
    • doBlockCollisions

      protected void doBlockCollisions()
      Description copied from class: Entity
      // +++START EDIT+++ // ---END EDIT--- Checks for block collisions, and calls the associated onBlockCollided method for the collided block.
      Overrides:
      doBlockCollisions in class Entity