Interface EntityRewriter<T extends Protocol<?,?,?,?>>

All Superinterfaces:
MappingDataListener, Rewriter<T>

public interface EntityRewriter<T extends Protocol<?,?,?,?>> extends Rewriter<T>
  • Method Details

    • 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 entity (or the same if it has not changed).
      Parameters:
      id - unmapped entity id
      Returns:
      mapped entity id
    • handleEntityData

      void handleEntityData(int entityId, List<EntityData> 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