Record Class CompositeDirection
java.lang.Object
java.lang.Record
net.minecraft.core.CompositeDirection
- All Implemented Interfaces:
Directional
public record CompositeDirection(Set<Direction> directions, Vec3i step)
extends Record
implements Directional
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thedirectionsrecord component.static final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionprivate final Vec3iThe field for thesteprecord component.static final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirectionstatic final CompositeDirection -
Constructor Summary
ConstructorsConstructorDescriptionCompositeDirection(Set<Direction> directions, Vec3i step) Creates an instance of aCompositeDirectionrecord class.CompositeDirection(Direction... directions) -
Method Summary
Modifier and TypeMethodDescriptioncompose(CompositeDirection other) Returns the value of thedirectionsrecord component.final booleanIndicates whether some other object is "equal to" this one.getStep()intgetStepX()intgetStepY()intgetStepZ()final inthashCode()Returns a hash code value for this object.step()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
directions
-
step
The field for thesteprecord component. -
NORTH
-
EAST
-
SOUTH
-
WEST
-
NORTH_EAST
-
SOUTH_EAST
-
SOUTH_WEST
-
NORTH_WEST
-
UP
-
NORTH_UP
-
EAST_UP
-
SOUTH_UP
-
WEST_UP
-
NORTH_EAST_UP
-
SOUTH_EAST_UP
-
SOUTH_WEST_UP
-
NORTH_WEST_UP
-
DOWN
-
NORTH_DOWN
-
EAST_DOWN
-
SOUTH_DOWN
-
WEST_DOWN
-
NORTH_EAST_DOWN
-
SOUTH_EAST_DOWN
-
SOUTH_WEST_DOWN
-
NORTH_WEST_DOWN
-
-
Constructor Details
-
CompositeDirection
-
CompositeDirection
CompositeDirection(Direction... directions)
-
-
Method Details
-
compose
-
getStepX
public int getStepX()- Specified by:
getStepXin interfaceDirectional
-
getStepY
public int getStepY()- Specified by:
getStepYin interfaceDirectional
-
getStepZ
public int getStepZ()- Specified by:
getStepZin interfaceDirectional
-
getStep
- Specified by:
getStepin interfaceDirectional
-
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). -
directions
-
step
Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-