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 cuo
intermediary net/minecraft/class_5141
named net/minecraft/world/gen/trunk/TrunkPlacer
-
Field Summary
Fields Modifier and Type Field Description protected int
baseHeight
static com.mojang.serialization.Codec<TrunkPlacer>
CODEC
protected int
firstRandomHeight
protected int
secondRandomHeight
-
Constructor Summary
Constructors Constructor Description TrunkPlacer(int baseHeight, int firstRandomHeight, int secondRandomHeight)
-
Method Summary
Modifier and Type Method Description private static boolean
canGenerate(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 boolean
getAndSetState(ModifiableTestableWorld world, Random random, BlockPos pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)
int
getHeight(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 void
setBlockState(ModifiableWorld world, BlockPos pos, BlockState state, BlockBox box)
protected static void
setToDirt(ModifiableTestableWorld world, BlockPos pos)
protected static void
trySetState(ModifiableTestableWorld world, Random random, BlockPos.Mutable pos, Set<BlockPos> placedStates, BlockBox box, TreeFeatureConfig config)
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector official c
Lcuo;c:Lcom/mojang/serialization/Codec;
intermediary field_24972
Lnet/minecraft/class_5141;field_24972:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/world/gen/trunk/TrunkPlacer;CODEC:Lcom/mojang/serialization/Codec;
-
baseHeight
protected final int baseHeight- Mappings:
Namespace Name Mixin selector official d
Lcuo;d:I
intermediary field_23760
Lnet/minecraft/class_5141;field_23760:I
named baseHeight
Lnet/minecraft/world/gen/trunk/TrunkPlacer;baseHeight:I
-
firstRandomHeight
protected final int firstRandomHeight- Mappings:
Namespace Name Mixin selector official e
Lcuo;e:I
intermediary field_23761
Lnet/minecraft/class_5141;field_23761:I
named firstRandomHeight
Lnet/minecraft/world/gen/trunk/TrunkPlacer;firstRandomHeight:I
-
secondRandomHeight
protected final int secondRandomHeight- Mappings:
Namespace Name Mixin selector official f
Lcuo;f:I
intermediary field_23762
Lnet/minecraft/class_5141;field_23762:I
named secondRandomHeight
Lnet/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)V
intermediary <init>
Lnet/minecraft/class_5141;<init>(III)V
named <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 a
Lcuo;a(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;
named method_28904
Lnet/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 a
Lcuo;a()Lcup;
intermediary method_28903
Lnet/minecraft/class_5141;method_28903()Lnet/minecraft/class_5142;
named getType
Lnet/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 a
Lcuo;a(Lbua;Ljava/util/Random;ILfx;Ljava/util/Set;Lcwn;Lcsn;)Ljava/util/List;
intermediary method_26991
Lnet/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 generate
Lnet/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 a
Lcuo;a(Ljava/util/Random;)I
intermediary method_26993
Lnet/minecraft/class_5141;method_26993(Ljava/util/Random;)I
named getHeight
Lnet/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 a
Lcuo;a(Lbud;Lfx;Lcht;Lcwn;)V
intermediary method_27404
Lnet/minecraft/class_5141;method_27404(Lnet/minecraft/class_1945;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3341;)V
named setBlockState
Lnet/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 a
Lcuo;a(Lbub;Lfx;)Z
intermediary method_27403
Lnet/minecraft/class_5141;method_27403(Lnet/minecraft/class_3746;Lnet/minecraft/class_2338;)Z
named canGenerate
Lnet/minecraft/world/gen/trunk/TrunkPlacer;canGenerate(Lnet/minecraft/world/TestableWorld;Lnet/minecraft/util/math/BlockPos;)Z
-
setToDirt
- Mappings:
Namespace Name Mixin selector official a
Lcuo;a(Lbua;Lfx;)V
intermediary method_27400
Lnet/minecraft/class_5141;method_27400(Lnet/minecraft/class_3747;Lnet/minecraft/class_2338;)V
named setToDirt
Lnet/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 a
Lcuo;a(Lbua;Ljava/util/Random;Lfx;Ljava/util/Set;Lcwn;Lcsn;)Z
intermediary method_27402
Lnet/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;)Z
named getAndSetState
Lnet/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 a
Lcuo;a(Lbua;Ljava/util/Random;Lfx$a;Ljava/util/Set;Lcwn;Lcsn;)V
intermediary method_27401
Lnet/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;)V
named trySetState
Lnet/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
-