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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionCopyOperation(CopyNbtFunction.Path sourcePath, CopyNbtFunction.Path targetPath, CopyNbtFunction.MergeStrategy op) Creates an instance of aCopyOperationrecord class.
- 
Method SummaryModifier 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- 
sourcePathThe field for thesourcePathrecord component.
- 
targetPathThe field for thetargetPathrecord component.
- 
opThe field for theoprecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
CopyOperationCopyOperation(CopyNbtFunction.Path sourcePath, CopyNbtFunction.Path targetPath, CopyNbtFunction.MergeStrategy op) Creates an instance of aCopyOperationrecord class.- Parameters:
- sourcePath- the value for the- sourcePathrecord component
- targetPath- the value for the- targetPathrecord component
- op- the value for the- oprecord component
 
 
- 
- 
Method Details- 
apply
- 
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.
- 
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).
- 
sourcePathReturns the value of thesourcePathrecord component.- Returns:
- the value of the sourcePathrecord component
 
- 
targetPathReturns the value of thetargetPathrecord component.- Returns:
- the value of the targetPathrecord component
 
- 
opReturns the value of theoprecord component.- Returns:
- the value of the oprecord component
 
 
-