Package org.geysermc.geyser.entity.type
Class ThrowableItemEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.ThrowableEntity
org.geysermc.geyser.entity.type.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.geyser.entity.type.ThrowableEntity
lastJavaPosition -
Constructor Summary
ConstructorsConstructorDescriptionThrowableItemEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsetInvisible(boolean value)Set a boolean - whether the entity is invisible or visiblevoidsetItem(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack,?> entityMetadata)voidtick()Updates the position for the Bedrock client.Methods inherited from class org.geysermc.geyser.entity.type.ThrowableEntity
despawnEntity, getDrag, getGravity, isInWater, moveAbsolute, moveAbsoluteImmediate, moveRelativeMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, as, getBedrockRotation, getFlag, getMaxAir, initializeMetadata, is, isShaking, moveAbsolute, moveRelative, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setDimensions, setDisplayName, setDisplayNameVisible, setFlag, setFlags, setFreezing, setGravity, setPose, setRiderSeatPosition, spawnEntity, teleport, updateBedrockMetadata, updateHeadLookRotation, updateMountOffset, updatePassengerOffsets, updatePositionAndRotation, updateRotation
-
Constructor Details
-
ThrowableItemEntity
public ThrowableItemEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
-
-
Method Details
-
tick
public void 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
protected void setInvisible(boolean value)Description copied from class:EntitySet a boolean - whether the entity is invisible or visible- Overrides:
setInvisiblein classEntity- Parameters:
value- true if the entity is invisible
-
setItem
public void setItem(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack,?> entityMetadata)
-