Record Class CopyPropertiesProvider
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.feature.stateproviders.CopyPropertiesProvider
- All Implemented Interfaces:
BlockStateProvider
public record CopyPropertiesProvider(Holder<BlockStateProvider> source)
extends Record
implements BlockStateProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<CopyPropertiesProvider> private final Holder<BlockStateProvider> The field for thesourcerecord component.Fields inherited from interface BlockStateProvider
DIRECT_CODEC, STATE_OR_PROVIDER_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aCopyPropertiesProviderrecord class.CopyPropertiesProvider(Block block) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<CopyPropertiesProvider> codec()final booleanIndicates whether some other object is "equal to" this one.getState(LevelAccessor level, RandomSource random, BlockPos pos) final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface BlockStateProvider
getOptionalState
-
Field Details
-
source
The field for thesourcerecord component. -
CODEC
-
-
Constructor Details
-
CopyPropertiesProvider
-
CopyPropertiesProvider
Creates an instance of aCopyPropertiesProviderrecord class.- Parameters:
source- the value for thesourcerecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceBlockStateProvider
-
getState
- Specified by:
getStatein interfaceBlockStateProvider
-
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). -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-