Package org.geysermc.connector.utils
Class EntityUtils
java.lang.Object
org.geysermc.connector.utils.EntityUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic inttoBedrockEffectId(com.github.steveice10.mc.protocol.data.game.entity.Effect effect)Convert Java edition effect IDs to Bedrock editionstatic EntityTypetoBedrockEntity(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 foundstatic voidupdateMountOffset(Entity passenger, Entity mount, GeyserSession session, boolean rider, boolean riding, boolean moreThanOneEntity)Adjust an entity's height if they have mounted/dismounted an entity.
-
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.
-