Package org.geysermc.geyser.entity.type
Class ItemFrameEntity
java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.ItemFrameEntity
Item frames are an entity in Java but a block entity in Bedrock.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionItemFrameEntity(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, com.github.steveice10.mc.protocol.data.game.entity.object.Direction direction) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDespawns the entitystatic ItemFrameEntitygetItemFrameEntity(GeyserSession session, com.nukkitx.math.vector.Vector3i position)Finds the Java entity ID of an item frame from its Bedrock position.protected voidCalled on entity spawn.voidsetItemInFrame(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack,?> entityMetadata)voidsetItemRotation(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)voidvoidSends the Bedrock metadata to the clientvoidupdateBlock(boolean force)Updates the item frame as a blockMethods inherited from class org.geysermc.geyser.entity.type.Entity
addAdditionalSpawnData, as, getBedrockRotation, getFlag, getMaxAir, is, isShaking, moveAbsolute, moveAbsolute, moveRelative, moveRelative, setAir, setAirSupply, setBoundingBoxHeight, setBoundingBoxWidth, setDimensions, setDisplayName, setDisplayNameVisible, setFlag, setFlags, setFreezing, setGravity, setInvisible, setPose, setRiderSeatPosition, teleport, updateHeadLookRotation, updateMountOffset, updatePassengerOffsets, updatePositionAndRotation, updateRotation
-
Constructor Details
-
ItemFrameEntity
public ItemFrameEntity(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, com.github.steveice10.mc.protocol.data.game.entity.object.Direction direction)
-
-
Method Details
-
initializeMetadata
protected void initializeMetadata()Description copied from class:EntityCalled on entity spawn. Used to populate the entity metadata and flags with default values.- Overrides:
initializeMetadatain classEntity
-
spawnEntity
public void spawnEntity()- Overrides:
spawnEntityin classEntity
-
setItemInFrame
public void setItemInFrame(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata<com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack,?> entityMetadata) -
setItemRotation
public void setItemRotation(com.github.steveice10.mc.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata) -
despawnEntity
public boolean despawnEntity()Description copied from class:EntityDespawns the entity- Overrides:
despawnEntityin classEntity- Returns:
- can be deleted
-
updateBedrockMetadata
public void updateBedrockMetadata()Description copied from class:EntitySends the Bedrock metadata to the client- Overrides:
updateBedrockMetadatain classEntity
-
updateBlock
public void updateBlock(boolean force)Updates the item frame as a block -
getItemFrameEntity
public static ItemFrameEntity getItemFrameEntity(GeyserSession session, com.nukkitx.math.vector.Vector3i position)Finds the Java entity ID of an item frame from its Bedrock position.- Parameters:
position- position of item frame in Bedrock.session- GeyserConnection.- Returns:
- Java entity ID or -1 if not found.
-