Interface RegisteredResource<T>
- Type Parameters:
T- The type of the backing registry entry.
- All Superinterfaces:
Resource
- All Known Subinterfaces:
DataComponentHolderResource<T>
- All Known Implementing Classes:
FluidResource,ItemResource
Helper interface for resources backed by a registry entry.
-
Method Summary
Modifier and TypeMethodDescriptionReturns The registered holder of the backing resource.default booleandefault booleandefault booleandefault booleandefault booleanvalue()Returns the backing instance of the resource.
-
Method Details
-
value
T value()Returns the backing instance of the resource.- Returns:
- the backing instance of the resource
-
getHolder
Returns The registered holder of the backing resource.- Returns:
- The registered holder of the backing resource
-
is
- Parameters:
tag- Tag to check- Returns:
trueif the holder fromgetHolder()is in the specified tag
-
is
- Parameters:
instance- the instance to compare- Returns:
trueif an exact equality comparison ('==') between the instance provided and the value fromvalue()istrue
-
is
- Parameters:
predicate- The predicate to perform the test.- Returns:
trueif the predicate's test returnstruefor the holder fromgetHolder().
-
is
- Parameters:
holder- the holder to check- Returns:
trueif the holder's value is the instance value fromvalue()
-
is
- Parameters:
holders- Set of holders to check- Returns:
trueif the holder set contains the holder provided fromgetHolder()
-