Interface EntityRewriter<T extends Protocol>

    • Method Detail

      • typeFromId

        EntityType typeFromId​(int type)
        Returns the entity type from the given (mapped) type id.
        Parameters:
        type - mapped type id
        Returns:
        entity type
      • objectTypeFromId

        default EntityType objectTypeFromId​(int type)
        Returns the entity type from the given id. From 1.14 and onwards, this is the same exact value as typeFromId(int).
        Parameters:
        type - entity type id
        Returns:
        EntityType from id
      • newEntityId

        int newEntityId​(int id)
        Returns the mapped entitiy (or the same if it has not changed).
        Parameters:
        id - unmapped entity id
        Returns:
        mapped entity id
      • handleMetadata

        void handleMetadata​(int entityId,
                            java.util.List<Metadata> metadataList,
                            UserConnection connection)
        Handles and transforms metadata of an entity.
        Parameters:
        entityId - entity id
        metadataList - full, mutable list of metadata
        connection - user connection
      • tracker

        default <E extends EntityTracker> E tracker​(UserConnection connection)
        Returns the entity tracker for the current protocol.
        Type Parameters:
        E - entity tracker type
        Parameters:
        connection - user connection
        Returns:
        entity tracker