Class AbstractTrunkPlacer
- java.lang.Object
-
- net.minecraft.world.gen.trunkplacer.AbstractTrunkPlacer
-
- Direct Known Subclasses:
DarkOakTrunkPlacer
,FancyTrunkPlacer
,ForkyTrunkPlacer
,GiantTrunkPlacer
,StraightTrunkPlacer
public abstract class AbstractTrunkPlacer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
baseHeight
static com.mojang.serialization.Codec<AbstractTrunkPlacer>
CODEC
protected int
heightRandA
protected int
heightRandB
-
Constructor Summary
Constructors Constructor Description AbstractTrunkPlacer(int p_i232060_1_, int p_i232060_2_, int p_i232060_3_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
getTreeHeight(java.util.Random p_236917_1_)
private static boolean
isDirt(IWorldGenerationBaseReader p_236912_0_, BlockPos p_236912_1_)
protected static boolean
placeLog(IWorldGenerationReader p_236911_0_, java.util.Random p_236911_1_, BlockPos p_236911_2_, java.util.Set<BlockPos> p_236911_3_, MutableBoundingBox p_236911_4_, BaseTreeFeatureConfig p_236911_5_)
protected static void
placeLogIfFree(IWorldGenerationReader p_236910_0_, java.util.Random p_236910_1_, BlockPos.Mutable p_236910_2_, java.util.Set<BlockPos> p_236910_3_, MutableBoundingBox p_236910_4_, BaseTreeFeatureConfig p_236910_5_)
abstract java.util.List<FoliagePlacer.Foliage>
placeTrunk(IWorldGenerationReader p_230382_1_, java.util.Random p_230382_2_, int p_230382_3_, BlockPos p_230382_4_, java.util.Set<BlockPos> p_230382_5_, MutableBoundingBox p_230382_6_, BaseTreeFeatureConfig p_230382_7_)
protected static void
setBlock(IWorldWriter p_236913_0_, BlockPos p_236913_1_, BlockState p_236913_2_, MutableBoundingBox p_236913_3_)
protected static void
setDirtAt(IWorldGenerationReader p_236909_0_, BlockPos p_236909_1_)
protected static <P extends AbstractTrunkPlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,java.lang.Integer,java.lang.Integer,java.lang.Integer>trunkPlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_236915_0_)
protected abstract TrunkPlacerType<?>
type()
-
-
-
Field Detail
-
CODEC
public static final com.mojang.serialization.Codec<AbstractTrunkPlacer> CODEC
-
baseHeight
protected final int baseHeight
-
heightRandA
protected final int heightRandA
-
heightRandB
protected final int heightRandB
-
-
Method Detail
-
trunkPlacerParts
protected static <P extends AbstractTrunkPlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,java.lang.Integer,java.lang.Integer,java.lang.Integer> trunkPlacerParts(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> p_236915_0_)
-
type
protected abstract TrunkPlacerType<?> type()
-
placeTrunk
public abstract java.util.List<FoliagePlacer.Foliage> placeTrunk(IWorldGenerationReader p_230382_1_, java.util.Random p_230382_2_, int p_230382_3_, BlockPos p_230382_4_, java.util.Set<BlockPos> p_230382_5_, MutableBoundingBox p_230382_6_, BaseTreeFeatureConfig p_230382_7_)
-
getTreeHeight
public int getTreeHeight(java.util.Random p_236917_1_)
-
setBlock
protected static void setBlock(IWorldWriter p_236913_0_, BlockPos p_236913_1_, BlockState p_236913_2_, MutableBoundingBox p_236913_3_)
-
isDirt
private static boolean isDirt(IWorldGenerationBaseReader p_236912_0_, BlockPos p_236912_1_)
-
setDirtAt
protected static void setDirtAt(IWorldGenerationReader p_236909_0_, BlockPos p_236909_1_)
-
placeLog
protected static boolean placeLog(IWorldGenerationReader p_236911_0_, java.util.Random p_236911_1_, BlockPos p_236911_2_, java.util.Set<BlockPos> p_236911_3_, MutableBoundingBox p_236911_4_, BaseTreeFeatureConfig p_236911_5_)
-
placeLogIfFree
protected static void placeLogIfFree(IWorldGenerationReader p_236910_0_, java.util.Random p_236910_1_, BlockPos.Mutable p_236910_2_, java.util.Set<BlockPos> p_236910_3_, MutableBoundingBox p_236910_4_, BaseTreeFeatureConfig p_236910_5_)
-
-