Class EntityUtils

java.lang.Object
org.geysermc.connector.utils.EntityUtils

public final class EntityUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    toBedrockEffectId​(com.github.steveice10.mc.protocol.data.game.entity.Effect effect)
    Convert Java edition effect IDs to Bedrock edition
    static EntityType
    toBedrockEntity​(com.github.steveice10.mc.protocol.data.game.entity.type.EntityType type)
    Converts a MobType to a Bedrock edition EntityType, returns null if the EntityType is not found
    static void
    updateMountOffset​(Entity passenger, Entity mount, GeyserSession session, boolean rider, boolean riding, boolean moreThanOneEntity)
    Adjust an entity's height if they have mounted/dismounted an entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EntityUtils

      public EntityUtils()
  • Method Details

    • toBedrockEffectId

      public static int toBedrockEffectId(com.github.steveice10.mc.protocol.data.game.entity.Effect effect)
      Convert Java edition effect IDs to Bedrock edition
      Parameters:
      effect - Effect to convert
      Returns:
      The numeric ID for the Bedrock edition effect
    • toBedrockEntity

      public static EntityType toBedrockEntity(com.github.steveice10.mc.protocol.data.game.entity.type.EntityType type)
      Converts a MobType to a Bedrock edition EntityType, returns null if the EntityType is not found
      Parameters:
      type - The MobType to convert
      Returns:
      Converted EntityType
    • updateMountOffset

      public static void updateMountOffset(Entity passenger, Entity mount, GeyserSession session, boolean rider, boolean riding, boolean moreThanOneEntity)
      Adjust an entity's height if they have mounted/dismounted an entity.