接口 IHolderExtension<T>
- 所有超级接口:
IWithData<T>
- 所有已知子接口:
Holder<T>
- 所有已知实现类:
DeferredBlock
,DeferredBlockBuilder
,DeferredEntityTypeBuilder
,DeferredHolder
,DeferredItem
,DeferredItemBuilder
,Holder.Direct
,Holder.Reference
,RegistrySetBuilder.LazyHolder
Extension for
Holder
-
方法概要
修饰符和类型方法说明返回 the holder that this holder wraps。default @Nullable ResourceKey
<T> getKey()
Get the resource key held by this Holder, or null if none is present.default HolderLookup.RegistryLookup
<T> Attempts to resolve the underlyingHolderLookup.RegistryLookup
from aHolder
.
-
方法详细资料
-
getDelegate
返回 the holder that this holder wraps。 Used byRegistry.safeCastToReference(net.minecraft.core.Holder<T>)
to resolve the underlyingHolder.Reference
for delegating holders.- 返回:
- 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
. -
getKey
Get the resource key held by this Holder, or null if none is present. This method will be overriden by Holder implementations to avoid allocation associated withHolder.unwrapKey()
-