Record Class FeaturePlaceContext<C extends FeatureConfig>
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.FeaturePlaceContext<C>
- Type Parameters:
C- The configuration type.- Record Components:
level- TheWorldGenAccessused to modify the world safely.origin- The startingLocationfor the feature's generation.random- TheRandomsource, seeded for deterministic generation.config- The specificFeatureConfiginstance for this pass.
public record FeaturePlaceContext<C extends FeatureConfig>(WorldGenAccess level, org.bukkit.Location origin, Random random, C extends FeatureConfig config)
extends Record
A data container (record) provided to a
Feature during the placement phase.-
Constructor Summary
ConstructorsConstructorDescriptionFeaturePlaceContext(WorldGenAccess level, org.bukkit.Location origin, Random random, C config) Creates an instance of aFeaturePlaceContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.org.bukkit.Locationorigin()Returns the value of theoriginrecord component.random()Returns the value of therandomrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FeaturePlaceContext
public FeaturePlaceContext(WorldGenAccess level, org.bukkit.Location origin, Random random, C config) Creates an instance of aFeaturePlaceContextrecord class.
-
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
origin
public org.bukkit.Location origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
random
Returns the value of therandomrecord component.- Returns:
- the value of the
randomrecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-