Package net.minecraft.core
Class Holder.Reference<T>
java.lang.Object
net.minecraft.core.Holder.Reference<T>
- All Implemented Interfaces:
Supplier<T>
,Holder<T>
,IReverseTag<T>
- Direct Known Subclasses:
RegistrySetBuilder.LazyHolder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.Holder
Holder.Direct<T>, Holder.Kind, Holder.Reference<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate ResourceKey<T>
private final HolderOwner<T>
private final Holder.Reference.Type
private T
-
Constructor Summary
ModifierConstructorDescriptionprotected
Reference
(Holder.Reference.Type p_256425_, HolderOwner<T> p_256562_, ResourceKey<T> p_256636_, T p_255889_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
bindKey
(ResourceKey<T> p_251943_) void
bindTags
(Collection<TagKey<T>> p_205770_) void
boolean
canSerializeIn
(HolderOwner<T> p_256521_) static <T> Holder.Reference<T>
createIntrusive
(HolderOwner<T> p_256106_, T p_255948_) Deprecated.static <T> Holder.Reference<T>
createStandAlone
(HolderOwner<T> p_255955_, ResourceKey<T> p_255958_) getType()
boolean
is
(Predicate<ResourceKey<T>> p_205772_) boolean
is
(ResourceKey<T> p_205774_) boolean
is
(ResourceLocation p_205779_) boolean
boolean
isBound()
key()
kind()
tags()
toString()
com.mojang.datafixers.util.Either<ResourceKey<T>,
T> unwrap()
value()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.Holder
containsTag, get, getTagKeys
Methods inherited from interface net.minecraftforge.registries.tags.IReverseTag
containsTag
-
Field Details
-
owner
-
tags
-
type
-
key
-
value
-
-
Constructor Details
-
Reference
protected Reference(Holder.Reference.Type p_256425_, HolderOwner<T> p_256562_, @Nullable ResourceKey<T> p_256636_, @Nullable T p_255889_)
-
-
Method Details
-
createStandAlone
public static <T> Holder.Reference<T> createStandAlone(HolderOwner<T> p_255955_, ResourceKey<T> p_255958_) -
createIntrusive
@Deprecated public static <T> Holder.Reference<T> createIntrusive(HolderOwner<T> p_256106_, @Nullable T p_255948_) Deprecated. -
key
-
value
-
is
-
is
-
is
-
is
-
canSerializeIn
- Specified by:
canSerializeIn
in interfaceHolder<T>
-
unwrap
-
unwrapKey
-
kind
-
isBound
public boolean isBound() -
bindKey
-
bindValue
-
bindTags
-
tags
-
getType
-
toString
-