Class ExperienceOrb
java.lang.Object
net.minestom.server.entity.Entity
net.minestom.server.entity.ExperienceOrb
- All Implemented Interfaces:
Identified, Pointered, Sound.Emitter, HoverEventSource<HoverEvent.ShowEntity>, Shape, DataComponent.Holder, EventHandler<EntityEvent>, Snapshotable, Taggable, TagReadable, TagWritable, AcquirableSource<Entity>, Tickable, Schedulable, Viewable
-
Field Summary
Fields inherited from class Entity
boundingBox, collidesWithEntities, currentChunk, ENTITY_POINTERS_SUPPLIER, entityMeta, entityType, gravityTickCount, hasPhysics, headRotation, instance, lastSyncedPosition, lastVelocityWasZero, metadata, onGround, position, preventBlockPlacement, previousPosition, removed, trackingUpdate, vehicle, velocity, viewEngine, viewers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAcquirable<? extends ExperienceOrb> Obtains anAcquirable.shortGets the experience count.voidsetExperienceCount(short experienceCount) Changes the experience count.voidspawn()Called when a new instance is set.voidupdate(long time) Called each tick.Methods inherited from class Entity
addEffect, addPassenger, addViewer, asHoverEvent, autoViewEntities, clearEffects, despawn, editEntityMeta, eventNode, generateId, get, getAcquirable, getActiveEffects, getAerodynamics, getAliveTicks, getAttachEntityPacket, getBoundingBox, getChunk, getCustomName, getDistance, getDistance, getDistanceSquared, getDistanceSquared, getEffect, getEffectLevel, getEntityId, getEntityMeta, getEntityType, getEyeHeight, getGravityTickCount, getHeadRotation, getInstance, getLeashedEntities, getLeashHolder, getLineOfSight, getLineOfSightEntity, getMetadataPacket, getPassengers, getPassengersPacket, getPose, getPosition, getPreviousPosition, getSpawnPacket, getSynchronizationTicks, getUuid, getVehicle, getVelocity, getVelocityForPacket, getVelocityPacket, getViewers, hasEffect, hasEntityCollision, hasLineOfSight, hasLineOfSight, hasNoGravity, hasPassenger, hasPredictableViewers, hasVelocity, identity, intersectBox, intersectBoxSwept, isActive, isAutoViewable, isCustomNameVisible, isGlowing, isInvisible, isOccluded, isOnFire, isOnGround, isRemoved, isSilent, isSneaking, isSprinting, lookAt, lookAt, movementTick, pointers, preventBlockPlacement, refreshCoordinate, refreshCurrentChunk, refreshPosition, refreshPosition, refreshPosition, relativeEnd, relativeStart, remove, remove, removeEffect, removePassenger, removeViewer, scheduleNextTick, scheduler, scheduleRemove, scheduleRemove, set, setAerodynamics, setAutoViewable, setAutoViewEntities, setBoundingBox, setBoundingBox, setCustomName, setCustomNameVisible, setGlowing, setInstance, setInstance, setInstance, setInvisible, setLeashHolder, setNoGravity, setPose, setPositionInternal, setSilent, setSneaking, setSprinting, setSynchronizationTicks, setVelocity, setView, setView, switchEntityType, synchronizeNextTick, synchronizePosition, tagHandler, takeKnockback, teleport, teleport, teleport, teleport, teleport, teleport, tick, triggerStatus, updateCollisions, updateNewViewer, updateOldViewer, updatePose, updateSnapshot, updateViewableRule, updateViewableRule, updateViewerRule, updateViewerRuleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DataComponent.Holder
get, hasMethods inherited from interface HoverEventSource
asHoverEventMethods inherited from interface Pointered
get, getOrDefault, getOrDefaultFromMethods inherited from interface Shape
intersectEntity, isFaceFullMethods inherited from interface Taggable
getAndSetTag, getAndUpdateTag, getTag, hasTag, removeTag, setTag, updateAndGetTag, updateTagMethods inherited from interface Viewable
getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Constructor Details
-
ExperienceOrb
public ExperienceOrb(short experienceCount)
-
-
Method Details
-
update
-
spawn
-
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
Description copied from interface:AcquirableSourceObtains anAcquirable. To safely perform operations on this object, the user must callAcquirable.sync(Consumer),Acquirable.applySync(Function), orAcquirable.lock()(followed by a subsequent unlock) on the Acquirable instance.- Specified by:
acquirablein interfaceAcquirableSource<Entity>- Overrides:
acquirablein classEntity- Returns:
- an Acquirable which can be used to synchronize access to this object
-