Package org.geysermc.connector.entity
Class ItemFrameEntity
java.lang.Object
org.geysermc.connector.entity.Entity
org.geysermc.connector.entity.ItemFrameEntity
Item frames are an entity in Java but a block entity in Bedrock.
-
Field Summary
Fields inherited from class org.geysermc.connector.entity.Entity
entityId, entityType, geyserId, metadata, motion, onGround, passengers, position, valid -
Constructor Summary
ConstructorsConstructorDescriptionItemFrameEntity(long entityId, long geyserId, EntityType entityType, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, com.nukkitx.math.vector.Vector3f rotation, com.github.steveice10.mc.protocol.data.game.entity.object.HangingDirection direction) -
Method Summary
Modifier and TypeMethodDescriptionbooleandespawnEntity(GeyserSession session)Despawns the entitystatic ItemFrameEntitygetItemFrameEntity(GeyserSession session, com.nukkitx.math.vector.Vector3i position)Finds the Java entity ID of an item frame from its Bedrock position.voidspawnEntity(GeyserSession session)voidupdateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata, GeyserSession session)Applies the Java metadata to the local Bedrock metadata copyvoidupdateBlock(GeyserSession session)Updates the item frame as a blockMethods inherited from class org.geysermc.connector.entity.Entity
addAdditionalSpawnData, as, getBedrockRotation, getMaxAir, is, isShaking, moveAbsolute, moveAbsolute, moveRelative, moveRelative, setAir, setDimensions, setDisplayName, setFreezing, setInvisible, teleport, updateBedrockMetadata, updateHeadLookRotation, updatePositionAndRotation, updateRotation
-
Constructor Details
-
ItemFrameEntity
public ItemFrameEntity(long entityId, long geyserId, EntityType entityType, com.nukkitx.math.vector.Vector3f position, com.nukkitx.math.vector.Vector3f motion, com.nukkitx.math.vector.Vector3f rotation, com.github.steveice10.mc.protocol.data.game.entity.object.HangingDirection direction)
-
-
Method Details
-
spawnEntity
- Overrides:
spawnEntityin classEntity
-
updateBedrockMetadata
public void updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata, GeyserSession session)Description copied from class:EntityApplies the Java metadata to the local Bedrock metadata copy- Overrides:
updateBedrockMetadatain classEntity- Parameters:
entityMetadata- the Java entity metadatasession- GeyserSession
-
despawnEntity
Description copied from class:EntityDespawns the entity- Overrides:
despawnEntityin classEntity- Parameters:
session- The GeyserSession- Returns:
- can be deleted
-
updateBlock
Updates the item frame as a block- Parameters:
session- GeyserSession.
-
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- GeyserSession.- Returns:
- Java entity ID or -1 if not found.
-