Interface DetailRegistry<T>

Type Parameters:
T - The type of object that this registry provides details for.

@NonExtendable public interface DetailRegistry<T>
A registry which provides computer-visible detail about in-game objects such as blocks, items or fluids.

These are used by computer methods such as turtle.getItemDetail() or turtle.inspect().

Specific instances of this registry are available from VanillaDetailRegistries and loader-specific versions also in this package.

  • Method Details

    • addProvider

      void addProvider(DetailProvider<T> provider)
      Registers a detail provider.
      Parameters:
      provider - The detail provider to register.
      See Also:
    • getBasicDetails

      Map<String,Object> getBasicDetails(T object)
      Compute basic details about an object. This is cheaper than computing all details operation, and so is suitable for when you need to compute the details for a large number of values.

      This method MAY be thread safe: consult the instance's documentation for details.

      Parameters:
      object - The object to get details for.
      Returns:
      The basic details.
    • getDetails

      Map<String,Object> getDetails(T object)
      Compute all details about an object, using getBasicDetails(Object) and any registered providers.

      This method is NOT thread safe. It should only be called from the computer thread.

      Parameters:
      object - The object to get details for.
      Returns:
      The computed details.