Record Class RuleBasedBlockStateProvider
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.stateproviders.RuleBasedBlockStateProvider
public record RuleBasedBlockStateProvider(BlockStateProvider fallback, List<RuleBasedBlockStateProvider.Rule> rules)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RuleBasedBlockStateProvider>private final BlockStateProviderThe field for thefallbackrecord component.private final List<RuleBasedBlockStateProvider.Rule>The field for therulesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRuleBasedBlockStateProvider(BlockStateProvider fallback, List<RuleBasedBlockStateProvider.Rule> rules) Creates an instance of aRuleBasedBlockStateProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fallback()Returns the value of thefallbackrecord component.getState(WorldGenLevel p_225933_, RandomSource p_225934_, BlockPos p_225935_) final inthashCode()Returns a hash code value for this object.rules()Returns the value of therulesrecord component.static RuleBasedBlockStateProviderstatic RuleBasedBlockStateProvidersimple(BlockStateProvider p_225941_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fallback
The field for thefallbackrecord component. -
rules
The field for therulesrecord component. -
CODEC
-
-
Constructor Details
-
RuleBasedBlockStateProvider
public RuleBasedBlockStateProvider(BlockStateProvider fallback, List<RuleBasedBlockStateProvider.Rule> rules) Creates an instance of aRuleBasedBlockStateProviderrecord class.- Parameters:
fallback- the value for thefallbackrecord componentrules- the value for therulesrecord component
-
-
Method Details
-
simple
-
simple
-
getState
-
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). -
fallback
Returns the value of thefallbackrecord component.- Returns:
- the value of the
fallbackrecord component
-
rules
Returns the value of therulesrecord component.- Returns:
- the value of the
rulesrecord component
-