Record Class PlacedFeature
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.placement.PlacedFeature
public record PlacedFeature(Holder<ConfiguredFeature<?,?>> feature, List<PlacementModifier> placement)
extends Record 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Holder<PlacedFeature>>static final com.mojang.serialization.Codec<PlacedFeature>private final Holder<ConfiguredFeature<?,?>> The field for thefeaturerecord component.static final com.mojang.serialization.Codec<HolderSet<PlacedFeature>>static final com.mojang.serialization.Codec<List<HolderSet<PlacedFeature>>>private final List<PlacementModifier>The field for theplacementrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlacedFeature(Holder<ConfiguredFeature<?, ?>> feature, List<PlacementModifier> placement) Creates an instance of aPlacedFeaturerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Holder<ConfiguredFeature<?,?>> feature()Returns the value of thefeaturerecord component.Stream<ConfiguredFeature<?,?>> final inthashCode()Returns a hash code value for this object.booleanplace(WorldGenLevel p_226358_, ChunkGenerator p_226359_, RandomSource p_226360_, BlockPos p_226361_) Returns the value of theplacementrecord component.booleanplaceWithBiomeCheck(WorldGenLevel p_226378_, ChunkGenerator p_226379_, RandomSource p_226380_, BlockPos p_226381_) private booleanplaceWithContext(PlacementContext p_226369_, RandomSource p_226370_, BlockPos p_226371_) toString()Returns a string representation of this record class.
- 
Field Details- 
featureThe field for thefeaturerecord component.
- 
placementThe field for theplacementrecord component.
- 
DIRECT_CODEC
- 
CODEC
- 
LIST_CODEC
- 
LIST_OF_LISTS_CODECpublic static final com.mojang.serialization.Codec<List<HolderSet<PlacedFeature>>> LIST_OF_LISTS_CODEC
 
- 
- 
Constructor Details- 
PlacedFeatureCreates an instance of aPlacedFeaturerecord class.- Parameters:
- feature- the value for the- featurerecord component
- placement- the value for the- placementrecord component
 
 
- 
- 
Method Details- 
placepublic boolean place(WorldGenLevel p_226358_, ChunkGenerator p_226359_, RandomSource p_226360_, BlockPos p_226361_) 
- 
placeWithBiomeCheckpublic boolean placeWithBiomeCheck(WorldGenLevel p_226378_, ChunkGenerator p_226379_, RandomSource p_226380_, BlockPos p_226381_) 
- 
placeWithContextprivate boolean placeWithContext(PlacementContext p_226369_, RandomSource p_226370_, BlockPos p_226371_) 
- 
getFeatures
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
featureReturns the value of thefeaturerecord component.- Returns:
- the value of the featurerecord component
 
- 
placementReturns the value of theplacementrecord component.- Returns:
- the value of the placementrecord component
 
 
-