Class TrunkPlacer

java.lang.Object
net.minecraft.world.gen.trunk.TrunkPlacer
Direct Known Subclasses:
BendingTrunkPlacer, CherryTrunkPlacer, DarkOakTrunkPlacer, ForkingTrunkPlacer, GiantTrunkPlacer, LargeOakTrunkPlacer, StraightTrunkPlacer, UpwardsBranchingTrunkPlacer

public abstract class TrunkPlacer extends Object
Mappings:
Namespace Name
named net/minecraft/world/gen/trunk/TrunkPlacer
intermediary net/minecraft/class_5141
official elj
  • Field Details Link icon

    • TYPE_CODEC Link icon

      public static final com.mojang.serialization.Codec<TrunkPlacer> TYPE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named TYPE_CODEC Lnet/minecraft/world/gen/trunk/TrunkPlacer;TYPE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_24972 Lnet/minecraft/class_5141;field_24972:Lcom/mojang/serialization/Codec;
      official c Lelj;c:Lcom/mojang/serialization/Codec;
    • MAX_BASE_HEIGHT Link icon

      private static final int MAX_BASE_HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_BASE_HEIGHT Lnet/minecraft/world/gen/trunk/TrunkPlacer;MAX_BASE_HEIGHT:I
      intermediary field_31528 Lnet/minecraft/class_5141;field_31528:I
      official a Lelj;a:I
    • MAX_RANDOM_HEIGHT Link icon

      private static final int MAX_RANDOM_HEIGHT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_RANDOM_HEIGHT Lnet/minecraft/world/gen/trunk/TrunkPlacer;MAX_RANDOM_HEIGHT:I
      intermediary field_31529 Lnet/minecraft/class_5141;field_31529:I
      official b Lelj;b:I
    • field_31530 Link icon

      public static final int field_31530
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_31530 Lnet/minecraft/world/gen/trunk/TrunkPlacer;field_31530:I
      intermediary field_31530 Lnet/minecraft/class_5141;field_31530:I
      official d Lelj;d:I
    • baseHeight Link icon

      protected final int baseHeight
      Mappings:
      Namespace Name Mixin selector
      named baseHeight Lnet/minecraft/world/gen/trunk/TrunkPlacer;baseHeight:I
      intermediary field_23760 Lnet/minecraft/class_5141;field_23760:I
      official e Lelj;e:I
    • firstRandomHeight Link icon

      protected final int firstRandomHeight
      Mappings:
      Namespace Name Mixin selector
      named firstRandomHeight Lnet/minecraft/world/gen/trunk/TrunkPlacer;firstRandomHeight:I
      intermediary field_23761 Lnet/minecraft/class_5141;field_23761:I
      official f Lelj;f:I
    • secondRandomHeight Link icon

      protected final int secondRandomHeight
      Mappings:
      Namespace Name Mixin selector
      named secondRandomHeight Lnet/minecraft/world/gen/trunk/TrunkPlacer;secondRandomHeight:I
      intermediary field_23762 Lnet/minecraft/class_5141;field_23762:I
      official g Lelj;g:I
  • Constructor Details Link icon

    • TrunkPlacer Link icon

      public TrunkPlacer(int baseHeight, int firstRandomHeight, int secondRandomHeight)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/world/gen/trunk/TrunkPlacer;<init>(III)V
      intermediary <init> Lnet/minecraft/class_5141;<init>(III)V
      official <init> Lelj;<init>(III)V
  • Method Details Link icon

    • fillTrunkPlacerFields Link icon

      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
      named fillTrunkPlacerFields Lnet/minecraft/world/gen/trunk/TrunkPlacer;fillTrunkPlacerFields(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;
      intermediary method_28904 Lnet/minecraft/class_5141;method_28904(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;
      official a Lelj;a(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;
    • getType Link icon

      protected abstract TrunkPlacerType<?> getType()
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/world/gen/trunk/TrunkPlacer;getType()Lnet/minecraft/world/gen/trunk/TrunkPlacerType;
      intermediary method_28903 Lnet/minecraft/class_5141;method_28903()Lnet/minecraft/class_5142;
      official a Lelj;a()Lelk;
    • generate Link icon

      public abstract List<FoliagePlacer.TreeNode> generate(TestableWorld world, BiConsumer<BlockPos,BlockState> replacer, Random random, int height, BlockPos startPos, TreeFeatureConfig config)
      Generates the trunk blocks and return a list of tree nodes to place foliage around
      Mappings:
      Namespace Name Mixin selector
      named generate Lnet/minecraft/world/gen/trunk/TrunkPlacer;generate(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Lnet/minecraft/util/math/random/Random;ILnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Ljava/util/List;
      intermediary method_26991 Lnet/minecraft/class_5141;method_26991(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;ILnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Ljava/util/List;
      official a Lelj;a(Ldgp;Ljava/util/function/BiConsumer;Lazh;ILji;Leiz;)Ljava/util/List;
    • getHeight Link icon

      public int getHeight(Random random)
      Mappings:
      Namespace Name Mixin selector
      named getHeight Lnet/minecraft/world/gen/trunk/TrunkPlacer;getHeight(Lnet/minecraft/util/math/random/Random;)I
      intermediary method_26993 Lnet/minecraft/class_5141;method_26993(Lnet/minecraft/class_5819;)I
      official a Lelj;a(Lazh;)I
    • canGenerate Link icon

      private static boolean canGenerate(TestableWorld world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named canGenerate Lnet/minecraft/world/gen/trunk/TrunkPlacer;canGenerate(Lnet/minecraft/world/TestableWorld;Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_27403 Lnet/minecraft/class_5141;method_27403(Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z
      official c Lelj;c(Ldgp;Lji;)Z
    • setToDirt Link icon

      protected static void setToDirt(TestableWorld world, BiConsumer<BlockPos,BlockState> replacer, Random random, BlockPos pos, TreeFeatureConfig config)
      Mappings:
      Namespace Name Mixin selector
      named setToDirt Lnet/minecraft/world/gen/trunk/TrunkPlacer;setToDirt(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)V
      intermediary method_27400 Lnet/minecraft/class_5141;method_27400(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)V
      official a Lelj;a(Ldgp;Ljava/util/function/BiConsumer;Lazh;Lji;Leiz;)V
    • getAndSetState Link icon

      protected boolean getAndSetState(TestableWorld world, BiConsumer<BlockPos,BlockState> replacer, Random random, BlockPos pos, TreeFeatureConfig config)
      Mappings:
      Namespace Name Mixin selector
      named getAndSetState Lnet/minecraft/world/gen/trunk/TrunkPlacer;getAndSetState(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Z
      intermediary method_35375 Lnet/minecraft/class_5141;method_35375(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;)Z
      official b Lelj;b(Ldgp;Ljava/util/function/BiConsumer;Lazh;Lji;Leiz;)Z
    • getAndSetState Link icon

      protected boolean getAndSetState(TestableWorld world, BiConsumer<BlockPos,BlockState> replacer, Random random, BlockPos pos, TreeFeatureConfig config, Function<BlockState,BlockState> function)
      Mappings:
      Namespace Name Mixin selector
      named getAndSetState Lnet/minecraft/world/gen/trunk/TrunkPlacer;getAndSetState(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;Ljava/util/function/Function;)Z
      intermediary method_27402 Lnet/minecraft/class_5141;method_27402(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_4643;Ljava/util/function/Function;)Z
      official a Lelj;a(Ldgp;Ljava/util/function/BiConsumer;Lazh;Lji;Leiz;Ljava/util/function/Function;)Z
    • trySetState Link icon

      protected void trySetState(TestableWorld world, BiConsumer<BlockPos,BlockState> replacer, Random random, BlockPos.Mutable pos, TreeFeatureConfig config)
      Mappings:
      Namespace Name Mixin selector
      named trySetState Lnet/minecraft/world/gen/trunk/TrunkPlacer;trySetState(Lnet/minecraft/world/TestableWorld;Ljava/util/function/BiConsumer;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos$Mutable;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)V
      intermediary method_27401 Lnet/minecraft/class_5141;method_27401(Lnet/minecraft/class_3746;Ljava/util/function/BiConsumer;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338$class_2339;Lnet/minecraft/class_4643;)V
      official a Lelj;a(Ldgp;Ljava/util/function/BiConsumer;Lazh;Lji$a;Leiz;)V
    • canReplace Link icon

      protected boolean canReplace(TestableWorld world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named canReplace Lnet/minecraft/world/gen/trunk/TrunkPlacer;canReplace(Lnet/minecraft/world/TestableWorld;Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_43196 Lnet/minecraft/class_5141;method_43196(Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z
      official a Lelj;a(Ldgp;Lji;)Z
    • canReplaceOrIsLog Link icon

      public boolean canReplaceOrIsLog(TestableWorld world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named canReplaceOrIsLog Lnet/minecraft/world/gen/trunk/TrunkPlacer;canReplaceOrIsLog(Lnet/minecraft/world/TestableWorld;Lnet/minecraft/util/math/BlockPos;)Z
      intermediary method_43198 Lnet/minecraft/class_5141;method_43198(Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z
      official b Lelj;b(Ldgp;Lji;)Z