Class EntityUtils

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

public final class EntityUtils extends Object
  • Method Details

    • getAllPotionIdentifiers

      public static String[] getAllPotionIdentifiers()
      Returns:
      a new String array of all known potion identifiers
    • 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.