Package net.minestom.server.entity
Class PlayerProjectile
java.lang.Object
net.minestom.server.entity.Entity
net.minestom.server.entity.LivingEntity
net.minestom.server.entity.PlayerProjectile
- All Implemented Interfaces:
Sound.Emitter
,HoverEventSource<HoverEvent.ShowEntity>
,Shape
,EventHandler<EntityEvent>
,EquipmentHandler
,PermissionHandler
,Snapshotable
,Taggable
,TagReadable
,TagWritable
,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.LivingEntity
canPickupItem, expandedBoundingBox, invulnerable, isDead, itemPickupCooldown, lastDamage
Fields inherited from class net.minestom.server.entity.Entity
boundingBox, currentChunk, entityMeta, entityType, gravityTickCount, hasCollision, hasPhysics, instance, lastSyncedPosition, lastVelocityWasZero, metadata, onGround, position, previousPosition, removed, trackingUpdate, uuid, vehicle, velocity, viewEngine, viewers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
refreshPosition
(@NotNull Pos newPosition) setInstance
(@NotNull Instance instance, @NotNull Pos spawnPosition) Changes the entity instance, i.e.void
void
void
tick
(long time) Updates the entity, called every tick.Methods inherited from class net.minestom.server.entity.LivingEntity
canPickupItem, damage, damage, getArrowCount, getAttribute, getAttributeValue, getBoots, getChestplate, getFireDamagePeriod, getHealth, getHelmet, getItemInMainHand, getItemInOffHand, getLastDamageSource, getLeggings, getLivingEntityMeta, getMaxHealth, getPropertiesPacket, getTargetBlockPosition, getTeam, heal, isDead, isFlyingWithElytra, isImmune, isInvulnerable, kill, onAttributeChanged, refreshActiveHand, refreshIsDead, setArrowCount, setBoots, setBoundingBox, setCanPickupItem, setChestplate, setFireDamagePeriod, setFireDamagePeriod, setFireForDuration, setFireForDuration, setFireForDuration, setFlyingWithElytra, setHealth, setHelmet, setInvulnerable, setItemInMainHand, setItemInOffHand, setLeggings, setTeam, swingMainHand, swingOffHand, takeKnockback, update, updateNewViewer
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, getEntity, getEntity, getEntityId, getEntityMeta, getEntityType, getEyeHeight, getGravityTickCount, getInstance, getLeashedEntities, getLeashHolder, getLineOfSight, getLineOfSightEntity, getMetadataPacket, getPassengers, getPassengersPacket, getPose, getPosition, getPreviousPosition, getSynchronizationTicks, getUuid, getVehicle, getVelocity, getVelocityForPacket, getVelocityPacket, getViewers, hasCollision, hasEffect, hasLineOfSight, hasLineOfSight, hasNoGravity, hasPassenger, hasPredictableViewers, hasVelocity, intersectBox, intersectBoxSwept, isActive, isAutoViewable, isCustomNameVisible, isGlowing, isInvisible, isOccluded, isOnFire, isOnGround, isRemoved, isSilent, isSneaking, isSprinting, lookAt, lookAt, movementTick, refreshCoordinate, refreshCurrentChunk, refreshPosition, refreshPosition, relativeEnd, relativeStart, remove, remove, removeEffect, removePassenger, removeViewer, scheduleNextTick, scheduler, scheduleRemove, scheduleRemove, setAerodynamics, setAutoViewable, setAutoViewEntities, setBoundingBox, setCustomName, setCustomNameVisible, setGlowing, setInstance, setInstance, setInvisible, setLeashHolder, setNoGravity, setOnFire, setPose, setSilent, setSneaking, setSprinting, setSynchronizationTicks, setUuid, setVelocity, setView, spawn, switchEntityType, synchronizeNextTick, synchronizePosition, tagHandler, teleport, teleport, triggerStatus, 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.minestom.server.inventory.EquipmentHandler
getEquipment, getEquipmentsPacket, getItemInHand, hasEquipment, setEquipment, setItemInHand, syncEquipment
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.Viewable
getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Constructor Details
-
PlayerProjectile
-
-
Method Details
-
shoot
-
setInstance
public CompletableFuture<Void> setInstance(@NotNull @NotNull Instance instance, @NotNull @NotNull Pos spawnPosition) Description copied from class:Entity
Changes the entity instance, i.e. spawns it.- Overrides:
setInstance
in classEntity
- Parameters:
instance
- the new instance of the entityspawnPosition
- the spawn position for the entity.- Returns:
- a
CompletableFuture
called once the entity's instance has been set, this is due to chunks needing to load
-
shoot
-
refreshPosition
- Overrides:
refreshPosition
in classEntity
-
tick
public void tick(long time) Description copied from class:Entity
Updates the entity, called every tick.Ignored if
Entity.getInstance()
returns null.
-