Package org.geysermc.geyser.entity.type
Class ItemEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.ProjectileEntity
org.geysermc.geyser.entity.type.ItemEntity
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity,Tickable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.cloudburstmc.protocol.bedrock.data.inventory.ItemDataFields inherited from class org.geysermc.geyser.entity.type.ProjectileEntity
lastJavaPositionFields inherited from class org.geysermc.geyser.entity.type.Entity
customName, customNameVisible, definition, dirtyMetadata, entityId, flags, geyserId, headYaw, motion, nametag, offset, onGround, passengers, pitch, position, propertyManager, session, silent, uuid, valid, vehicle, yaw -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected floatgetDrag()protected floatGet the gravity of this entity type.protected booleanprotected voidmoveAbsoluteImmediate(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) voidsetItem(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack, ?> entityMetadata) voidvoidtick()Updates the position for the Bedrock client.Methods inherited from class org.geysermc.geyser.entity.type.ProjectileEntity
despawnEntity, moveAbsoluteRaw, moveRelativeRaw, removedInVoidMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, bedrockPosition, bedrockRotation, doesJumpDismount, getBoundingBoxHeight, getBoundingBoxWidth, getDefinition, getDirtyMetadata, getDisplayName, getEntityId, getFlag, getHeadYaw, getMaxAir, getMotion, getNametag, getOffset, getPassengers, getPitch, getPosition, getPropertyManager, getSession, getVehicle, getYaw, geyserId, hasLeashesToDrop, initializeMetadata, interact, interactAt, isAlive, isCustomNameVisible, isOnGround, isShaking, isSilent, isValid, javaId, moveAbsolute, moveAbsolute, moveRelative, playEntityEvent, playEntityEvent, position, scoreVisibility, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setClientSideSilent, setCustomName, setCustomNameVisible, setDefinition, setDimensionsFromPose, setEntityId, setFlag, setFlags, setFlagsDirty, setFreezing, setGliding, setGravity, setHeadYaw, setInvisible, setMotion, setNameEntityData, setNametag, setNametagAlwaysShow, setOffset, setOnGround, setPassengers, setPitch, setPose, setPosition, setRiderSeatPosition, setSilent, setSneaking, setSprinting, setValid, setVehicle, setYaw, standardDisplayName, teamIdentifier, teleport, testInteraction, updateBedrockEntityProperties, updateBedrockMetadata, updateHeadLookRotation, updateInteractiveTag, updateMountOffset, updateNametag, updateNametag, updatePassengerOffsets, updatePositionAndRotation, updatePropertiesBatched, updateRotation, uuid, uuidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.entity.type.GeyserEntity
updatePropertiesBatched, updateProperty
-
Field Details
-
item
protected org.cloudburstmc.protocol.bedrock.data.inventory.ItemData item
-
-
Constructor Details
-
ItemEntity
-
-
Method Details
-
spawnEntity
public void spawnEntity()- Overrides:
spawnEntityin classEntity
-
tick
public void tick()Description copied from class:ProjectileEntityUpdates 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 classProjectileEntity
-
setItem
public void setItem(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata<org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack, ?> entityMetadata) -
moveAbsoluteImmediate
protected void moveAbsoluteImmediate(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported) - Overrides:
moveAbsoluteImmediatein classProjectileEntity
-
getGravity
protected float getGravity()Description copied from class:ProjectileEntityGet the gravity of this entity type. Used for applying gravity while the entity is in motion.- Overrides:
getGravityin classProjectileEntity- Returns:
- the amount of gravity to apply to this entity while in motion.
-
getDrag
protected float getDrag()- Overrides:
getDragin classProjectileEntity- Returns:
- the drag that should be multiplied to the entity's motion
-
isInWater
protected boolean isInWater()- Overrides:
isInWaterin classProjectileEntity- Returns:
- true if this entity is currently in water.
-