Class ItemFrameEntity

java.lang.Object
org.geysermc.connector.entity.Entity
org.geysermc.connector.entity.ItemFrameEntity

public class ItemFrameEntity extends Entity
Item frames are an entity in Java but a block entity in Bedrock.
  • 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

      public void spawnEntity(GeyserSession session)
      Overrides:
      spawnEntity in class Entity
    • updateBedrockMetadata

      public void updateBedrockMetadata(com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadata entityMetadata, GeyserSession session)
      Description copied from class: Entity
      Applies the Java metadata to the local Bedrock metadata copy
      Overrides:
      updateBedrockMetadata in class Entity
      Parameters:
      entityMetadata - the Java entity metadata
      session - GeyserSession
    • despawnEntity

      public boolean despawnEntity(GeyserSession session)
      Description copied from class: Entity
      Despawns the entity
      Overrides:
      despawnEntity in class Entity
      Parameters:
      session - The GeyserSession
      Returns:
      can be deleted
    • updateBlock

      public void updateBlock(GeyserSession session)
      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.