Record Class PlacementConditions
java.lang.Object
java.lang.Record
org.geysermc.geyser.api.block.custom.component.PlacementConditions
- Record Components:
allowedFaces- The faces that the block can be placed onblockFilters- The block filters that control what blocks the block can be placed on
public record PlacementConditions(@NonNull Set<PlacementConditions.Face> allowedFaces, @NonNull LinkedHashMap<String,PlacementConditions.BlockFilterType> blockFilters)
extends Record
This class is used to store conditions for a placement filter for a custom block.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionPlacementConditions(@NonNull Set<PlacementConditions.Face> allowedFaces, @NonNull LinkedHashMap<String, PlacementConditions.BlockFilterType> blockFilters) Creates an instance of aPlacementConditionsrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull Set<PlacementConditions.Face> Returns the value of theallowedFacesrecord component.Returns the value of theblockFiltersrecord 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.
-
Constructor Details
-
PlacementConditions
public PlacementConditions(@NonNull Set<PlacementConditions.Face> allowedFaces, @NonNull LinkedHashMap<String, PlacementConditions.BlockFilterType> blockFilters) Creates an instance of aPlacementConditionsrecord class.- Parameters:
allowedFaces- the value for theallowedFacesrecord componentblockFilters- the value for theblockFiltersrecord component
-
-
Method Details
-
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). -
allowedFaces
Returns the value of theallowedFacesrecord component.- Returns:
- the value of the
allowedFacesrecord component
-
blockFilters
Returns the value of theblockFiltersrecord component.- Returns:
- the value of the
blockFiltersrecord component
-