Record Class CopyCustomDataFunction.CopyOperation
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.functions.CopyCustomDataFunction.CopyOperation
- Enclosing class:
CopyCustomDataFunction
private static record CopyCustomDataFunction.CopyOperation(NbtPathArgument.NbtPath sourcePath, NbtPathArgument.NbtPath targetPath, CopyCustomDataFunction.MergeStrategy op)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CopyCustomDataFunction.CopyOperation> private final CopyCustomDataFunction.MergeStrategyThe field for theoprecord component.private final NbtPathArgument.NbtPathThe field for thesourcePathrecord component.private final NbtPathArgument.NbtPathThe field for thetargetPathrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCopyOperation(NbtPathArgument.NbtPath sourcePath, NbtPathArgument.NbtPath targetPath, CopyCustomDataFunction.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
private CopyOperation(NbtPathArgument.NbtPath sourcePath, NbtPathArgument.NbtPath targetPath, CopyCustomDataFunction.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
-
hashCode
-
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
-