Package net.minecraft.core
Record Class Holder.Direct<T>
java.lang.Object
java.lang.Record
net.minecraft.core.Holder.Direct<T>
- All Implemented Interfaces:
Supplier<T>
,Holder<T>
,IReverseTag<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.Holder
Holder.Direct<T>, Holder.Kind, Holder.Reference<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canSerializeIn
(HolderOwner<T> p_256328_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
is
(Predicate<ResourceKey<T>> p_205723_) boolean
is
(ResourceKey<T> p_205725_) boolean
is
(ResourceLocation p_205727_) boolean
boolean
isBound()
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 thevalue
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
value
The field for thevalue
record component.
-
-
Constructor Details
-
Direct
Creates an instance of aDirect
record class.- Parameters:
value
- the value for thevalue
record 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:
canSerializeIn
in interfaceHolder<T>
-
tags
-
value
Returns the value of thevalue
record component. -
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)
.
-