Package org.geysermc.connector.entity
Class ThrowableItemEntity
java.lang.Object
org.geysermc.connector.entity.Entity
org.geysermc.connector.entity.ThrowableEntity
org.geysermc.connector.entity.ThrowableItemEntity
- All Implemented Interfaces:
Tickable
- Direct Known Subclasses:
ThrownPotionEntity
Used as a class for any projectile entity that looks like an item
-
Field Summary
Fields inherited from class org.geysermc.connector.entity.ThrowableEntity
lastJavaPosition -
Constructor Summary
ConstructorsConstructorDescriptionThrowableItemEntity(long entityId, long geyserId, EntityType entityType, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, com.nukkitx.math.vector.Vector3f rotation) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetInvisible(GeyserSession session, boolean value)Set a boolean - whether the entity is invisible or visiblevoidtick(GeyserSession session)Updates the position for the Bedrock client.Methods inherited from class org.geysermc.connector.entity.ThrowableEntity
despawnEntity, getDrag, getGravity, isInWater, moveAbsolute, moveAbsoluteImmediate, moveRelativeMethods inherited from class org.geysermc.connector.entity.Entity
addAdditionalSpawnData, as, getBedrockRotation, getMaxAir, is, isShaking, moveAbsolute, moveRelative, setAir, setDimensions, setDisplayName, setFreezing, spawnEntity, teleport, updateBedrockMetadata, updateBedrockMetadata, updateHeadLookRotation, updatePositionAndRotation, updateRotation
-
Constructor Details
-
ThrowableItemEntity
public ThrowableItemEntity(long entityId, long geyserId, EntityType entityType, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, com.nukkitx.math.vector.Vector3f rotation)
-
-
Method Details
-
tick
Description copied from class:ThrowableEntityUpdates the position for the Bedrock client. Java clients assume the next positions of moving items. Bedrock needs to be explicitly told positions- Specified by:
tickin interfaceTickable- Overrides:
tickin classThrowableEntity
-
setInvisible
Description copied from class:EntitySet a boolean - whether the entity is invisible or visible- Overrides:
setInvisiblein classEntity- Parameters:
session- the Geyser sessionvalue- true if the entity is invisible
-