Interface DetailProvider<T>

Type Parameters:
T - The type of object that this provider can provide details for.
All Known Implementing Classes:
BasicItemDetailProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DetailProvider<T>
Provide details about a block, fluid, or item.

When implementing this interface, be careful to only expose information the player can see through normal gameplay. Computers shouldn't break progression or mechanics of other mods.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    provideDetails(Map<? super String,Object> data, T object)
    Provide additional details for the given object.
  • Method Details

    • provideDetails

      void provideDetails(Map<? super String,Object> data, T object)
      Provide additional details for the given object. This method is called by functions such as turtle.getItemDetail() and turtle.inspect(). New properties should be added to the given Map, data.

      This method is always called on the server thread, so it is safe to interact with the world here, but you should take care to avoid long blocking operations as this will stall the server and other computers.

      Parameters:
      data - The full details to be returned. New properties should be added to this map.
      object - The object to provide details for.