类 TrunkPlacer
java.lang.Object
net.minecraft.world.level.levelgen.feature.trunkplacers.TrunkPlacer
- 直接已知子类:
BendingTrunkPlacer
,CherryTrunkPlacer
,DarkOakTrunkPlacer
,FancyTrunkPlacer
,ForkingTrunkPlacer
,GiantTrunkPlacer
,StraightTrunkPlacer
,UpwardsBranchingTrunkPlacer
-
字段概要
字段修饰符和类型字段说明protected final int
static final com.mojang.serialization.Codec<TrunkPlacer>
protected final int
protected final int
private static final int
static final int
private static final int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明int
getTreeHeight
(RandomSource pRandom) private static boolean
isDirt
(LevelSimulatedReader pLevel, BlockPos pPos) boolean
isFree
(LevelSimulatedReader pLevel, BlockPos pPos) protected boolean
placeLog
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig) protected boolean
placeLog
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig, Function<BlockState, BlockState> pPropertySetter) protected void
placeLogIfFree
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos.MutableBlockPos pPos, TreeConfiguration pConfig) abstract List<FoliagePlacer.FoliageAttachment>
placeTrunk
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, BlockPos pPos, TreeConfiguration pConfig) protected static void
setDirtAt
(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig) protected static <P extends TrunkPlacer>
com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer, Integer, Integer> trunkPlacerParts
(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> pInstance) protected abstract TrunkPlacerType<?>
type()
protected boolean
validTreePos
(LevelSimulatedReader pLevel, BlockPos pPos)
-
字段详细资料
-
CODEC
-
MAX_BASE_HEIGHT
private static final int MAX_BASE_HEIGHT- 另请参阅:
-
MAX_RAND
private static final int MAX_RAND- 另请参阅:
-
MAX_HEIGHT
public static final int MAX_HEIGHT- 另请参阅:
-
baseHeight
protected final int baseHeight -
heightRandA
protected final int heightRandA -
heightRandB
protected final int heightRandB
-
-
构造器详细资料
-
TrunkPlacer
public TrunkPlacer(int pBaseHeight, int pHeightRandA, int pHeightRandB)
-
-
方法详细资料
-
trunkPlacerParts
protected static <P extends TrunkPlacer> com.mojang.datafixers.Products.P3<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<P>,Integer, trunkPlacerPartsInteger, Integer> (com.mojang.serialization.codecs.RecordCodecBuilder.Instance<P> pInstance) -
type
-
placeTrunk
public abstract List<FoliagePlacer.FoliageAttachment> placeTrunk(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, int pFreeTreeHeight, BlockPos pPos, TreeConfiguration pConfig) -
getTreeHeight
-
isDirt
-
setDirtAt
protected static void setDirtAt(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig) -
placeLog
protected boolean placeLog(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig) -
placeLog
protected boolean placeLog(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos pPos, TreeConfiguration pConfig, Function<BlockState, BlockState> pPropertySetter) -
placeLogIfFree
protected void placeLogIfFree(LevelSimulatedReader pLevel, BiConsumer<BlockPos, BlockState> pBlockSetter, RandomSource pRandom, BlockPos.MutableBlockPos pPos, TreeConfiguration pConfig) -
validTreePos
-
isFree
-