Record Class UnifiedPostProcessCodecs.Offset
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.UnifiedPostProcessCodecs.Offset
- Enclosing class:
UnifiedPostProcessCodecs
public static record UnifiedPostProcessCodecs.Offset(net.minecraft.core.Direction direction, int distance)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<UnifiedPostProcessCodecs.Offset> -
Constructor Summary
ConstructorsConstructorDescriptionOffset(net.minecraft.core.Direction direction, int distance) Creates an instance of aOffsetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.DirectionReturns the value of thedirectionrecord component.intdistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Offset
public Offset(net.minecraft.core.Direction direction, int distance) Creates an instance of aOffsetrecord class.- Parameters:
direction- the value for thedirectionrecord componentdistance- the value for thedistancerecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
direction
public net.minecraft.core.Direction direction()Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
distance
public int distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-