Package net.minecraft.world.gen.trunk
Class TrunkPlacer
java.lang.Object
net.minecraft.world.gen.trunk.TrunkPlacer
- Direct Known Subclasses:
DarkOakTrunkPlacer,ForkingTrunkPlacer,GiantTrunkPlacer,LargeOakTrunkPlacer,StraightTrunkPlacer
public abstract class TrunkPlacer extends Object
- Mappings:
Namespace Name official cuointermediary net/minecraft/class_5141named net/minecraft/world/gen/trunk/TrunkPlacer
-
Field Summary
Fields Modifier and Type Field Description protected intbaseHeightstatic com.mojang.serialization.Codec<TrunkPlacer>CODECprotected intfirstRandomHeightprotected intsecondRandomHeight -
Constructor Summary
Constructors Constructor Description TrunkPlacer(int baseHeight, int firstRandomHeight, int secondRandomHeight) -
Method Summary
Modifier and Type Method Description private static booleancanGenerate(TestableWorld world, BlockPos pos)abstract List<FoliagePlacer.TreeNode>generate(ModifiableTestableWorld world, Random random, int trunkHeight, BlockPos pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)Generates the trunk blocks and return a list of tree nodes to place foliage aroundprotected static booleangetAndSetState(ModifiableTestableWorld world, Random random, BlockPos pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)intgetHeight(Random random)protected abstract TrunkPlacerType<?>getType()protected static <P extends TrunkPlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer>method_28904(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)protected static voidsetBlockState(ModifiableWorld world, BlockPos pos, BlockState state, BlockBox box)protected static voidsetToDirt(ModifiableTestableWorld world, BlockPos pos)protected static voidtrySetState(ModifiableTestableWorld world, Random random, BlockPos.Mutable pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official cLcuo;c:Lcom/mojang/serialization/Codec;intermediary field_24972Lnet/minecraft/class_5141;field_24972:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/world/gen/trunk/TrunkPlacer;CODEC:Lcom/mojang/serialization/Codec;
-
baseHeight
protected final int baseHeight- Mappings:
Namespace Name Mixin selector official dLcuo;d: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 eLcuo;e: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 fLcuo;f: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>Lcuo;<init>(III)Vintermediary <init>Lnet/minecraft/class_5141;<init>(III)Vnamed <init>Lnet/minecraft/world/gen/trunk/TrunkPlacer;<init>(III)V
-
-
Method Details
-
method_28904
protected static <P extends TrunkPlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer,Integer,Integer> method_28904(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> instance)- Mappings:
Namespace Name Mixin selector official aLcuo;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 method_28904Lnet/minecraft/world/gen/trunk/TrunkPlacer;method_28904(Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/Products$P3;
-
getType
- Mappings:
Namespace Name Mixin selector official aLcuo;a()Lcup;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(ModifiableTestableWorld world, Random random, int trunkHeight, BlockPos pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)Generates the trunk blocks and return a list of tree nodes to place foliage around- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbua;Ljava/util/Random;ILfx;Ljava/util/Set;Lcwn;Lcsn;)Ljava/util/List;intermediary method_26991Lnet/minecraft/class_5141;method_26991(Lnet/minecraft/class_3747;Ljava/util/Random;ILnet/minecraft/class_2338;Ljava/util/Set;Lnet/minecraft/class_3341;Lnet/minecraft/class_4643;)Ljava/util/List;named generateLnet/minecraft/world/gen/trunk/TrunkPlacer;generate(Lnet/minecraft/world/ModifiableTestableWorld;Ljava/util/Random;ILnet/minecraft/util/math/BlockPos;Ljava/util/Set;Lnet/minecraft/util/math/BlockBox;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Ljava/util/List;
-
getHeight
- Mappings:
Namespace Name Mixin selector official aLcuo;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
-
setBlockState
protected static void setBlockState(ModifiableWorld world, BlockPos pos, BlockState state, BlockBox box)- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbud;Lfx;Lcht;Lcwn;)Vintermediary method_27404Lnet/minecraft/class_5141;method_27404(Lnet/minecraft/class_1945;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3341;)Vnamed setBlockStateLnet/minecraft/world/gen/trunk/TrunkPlacer;setBlockState(Lnet/minecraft/world/ModifiableWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockBox;)V
-
canGenerate
- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbub;Lfx;)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
- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbua;Lfx;)Vintermediary method_27400Lnet/minecraft/class_5141;method_27400(Lnet/minecraft/class_3747;Lnet/minecraft/class_2338;)Vnamed setToDirtLnet/minecraft/world/gen/trunk/TrunkPlacer;setToDirt(Lnet/minecraft/world/ModifiableTestableWorld;Lnet/minecraft/util/math/BlockPos;)V
-
getAndSetState
protected static boolean getAndSetState(ModifiableTestableWorld world, Random random, BlockPos pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbua;Ljava/util/Random;Lfx;Ljava/util/Set;Lcwn;Lcsn;)Zintermediary method_27402Lnet/minecraft/class_5141;method_27402(Lnet/minecraft/class_3747;Ljava/util/Random;Lnet/minecraft/class_2338;Ljava/util/Set;Lnet/minecraft/class_3341;Lnet/minecraft/class_4643;)Znamed getAndSetStateLnet/minecraft/world/gen/trunk/TrunkPlacer;getAndSetState(Lnet/minecraft/world/ModifiableTestableWorld;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;Ljava/util/Set;Lnet/minecraft/util/math/BlockBox;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)Z
-
trySetState
protected static void trySetState(ModifiableTestableWorld world, Random random, BlockPos.Mutable pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)- Mappings:
Namespace Name Mixin selector official aLcuo;a(Lbua;Ljava/util/Random;Lfx$a;Ljava/util/Set;Lcwn;Lcsn;)Vintermediary method_27401Lnet/minecraft/class_5141;method_27401(Lnet/minecraft/class_3747;Ljava/util/Random;Lnet/minecraft/class_2338$class_2339;Ljava/util/Set;Lnet/minecraft/class_3341;Lnet/minecraft/class_4643;)Vnamed trySetStateLnet/minecraft/world/gen/trunk/TrunkPlacer;trySetState(Lnet/minecraft/world/ModifiableTestableWorld;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos$Mutable;Ljava/util/Set;Lnet/minecraft/util/math/BlockBox;Lnet/minecraft/world/gen/feature/TreeFeatureConfig;)V
-