Record Class SpikeConfiguration
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.configurations.SpikeConfiguration
- All Implemented Interfaces:
FeatureConfiguration
public record SpikeConfiguration(BlockState state, BlockPredicate canPlaceOn, BlockPredicate canReplace)
extends Record
implements FeatureConfiguration
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockPredicateThe field for thecanPlaceOnrecord component.private final BlockPredicateThe field for thecanReplacerecord component.static final com.mojang.serialization.Codec<SpikeConfiguration> private final BlockStateThe field for thestaterecord component.Fields inherited from interface FeatureConfiguration
NONE -
Constructor Summary
ConstructorsConstructorDescriptionSpikeConfiguration(BlockState state, BlockPredicate canPlaceOn, BlockPredicate canReplace) Creates an instance of aSpikeConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanPlaceOnrecord component.Returns the value of thecanReplacerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface FeatureConfiguration
getFeatures
-
Field Details
-
state
The field for thestaterecord component. -
canPlaceOn
The field for thecanPlaceOnrecord component. -
canReplace
The field for thecanReplacerecord component. -
CODEC
-
-
Constructor Details
-
SpikeConfiguration
Creates an instance of aSpikeConfigurationrecord class.- Parameters:
state- the value for thestaterecord componentcanPlaceOn- the value for thecanPlaceOnrecord componentcanReplace- the value for thecanReplacerecord component
-
-
Method Details
-
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). -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
canPlaceOn
Returns the value of thecanPlaceOnrecord component.- Returns:
- the value of the
canPlaceOnrecord component
-
canReplace
Returns the value of thecanReplacerecord component.- Returns:
- the value of the
canReplacerecord component
-