Package net.minecraft.world.gen.trunk
Class TrunkPlacer
java.lang.Object
net.minecraft.world.gen.trunk.TrunkPlacer
- Direct Known Subclasses:
BendingTrunkPlacer,DarkOakTrunkPlacer,ForkingTrunkPlacer,GiantTrunkPlacer,LargeOakTrunkPlacer,StraightTrunkPlacer
- Mappings:
Namespace Name official cxuintermediary net/minecraft/class_5141named net/minecraft/world/gen/trunk/TrunkPlacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprivate static intprivate static intstatic intprotected intprotected intstatic com.mojang.serialization.Codec<TrunkPlacer> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleancanGenerate(TestableWorld world, BlockPos pos)protected static <P extends TrunkPlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer>fillTrunkPlacerFields(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)abstract List<FoliagePlacer.TreeNode>generate(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, int int2, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)Generates the trunk blocks and return a list of tree nodes to place foliage aroundprotected static booleangetAndSetState(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig, Function<BlockState,BlockState> function)intprotected abstract TrunkPlacerType<?>getType()protected static booleanmethod_35375(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)protected static voidsetToDirt(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)protected static voidtrySetState(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos.Mutable mutable, TreeFeatureConfig treeFeatureConfig)
-
Field Details
-
TYPE_CODEC
- Mappings:
Namespace Name Mixin selector official cLcxu;c:Lcom/mojang/serialization/Codec;intermediary field_24972Lnet/minecraft/class_5141;field_24972:Lcom/mojang/serialization/Codec;named TYPE_CODECLnet/minecraft/world/gen/trunk/TrunkPlacer;TYPE_CODEC:Lcom/mojang/serialization/Codec;
-
field_31528
private static final int field_31528- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official aLcxu;a:Iintermediary field_31528Lnet/minecraft/class_5141;field_31528:Inamed field_31528Lnet/minecraft/world/gen/trunk/TrunkPlacer;field_31528:I
-
field_31529
private static final int field_31529- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official bLcxu;b:Iintermediary field_31529Lnet/minecraft/class_5141;field_31529:Inamed field_31529Lnet/minecraft/world/gen/trunk/TrunkPlacer;field_31529:I
-
field_31530
public static final int field_31530- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official dLcxu;d:Iintermediary field_31530Lnet/minecraft/class_5141;field_31530:Inamed field_31530Lnet/minecraft/world/gen/trunk/TrunkPlacer;field_31530:I
-
baseHeight
protected final int baseHeight- Mappings:
Namespace Name Mixin selector official eLcxu;e:Iintermediary field_23760Lnet/minecraft/class_5141;field_23760:Inamed baseHeightLnet/minecraft/world/gen/trunk/TrunkPlacer;baseHeight:I
-
firstRandomHeight
protected final int firstRandomHeight- Mappings:
Namespace Name Mixin selector official fLcxu;f:Iintermediary field_23761Lnet/minecraft/class_5141;field_23761:Inamed firstRandomHeightLnet/minecraft/world/gen/trunk/TrunkPlacer;firstRandomHeight:I
-
secondRandomHeight
protected final int secondRandomHeight- Mappings:
Namespace Name Mixin selector official gLcxu;g:Iintermediary field_23762Lnet/minecraft/class_5141;field_23762:Inamed secondRandomHeightLnet/minecraft/world/gen/trunk/TrunkPlacer;secondRandomHeight:I
-
-
Constructor Details
-
TrunkPlacer
public TrunkPlacer(int baseHeight, int firstRandomHeight, int secondRandomHeight)- Mappings:
Namespace Name Mixin selector official <init>Lcxu;<init>(III)Vintermediary <init>Lnet/minecraft/class_5141;<init>(III)Vnamed <init>Lnet/minecraft/world/gen/trunk/TrunkPlacer;<init>(III)V
-
-
Method Details
-
fillTrunkPlacerFields
protected static <P extends TrunkPlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer> fillTrunkPlacerFields(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;intermediary method_28904Lnet/minecraft/class_5141;method_28904(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;named fillTrunkPlacerFieldsLnet/minecraft/world/gen/trunk/TrunkPlacer;fillTrunkPlacerFields(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;
-
getType
- Mappings:
Namespace Name Mixin selector official aLcxu;a()Lcxv;intermediary method_28903Lnet/minecraft/class_5141;method_28903()Lnet/minecraft/class_5142;named getTypeLnet/minecraft/world/gen/trunk/TrunkPlacer;getType()Lnet/minecraft/world/gen/trunk/TrunkPlacerType;
-
generate
public abstract List<FoliagePlacer.TreeNode> generate(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, int int2, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)Generates the trunk blocks and return a list of tree nodes to place foliage around- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lbwd;Ljava/util/function/BiConsumer;Ljava/util/Random;ILgb;Lcvo;)Ljava/util/List;intermediary method_26991Lnet/minecraft/class_5141;method_26991(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Ljava/util/Random;ILnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Ljava/util/List;named generateLnet/minecraft/world/gen/trunk/TrunkPlacer;generate(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Ljava/util/Random;ILnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Ljava/util/List;
-
getHeight
- Mappings:
Namespace Name Mixin selector official aLcxu;a(Ljava/util/Random;)Iintermediary method_26993Lnet/minecraft/class_5141;method_26993(Ljava/util/Random;)Inamed getHeightLnet/minecraft/world/gen/trunk/TrunkPlacer;getHeight(Ljava/util/Random;)I
-
canGenerate
- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lbwd;Lgb;)Zintermediary method_27403Lnet/minecraft/class_5141;method_27403(Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Znamed canGenerateLnet/minecraft/world/gen/trunk/TrunkPlacer;canGenerate(Lnet/minecraft/world/TestableWorld;Lnet/minecraft/util/math/BlockPos;)Z
-
setToDirt
protected static void setToDirt(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lbwd;Ljava/util/function/BiConsumer;Ljava/util/Random;Lgb;Lcvo;)Vintermediary method_27400Lnet/minecraft/class_5141;method_27400(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Vnamed setToDirtLnet/minecraft/world/gen/trunk/TrunkPlacer;setToDirt(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)V
-
method_35375
protected static boolean method_35375(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig)- Mappings:
Namespace Name Mixin selector official bLcxu;b(Lbwd;Ljava/util/function/BiConsumer;Ljava/util/Random;Lgb;Lcvo;)Zintermediary method_35375Lnet/minecraft/class_5141;method_35375(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Znamed method_35375Lnet/minecraft/world/gen/trunk/TrunkPlacer;method_35375(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Z
-
getAndSetState
protected static boolean getAndSetState(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos blockPos, TreeFeatureConfig treeFeatureConfig, Function<BlockState,BlockState> function)- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lbwd;Ljava/util/function/BiConsumer;Ljava/util/Random;Lgb;Lcvo;Ljava/util/function/Function;)Zintermediary method_27402Lnet/minecraft/class_5141;method_27402(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;Ljava/util/function/Function;)Znamed getAndSetStateLnet/minecraft/world/gen/trunk/TrunkPlacer;getAndSetState(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;Ljava/util/function/Function;)Z
-
trySetState
protected static void trySetState(TestableWorld testableWorld, BiConsumer<BlockPos,BlockState> biConsumer, Random random, BlockPos.Mutable mutable, TreeFeatureConfig treeFeatureConfig)- Mappings:
Namespace Name Mixin selector official aLcxu;a(Lbwd;Ljava/util/function/BiConsumer;Ljava/util/Random;Lgb$a;Lcvo;)Vintermediary method_27401Lnet/minecraft/class_5141;method_27401(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_4643;)Vnamed trySetStateLnet/minecraft/world/gen/trunk/TrunkPlacer;trySetState(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos$Mutable;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)V
-