Record Class FacingFixer
java.lang.Object
java.lang.Record
com.ldtteam.structurize.blueprints.FacingFixer
public record FacingFixer(Predicate<net.minecraft.world.level.block.state.BlockState> test, net.minecraft.world.level.block.state.properties.DirectionProperty property, Function<net.minecraft.core.Direction,net.minecraft.core.Direction> mapping)
extends Record
Used during mirroring of blueprint palette
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FacingFixerstatic final FacingFixerstatic final List<FacingFixer> -
Constructor Summary
ConstructorsConstructorDescriptionFacingFixer(Predicate<net.minecraft.world.level.block.state.BlockState> test, net.minecraft.world.level.block.state.properties.DirectionProperty property, Function<net.minecraft.core.Direction, net.minecraft.core.Direction> mapping) Creates an instance of aFacingFixerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static net.minecraft.world.level.block.state.BlockStatefixMirroredFacing(net.minecraft.world.level.block.state.BlockState blockstate, net.minecraft.world.level.block.state.BlockState unmirrored) final inthashCode()Returns a hash code value for this object.Function<net.minecraft.core.Direction,net.minecraft.core.Direction> mapping()Returns the value of themappingrecord component.static FacingFixermirrorFixer(Predicate<net.minecraft.world.level.block.state.BlockState> test, net.minecraft.world.level.block.state.properties.DirectionProperty property, Function<net.minecraft.core.Direction, net.minecraft.core.Direction> mapping) net.minecraft.world.level.block.state.properties.DirectionPropertyproperty()Returns the value of thepropertyrecord component.Predicate<net.minecraft.world.level.block.state.BlockState>test()Returns the value of thetestrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MIRROR_FIXERS
-
GLAZED_TERRACOTA_SPECIAL
-
GLAZED_TERRACOTA_MAJORITY
-
-
Constructor Details
-
FacingFixer
public FacingFixer(Predicate<net.minecraft.world.level.block.state.BlockState> test, net.minecraft.world.level.block.state.properties.DirectionProperty property, Function<net.minecraft.core.Direction, net.minecraft.core.Direction> mapping) Creates an instance of aFacingFixerrecord class.- Parameters:
test- the value for thetestrecord componentproperty- the value for thepropertyrecord componentmapping- the value for themappingrecord component
-
-
Method Details
-
mirrorFixer
public static FacingFixer mirrorFixer(Predicate<net.minecraft.world.level.block.state.BlockState> test, net.minecraft.world.level.block.state.properties.DirectionProperty property, Function<net.minecraft.core.Direction, net.minecraft.core.Direction> mapping) - Parameters:
test- to which blocks should fixer applyproperty- which property is being fixedmapping- fix function- Returns:
- fixer registered as mirror fixer
- See Also:
-
fixMirroredFacing
public static net.minecraft.world.level.block.state.BlockState fixMirroredFacing(net.minecraft.world.level.block.state.BlockState blockstate, net.minecraft.world.level.block.state.BlockState unmirrored) - Parameters:
blockstate- after applying mirrorunmirrored- before applying mirror- Returns:
- using first matching fixer fixes the blockstate property
- See Also:
-
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). -
test
Returns the value of thetestrecord component.- Returns:
- the value of the
testrecord component
-
property
public net.minecraft.world.level.block.state.properties.DirectionProperty property()Returns the value of thepropertyrecord component.- Returns:
- the value of the
propertyrecord component
-
mapping
Returns the value of themappingrecord component.- Returns:
- the value of the
mappingrecord component
-