mirror of https://github.com/FabricMC/yarn.git
Document placement modifier (#2863)
* Document placement modifier * Update position calculation javadoc
This commit is contained in:
parent
957e132469
commit
f3fb4ec731
|
@ -1,6 +1,12 @@
|
||||||
CLASS net/minecraft/class_6797 net/minecraft/world/gen/decorator/PlacementModifier
|
CLASS net/minecraft/class_6797 net/minecraft/world/gen/decorator/PlacementModifier
|
||||||
|
COMMENT A placement modifier is a one-to-many position transformation, which
|
||||||
|
COMMENT takes a position with some context and returns zero or more positions.
|
||||||
|
COMMENT It's used to determine where to generate configured features.
|
||||||
|
COMMENT
|
||||||
|
COMMENT @see net.minecraft.world.gen.feature.ConfiguredFeature#withPlacement
|
||||||
FIELD field_35736 CODEC Lcom/mojang/serialization/Codec;
|
FIELD field_35736 CODEC Lcom/mojang/serialization/Codec;
|
||||||
METHOD method_14452 getPositions (Lnet/minecraft/class_5444;Ljava/util/Random;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;
|
METHOD method_14452 getPositions (Lnet/minecraft/class_5444;Ljava/util/Random;Lnet/minecraft/class_2338;)Ljava/util/stream/Stream;
|
||||||
|
COMMENT Applies this placement modifier to the given position.
|
||||||
ARG 1 context
|
ARG 1 context
|
||||||
ARG 2 random
|
ARG 2 random
|
||||||
ARG 3 pos
|
ARG 3 pos
|
||||||
|
|
|
@ -21,7 +21,19 @@ CLASS net/minecraft/class_2975 net/minecraft/world/gen/feature/ConfiguredFeature
|
||||||
METHOD method_39592 withBlockPredicateFilter (Lnet/minecraft/class_6646;)Lnet/minecraft/class_6796;
|
METHOD method_39592 withBlockPredicateFilter (Lnet/minecraft/class_6646;)Lnet/minecraft/class_6796;
|
||||||
ARG 1 predicate
|
ARG 1 predicate
|
||||||
METHOD method_39593 withPlacement (Ljava/util/List;)Lnet/minecraft/class_6796;
|
METHOD method_39593 withPlacement (Ljava/util/List;)Lnet/minecraft/class_6796;
|
||||||
|
COMMENT Attaches placement modifiers to this configured feature. Attached
|
||||||
|
COMMENT placement modifiers will be applied before this configured feature is
|
||||||
|
COMMENT generated.
|
||||||
|
COMMENT
|
||||||
|
COMMENT @see #withPlacement(PlacementModifier...)
|
||||||
|
COMMENT @see PlacedFeature#generate(StructureWorldAccess, ChunkGenerator, Random, BlockPos)
|
||||||
ARG 1 modifiers
|
ARG 1 modifiers
|
||||||
METHOD method_39594 withPlacement ([Lnet/minecraft/class_6797;)Lnet/minecraft/class_6796;
|
METHOD method_39594 withPlacement ([Lnet/minecraft/class_6797;)Lnet/minecraft/class_6796;
|
||||||
|
COMMENT Attaches placement modifiers to this configured feature. Attached
|
||||||
|
COMMENT placement modifiers will be applied before this configured feature is
|
||||||
|
COMMENT generated.
|
||||||
|
COMMENT
|
||||||
|
COMMENT @see #withPlacement(List)
|
||||||
|
COMMENT @see PlacedFeature#generate(StructureWorldAccess, ChunkGenerator, Random, BlockPos)
|
||||||
ARG 1 modifiers
|
ARG 1 modifiers
|
||||||
METHOD method_39595 withInAirFilter ()Lnet/minecraft/class_6796;
|
METHOD method_39595 withInAirFilter ()Lnet/minecraft/class_6796;
|
||||||
|
|
|
@ -18,6 +18,12 @@ CLASS net/minecraft/class_6796 net/minecraft/world/gen/feature/PlacedFeature
|
||||||
ARG 2 random
|
ARG 2 random
|
||||||
ARG 3 pos
|
ARG 3 pos
|
||||||
METHOD method_39650 generate (Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Ljava/util/Random;Lnet/minecraft/class_2338;)Z
|
METHOD method_39650 generate (Lnet/minecraft/class_5281;Lnet/minecraft/class_2794;Ljava/util/Random;Lnet/minecraft/class_2338;)Z
|
||||||
|
COMMENT Generates a configured feature at the positions obtained by applying
|
||||||
|
COMMENT placement modifiers to the given position.
|
||||||
|
COMMENT
|
||||||
|
COMMENT <p>To calculate positions, it first creates a singleton stream of the
|
||||||
|
COMMENT given position, then it applies placement modifiers with {@linkplain
|
||||||
|
COMMENT Stream#flatMap flatMap} in order they appear in the list.
|
||||||
ARG 1 world
|
ARG 1 world
|
||||||
ARG 2 generator
|
ARG 2 generator
|
||||||
ARG 3 random
|
ARG 3 random
|
||||||
|
|
Loading…
Reference in New Issue