Package net.minecraft.core
Record Class Holder.Direct<T>
java.lang.Object
java.lang.Record
net.minecraft.core.Holder.Direct<T>
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.core.HolderHolder.Direct<T>, Holder.Kind, Holder.Reference<T>
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanSerializeIn(HolderOwner<T> p_256328_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanis(Predicate<ResourceKey<T>> p_205723_) booleanis(ResourceKey<T> p_205725_) booleanis(ResourceLocation p_205727_) booleanbooleanisBound()kind()tags()toString()Returns a string representation of this record class.com.mojang.datafixers.util.Either<ResourceKey<T>,T> unwrap()value()Returns the value of thevaluerecord component.
- 
Field Details- 
valueThe field for thevaluerecord component.
 
- 
- 
Constructor Details- 
DirectCreates an instance of aDirectrecord class.- Parameters:
- value- the value for the- valuerecord component
 
 
- 
- 
Method Details- 
isBoundpublic boolean isBound()
- 
is
- 
is
- 
is
- 
is
- 
unwrap
- 
unwrapKey
- 
kind
- 
toStringReturns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
- 
canSerializeIn- Specified by:
- canSerializeInin interface- Holder<T>
 
- 
tags
- 
hashCodepublic final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
equalsIndicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
- 
valueReturns the value of thevaluerecord component.
 
-