Class ExperienceOrb

java.lang.Object
net.minestom.server.entity.Entity
net.minestom.server.entity.ExperienceOrb
All Implemented Interfaces:
Sound.Emitter, HoverEventSource<HoverEvent.ShowEntity>, Shape, EventHandler<EntityEvent>, PermissionHandler, Snapshotable, Taggable, TagReadable, TagWritable, AcquirableSource<Entity>, Tickable, Schedulable, Viewable

public class ExperienceOrb extends Entity
  • Constructor Details

    • ExperienceOrb

      public ExperienceOrb(short experienceCount)
  • Method Details

    • update

      public void update(long time)
      Description copied from class: Entity
      Called each tick.
      Overrides:
      update in class Entity
      Parameters:
      time - time of the update in milliseconds
    • spawn

      public void spawn()
      Description copied from class: Entity
      Called when a new instance is set.
      Overrides:
      spawn in class Entity
    • getExperienceCount

      public short getExperienceCount()
      Gets the experience count.
      Returns:
      the experience count
    • setExperienceCount

      public void setExperienceCount(short experienceCount)
      Changes the experience count.
      Parameters:
      experienceCount - the new experience count
    • acquirable

      @Experimental @NotNull public @NotNull Acquirable<? extends ExperienceOrb> acquirable()
      Description copied from interface: AcquirableSource
      Obtains an Acquirable. To safely perform operations on this object, the user must call Acquirable.sync(Consumer), Acquirable.async(Consumer), or Acquirable.lock() (followed by a subsequent unlock) on the Acquirable instance.
      Specified by:
      acquirable in interface AcquirableSource<Entity>
      Overrides:
      acquirable in class Entity
      Returns:
      an Acquirable which can be used to synchronize access to this object