Interface IHolderExtension<T>
- All Superinterfaces:
IWithData<T>
- All Known Subinterfaces:
Holder<T>
- All Known Implementing Classes:
DeferredBlock
,DeferredBlockBuilder
,DeferredEntityTypeBuilder
,DeferredHolder
,DeferredItem
,DeferredItemBuilder
,Holder.Direct
,Holder.Reference
,RegistrySetBuilder.LazyHolder
Extension for
Holder
-
Method Summary
Modifier and TypeMethodDescriptionReturns the holder that this holder wraps.default HolderLookup.RegistryLookup
<T> Attempts to resolve the underlyingHolderLookup.RegistryLookup
from aHolder
.
-
Method Details
-
getDelegate
Returns the holder that this holder wraps. Used byRegistry.safeCastToReference(net.minecraft.core.Holder<T>)
to resolve the underlyingHolder.Reference
for delegating holders.- Returns:
- the holder that this holder wraps
-
unwrapLookup
Attempts to resolve the underlyingHolderLookup.RegistryLookup
from aHolder
.This will only succeed if the underlying holder is a
Holder.Reference
.
-