Package net.minestom.server.entity
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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minestom.server.entity.Entity
Entity.Pose
-
Field Summary
Fields inherited from class net.minestom.server.entity.Entity
boundingBox, collidesWithEntities, currentChunk, entityMeta, entityType, gravityTickCount, hasPhysics, instance, lastSyncedPosition, lastVelocityWasZero, metadata, onGround, position, preventBlockPlacement, previousPosition, removed, trackingUpdate, vehicle, velocity, viewEngine, viewers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Acquirable
<? extends ExperienceOrb> Obtains anAcquirable
.short
Gets the experience count.void
setExperienceCount
(short experienceCount) Changes the experience count.void
spawn()
Called when a new instance is set.void
update
(long time) Called each tick.Methods inherited from class net.minestom.server.entity.Entity
addEffect, addPassenger, addViewer, asHoverEvent, autoViewEntities, clearEffects, despawn, editEntityMeta, eventNode, generateId, getAcquirable, getActiveEffects, getAerodynamics, getAliveTicks, getAllPermissions, getAttachEntityPacket, getBoundingBox, getChunk, getCustomName, getDistance, getDistance, getDistanceSquared, getDistanceSquared, getEffect, getEffectLevel, getEntityId, getEntityMeta, getEntityType, getEyeHeight, getGravityTickCount, getInstance, getLeashedEntities, getLeashHolder, getLineOfSight, getLineOfSightEntity, getMetadataPacket, getPassengers, getPassengersPacket, getPose, getPosition, getPreviousPosition, getSynchronizationTicks, getUuid, getVehicle, getVelocity, getVelocityForPacket, getVelocityPacket, getViewers, hasEffect, hasEntityCollision, hasLineOfSight, hasLineOfSight, hasNoGravity, hasPassenger, hasPredictableViewers, hasVelocity, intersectBox, intersectBoxSwept, isActive, isAutoViewable, isCustomNameVisible, isGlowing, isInvisible, isOccluded, isOnFire, isOnGround, isRemoved, isSilent, isSneaking, isSprinting, lookAt, lookAt, movementTick, preventBlockPlacement, refreshCoordinate, refreshCurrentChunk, refreshPosition, refreshPosition, refreshPosition, relativeEnd, relativeStart, remove, remove, removeEffect, removePassenger, removeViewer, scheduleNextTick, scheduler, scheduleRemove, scheduleRemove, setAerodynamics, setAutoViewable, setAutoViewEntities, setBoundingBox, setBoundingBox, setCustomName, setCustomNameVisible, setGlowing, setInstance, setInstance, setInstance, setInvisible, setLeashHolder, setNoGravity, setPose, setSilent, setSneaking, setSprinting, setSynchronizationTicks, setVelocity, setView, switchEntityType, synchronizeNextTick, synchronizePosition, tagHandler, takeKnockback, teleport, teleport, teleport, tick, triggerStatus, updateCollisions, updateNewViewer, updateOldViewer, updatePose, updateSnapshot, updateViewableRule, updateViewableRule, updateViewerRule, updateViewerRule
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.kyori.adventure.text.event.HoverEventSource
asHoverEvent
Methods inherited from interface net.minestom.server.permission.PermissionHandler
addPermission, getPermission, hasPermission, hasPermission, hasPermission, removePermission, removePermission
Methods inherited from interface net.minestom.server.collision.Shape
intersectEntity, isFaceFull
Methods inherited from interface net.minestom.server.tag.Taggable
getAndSetTag, getAndUpdateTag, getTag, hasTag, removeTag, setTag, updateAndGetTag, updateTag
Methods inherited from interface net.minestom.server.Viewable
getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Constructor Details
-
ExperienceOrb
public ExperienceOrb(short experienceCount)
-
-
Method Details
-
update
public void update(long time) Description copied from class:Entity
Called each tick. -
spawn
public void spawn()Description copied from class:Entity
Called when a new instance is set. -
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:AcquirableSource
Obtains anAcquirable
. To safely perform operations on this object, the user must callAcquirable.sync(Consumer)
,Acquirable.async(Consumer)
, orAcquirable.lock()
(followed by a subsequent unlock) on the Acquirable instance.- Specified by:
acquirable
in interfaceAcquirableSource<Entity>
- Overrides:
acquirable
in classEntity
- Returns:
- an Acquirable which can be used to synchronize access to this object
-