Package net.minecraft.core
Class Holder.Reference<T>
java.lang.Object
net.minecraft.core.Holder.Reference<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_) boolean
<A> A
getData
(DataMapType<T, A> type) Returns the data of the given type that is attached to this object, ornull
if one isn't.int
hashCode()
boolean
is
(Predicate<ResourceKey<T>> p_205772_) boolean
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, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.Holder
getDelegate, getRegisteredName
-
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
-
is
-
canSerializeIn
- Specified by:
canSerializeIn
in interfaceHolder<T>
-
unwrap
-
unwrapKey
-
kind
-
isBound
public boolean isBound() -
bindKey
-
bindValue
-
getData
Description copied from interface:IWithData
Returns the data of the given type that is attached to this object, ornull
if one isn't. -
bindTags
-
tags
-
toString
-
hashCode
public int hashCode() -
equals
-