Class EyeOfEnderEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.EyeOfEnderEntity
All Implemented Interfaces:
FlyingItemEntity, CommandOutput, Nameable

@EnvironmentInterfaces(@EnvironmentInterface(value=CLIENT,itf=FlyingItemEntity.class))
public class EyeOfEnderEntity
extends Entity
implements FlyingItemEntity
  • Field Details

    • ITEM

      private static final TrackedData<ItemStack> ITEM
    • targetX

      private double targetX
    • targetY

      private double targetY
    • targetZ

      private double targetZ
    • lifespan

      private int lifespan
    • dropsItem

      private boolean dropsItem
  • Constructor Details

    • EyeOfEnderEntity

      public EyeOfEnderEntity​(EntityType<? extends EyeOfEnderEntity> type, World world)
    • EyeOfEnderEntity

      public EyeOfEnderEntity​(World world, double x, double y, double z)
  • Method Details

    • setItem

      public void setItem​(ItemStack stack)
    • getTrackedItem

      private ItemStack getTrackedItem()
    • getStack

      public ItemStack getStack()
      Specified by:
      getStack in interface FlyingItemEntity
    • initDataTracker

      protected void initDataTracker()
      Specified by:
      initDataTracker in class Entity
    • shouldRender

      @Environment(CLIENT) public boolean shouldRender​(double distance)
      Overrides:
      shouldRender in class Entity
    • initTargetPos

      public void initTargetPos​(BlockPos pos)
      Sets where the eye will fly towards. If close enough, it will fly directly towards it, otherwise, it will fly upwards, in the direction of the BlockPos.
      Parameters:
      pos - the block the eye of ender is drawn towards
    • setVelocityClient

      @Environment(CLIENT) public void setVelocityClient​(double x, double y, double z)
      Overrides:
      setVelocityClient in class Entity
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • writeCustomDataToTag

      public void writeCustomDataToTag​(CompoundTag tag)
      Specified by:
      writeCustomDataToTag in class Entity
    • readCustomDataFromTag

      public void readCustomDataFromTag​(CompoundTag tag)
      Specified by:
      readCustomDataFromTag in class Entity
    • getBrightnessAtEyes

      public float getBrightnessAtEyes()
      Overrides:
      getBrightnessAtEyes in class Entity
    • isAttackable

      public boolean isAttackable()
      Overrides:
      isAttackable in class Entity
    • createSpawnPacket

      public Packet<?> createSpawnPacket()
      Specified by:
      createSpawnPacket in class Entity