Package net.minecraft.core
Record Class Holder.Direct<T>
java.lang.Object
java.lang.Record
net.minecraft.core.Holder.Direct<T>
- All Implemented Interfaces:
Holder<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.Holder
Holder.Direct<T>, Holder.Kind, Holder.Reference<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier 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
-
value
The field for thevaluerecord component.
-
-
Constructor Details
-
Direct
Creates an instance of aDirectrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
isBound
public boolean isBound() -
is
-
is
-
is
-
is
-
unwrap
-
unwrapKey
-
kind
-
toString
Returns 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 interfaceHolder<T>
-
tags
-
hashCode
public 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. -
equals
Indicates 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). -
value
Returns the value of thevaluerecord component.
-