Package dan200.computercraft.api.detail
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.
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
provideDetails
(Map<? super String, Object> data, T object) Provide additional details for the given object.
-
Method Details
-
provideDetails
Provide additional details for the given object. This method is called by functions such asturtle.getItemDetail()
andturtle.inspect()
. New properties should be added to the givenMap
,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.
-