Record Class CopyNbtFunction.CopyOperation
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.functions.CopyNbtFunction.CopyOperation
- Enclosing class:
- CopyNbtFunction
static record CopyNbtFunction.CopyOperation(CopyNbtFunction.Path sourcePath, CopyNbtFunction.Path targetPath, CopyNbtFunction.MergeStrategy op)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CopyNbtFunction.CopyOperation>private final CopyNbtFunction.MergeStrategyThe field for theoprecord component.private final CopyNbtFunction.PathThe field for thesourcePathrecord component.private final CopyNbtFunction.PathThe field for thetargetPathrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCopyOperation(CopyNbtFunction.Path sourcePath, CopyNbtFunction.Path targetPath, CopyNbtFunction.MergeStrategy op) Creates an instance of aCopyOperationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.op()Returns the value of theoprecord component.Returns the value of thesourcePathrecord component.Returns the value of thetargetPathrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sourcePath
The field for thesourcePathrecord component. -
targetPath
The field for thetargetPathrecord component. -
op
The field for theoprecord component. -
CODEC
-
-
Constructor Details
-
CopyOperation
CopyOperation(CopyNbtFunction.Path sourcePath, CopyNbtFunction.Path targetPath, CopyNbtFunction.MergeStrategy op) Creates an instance of aCopyOperationrecord class.- Parameters:
sourcePath- the value for thesourcePathrecord componenttargetPath- the value for thetargetPathrecord componentop- the value for theoprecord component
-
-
Method Details
-
apply
-
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. -
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). -
sourcePath
Returns the value of thesourcePathrecord component.- Returns:
- the value of the
sourcePathrecord component
-
targetPath
Returns the value of thetargetPathrecord component.- Returns:
- the value of the
targetPathrecord component
-
op
Returns the value of theoprecord component.- Returns:
- the value of the
oprecord component
-