Skip to content

Package net.minecraft.world.level.levelgen.placement

Part 1/1


BiomeFilter

  • Full name: net.minecraft.world.level.levelgen.placement.BiomeFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/BiomeFilter.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementFilter

net.minecraft.world.level.levelgen.placement.BiomeFilter#biome()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BiomeFilter.java:16
  • Modifiers: public static
  • Return: BiomeFilter

คืออะไร

ดำเนินการ biome ตาม implementation ของ BiomeFilter

ทำงานยังไง

คืนค่า: INSTANCE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BiomeFilter result = BiomeFilter.biome();

net.minecraft.world.level.levelgen.placement.BiomeFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BiomeFilter.java:20
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

เรียกต่อ: topFeature(), orElseThrow(), getLevel(), getBiome(), generator(), getBiomeGenerationSettings(), hasFeature(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: placementContext.generator().getBiomeGenerationSettings(holder).hasFeature(placedFeature).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.BiomeFilter#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BiomeFilter.java:28
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ BiomeFilter

ทำงานยังไง

คืนค่า: PlacementModifierType.BIOME_FILTER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BiomeFilter instance = ...;
PlacementModifierType<?> result = instance.type();

BlockPredicateFilter

  • Full name: net.minecraft.world.level.levelgen.placement.BlockPredicateFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/BlockPredicateFilter.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementFilter

net.minecraft.world.level.levelgen.placement.BlockPredicateFilter#forPredicate(BlockPredicate)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BlockPredicateFilter.java:20
  • Modifiers: public static
  • Return: BlockPredicateFilter

คืออะไร

ดำเนินการ forPredicate ตาม implementation ของ BlockPredicateFilter

ทำงานยังไง

สร้างออบเจ็กต์: BlockPredicateFilter. คืนค่า: new BlockPredicateFilter(blockPredicate).

Parameters

  • BlockPredicate blockPredicate

ตัวอย่างใช้งาน

BlockPredicate blockPredicate = ...;
BlockPredicateFilter result = BlockPredicateFilter.forPredicate(blockPredicate);

net.minecraft.world.level.levelgen.placement.BlockPredicateFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BlockPredicateFilter.java:24
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

เรียกต่อ: test(), getLevel(). คืนค่า: this.predicate.test(placementContext.getLevel(), blockPos).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.BlockPredicateFilter#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/BlockPredicateFilter.java:29
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ BlockPredicateFilter

ทำงานยังไง

คืนค่า: PlacementModifierType.BLOCK_PREDICATE_FILTER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

BlockPredicateFilter instance = ...;
PlacementModifierType<?> result = instance.type();

CaveSurface

  • Full name: net.minecraft.world.level.levelgen.placement.CaveSurface
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/CaveSurface.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.world.level.levelgen.placement.CaveSurface#getDirection()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CaveSurface.java:22
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Direction

ทำงานยังไง

คืนค่า: this.direction.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CaveSurface instance = ...;
Direction result = instance.getDirection();

net.minecraft.world.level.levelgen.placement.CaveSurface#getSerializedName()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CaveSurface.java:30
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.id.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CaveSurface instance = ...;
String result = instance.getSerializedName();

net.minecraft.world.level.levelgen.placement.CaveSurface#getY()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CaveSurface.java:26
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Y

ทำงานยังไง

คืนค่า: this.y.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CaveSurface instance = ...;
int result = instance.getY();

CountOnEveryLayerPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.CountOnEveryLayerPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/CountOnEveryLayerPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.CountOnEveryLayerPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountOnEveryLayerPlacement.java:33
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: builder(), sample(), nextInt(), getX(), getZ(), getHeight(), findOnGroundYPosition(), add(). สร้างออบเจ็กต์: BlockPos. คืนค่า: builder.build().

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

CountOnEveryLayerPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.CountOnEveryLayerPlacement#of(int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountOnEveryLayerPlacement.java:29
  • Modifiers: public static
  • Return: CountOnEveryLayerPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ CountOnEveryLayerPlacement

ทำงานยังไง

คืนค่า: of(ConstantInt.of(i)).

Parameters

  • int i

ตัวอย่างใช้งาน

CountOnEveryLayerPlacement result = CountOnEveryLayerPlacement.of(0);

net.minecraft.world.level.levelgen.placement.CountOnEveryLayerPlacement#of(IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountOnEveryLayerPlacement.java:25
  • Modifiers: public static
  • Return: CountOnEveryLayerPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ CountOnEveryLayerPlacement

ทำงานยังไง

สร้างออบเจ็กต์: CountOnEveryLayerPlacement. คืนค่า: new CountOnEveryLayerPlacement(intProvider).

Parameters

  • IntProvider intProvider

ตัวอย่างใช้งาน

IntProvider intProvider = ...;
CountOnEveryLayerPlacement result = CountOnEveryLayerPlacement.of(intProvider);

net.minecraft.world.level.levelgen.placement.CountOnEveryLayerPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountOnEveryLayerPlacement.java:59
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ CountOnEveryLayerPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.COUNT_ON_EVERY_LAYER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CountOnEveryLayerPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

CountPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.CountPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/CountPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: RepeatingPlacement

net.minecraft.world.level.levelgen.placement.CountPlacement#count(RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountPlacement.java:27
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ CountPlacement

ทำงานยังไง

เรียกต่อ: sample(). คืนค่า: this.count.sample(randomSource).

Parameters

  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected int count(RandomSource randomSource, BlockPos blockPos) {
    return super.count(randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.CountPlacement#of(int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountPlacement.java:23
  • Modifiers: public static
  • Return: CountPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ CountPlacement

ทำงานยังไง

คืนค่า: of(ConstantInt.of(i)).

Parameters

  • int i

ตัวอย่างใช้งาน

CountPlacement result = CountPlacement.of(0);

net.minecraft.world.level.levelgen.placement.CountPlacement#of(IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountPlacement.java:19
  • Modifiers: public static
  • Return: CountPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ CountPlacement

ทำงานยังไง

สร้างออบเจ็กต์: CountPlacement. คืนค่า: new CountPlacement(intProvider).

Parameters

  • IntProvider intProvider

ตัวอย่างใช้งาน

IntProvider intProvider = ...;
CountPlacement result = CountPlacement.of(intProvider);

net.minecraft.world.level.levelgen.placement.CountPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/CountPlacement.java:32
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ CountPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.COUNT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

CountPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

EnvironmentScanPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/EnvironmentScanPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/EnvironmentScanPlacement.java:45
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: mutable(), getLevel(), test(), of(), move(), isOutsideBuildHeight(), getY(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

EnvironmentScanPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement#scanningFor(Direction,BlockPredicate,BlockPredicate,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/EnvironmentScanPlacement.java:37
  • Modifiers: public static
  • Return: EnvironmentScanPlacement

คืออะไร

ดำเนินการ scanningFor ตาม implementation ของ EnvironmentScanPlacement

ทำงานยังไง

สร้างออบเจ็กต์: EnvironmentScanPlacement. คืนค่า: new EnvironmentScanPlacement(direction, blockPredicate, blockPredicate2, i).

Parameters

  • Direction direction
  • BlockPredicate blockPredicate
  • BlockPredicate blockPredicate2
  • int i

ตัวอย่างใช้งาน

Direction direction = ...;
BlockPredicate blockPredicate = ...;
BlockPredicate blockPredicate2 = ...;
EnvironmentScanPlacement result = EnvironmentScanPlacement.scanningFor(direction, blockPredicate, blockPredicate2, 0);

net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement#scanningFor(Direction,BlockPredicate,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/EnvironmentScanPlacement.java:41
  • Modifiers: public static
  • Return: EnvironmentScanPlacement

คืออะไร

ดำเนินการ scanningFor ตาม implementation ของ EnvironmentScanPlacement

ทำงานยังไง

เรียกต่อ: alwaysTrue(). คืนค่า: scanningFor(direction, blockPredicate, BlockPredicate.alwaysTrue(), i).

Parameters

  • Direction direction
  • BlockPredicate blockPredicate
  • int i

ตัวอย่างใช้งาน

Direction direction = ...;
BlockPredicate blockPredicate = ...;
EnvironmentScanPlacement result = EnvironmentScanPlacement.scanningFor(direction, blockPredicate, 0);

net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/EnvironmentScanPlacement.java:71
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ EnvironmentScanPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.ENVIRONMENT_SCAN.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

EnvironmentScanPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

FixedPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.FixedPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/FixedPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.FixedPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/FixedPlacement.java:26
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: blockToSectionCoord(), getX(), getZ(), isSameChunk(), empty(), stream(), filter(). คืนค่า: !bl ? Stream.empty() : this.positions.stream().filter(blockPosx -> isSameChunk(i, j, blockPosx)).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

FixedPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.FixedPlacement#of(BlockPos[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/FixedPlacement.java:18
  • Modifiers: public static
  • Return: FixedPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ FixedPlacement

ทำงานยังไง

สร้างออบเจ็กต์: FixedPlacement. คืนค่า: new FixedPlacement(List.of(blockPoss)).

Parameters

  • BlockPos[] blockPoss

ตัวอย่างใช้งาน

BlockPos[] blockPoss = ...;
FixedPlacement result = FixedPlacement.of(blockPoss);

net.minecraft.world.level.levelgen.placement.FixedPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/FixedPlacement.java:46
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ FixedPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.FIXED_PLACEMENT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

FixedPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

HeightmapPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.HeightmapPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/HeightmapPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.HeightmapPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightmapPlacement.java:25
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: getX(), getZ(), getHeight(), getMinY(), of(). สร้างออบเจ็กต์: BlockPos. คืนค่า: k > placementContext.getMinY() ? Stream.of(new BlockPos(i, k, j)) : Stream.of().

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

HeightmapPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.HeightmapPlacement#onHeightmap(Heightmap.Types)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightmapPlacement.java:21
  • Modifiers: public static
  • Return: HeightmapPlacement

คืออะไร

จัดการเหตุการณ์ Heightmap

ทำงานยังไง

สร้างออบเจ็กต์: HeightmapPlacement. คืนค่า: new HeightmapPlacement(types).

Parameters

  • Heightmap.Types types

ตัวอย่างใช้งาน

Heightmap.Types types = ...;
HeightmapPlacement result = HeightmapPlacement.onHeightmap(types);

net.minecraft.world.level.levelgen.placement.HeightmapPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightmapPlacement.java:33
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ HeightmapPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.HEIGHTMAP.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

HeightmapPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

HeightRangePlacement

  • Full name: net.minecraft.world.level.levelgen.placement.HeightRangePlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/HeightRangePlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.HeightRangePlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightRangePlacement.java:36
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: of(), atY(), sample(). คืนค่า: Stream.of(blockPos.atY(this.height.sample(randomSource, placementContext))).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

HeightRangePlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.HeightRangePlacement#of(HeightProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightRangePlacement.java:24
  • Modifiers: public static
  • Return: HeightRangePlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ HeightRangePlacement

ทำงานยังไง

สร้างออบเจ็กต์: HeightRangePlacement. คืนค่า: new HeightRangePlacement(heightProvider).

Parameters

  • HeightProvider heightProvider

ตัวอย่างใช้งาน

HeightProvider heightProvider = ...;
HeightRangePlacement result = HeightRangePlacement.of(heightProvider);

net.minecraft.world.level.levelgen.placement.HeightRangePlacement#triangle(VerticalAnchor,VerticalAnchor)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightRangePlacement.java:32
  • Modifiers: public static
  • Return: HeightRangePlacement

คืออะไร

ดำเนินการ triangle ตาม implementation ของ HeightRangePlacement

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: of(TrapezoidHeight.of(verticalAnchor, verticalAnchor2)).

Parameters

  • VerticalAnchor verticalAnchor
  • VerticalAnchor verticalAnchor2

ตัวอย่างใช้งาน

VerticalAnchor verticalAnchor = ...;
VerticalAnchor verticalAnchor2 = ...;
HeightRangePlacement result = HeightRangePlacement.triangle(verticalAnchor, verticalAnchor2);

net.minecraft.world.level.levelgen.placement.HeightRangePlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightRangePlacement.java:41
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ HeightRangePlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.HEIGHT_RANGE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

HeightRangePlacement instance = ...;
PlacementModifierType<?> result = instance.type();

net.minecraft.world.level.levelgen.placement.HeightRangePlacement#uniform(VerticalAnchor,VerticalAnchor)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/HeightRangePlacement.java:28
  • Modifiers: public static
  • Return: HeightRangePlacement

คืออะไร

ดำเนินการ uniform ตาม implementation ของ HeightRangePlacement

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: of(UniformHeight.of(verticalAnchor, verticalAnchor2)).

Parameters

  • VerticalAnchor verticalAnchor
  • VerticalAnchor verticalAnchor2

ตัวอย่างใช้งาน

VerticalAnchor verticalAnchor = ...;
VerticalAnchor verticalAnchor2 = ...;
HeightRangePlacement result = HeightRangePlacement.uniform(verticalAnchor, verticalAnchor2);

InSquarePlacement

  • Full name: net.minecraft.world.level.levelgen.placement.InSquarePlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/InSquarePlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.InSquarePlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/InSquarePlacement.java:16
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: nextInt(), getX(), getZ(), of(), getY(). สร้างออบเจ็กต์: BlockPos. คืนค่า: Stream.of(new BlockPos(i, blockPos.getY(), j)).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

InSquarePlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.InSquarePlacement#spread()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/InSquarePlacement.java:12
  • Modifiers: public static
  • Return: InSquarePlacement

คืออะไร

ดำเนินการ spread ตาม implementation ของ InSquarePlacement

ทำงานยังไง

คืนค่า: INSTANCE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

InSquarePlacement result = InSquarePlacement.spread();

net.minecraft.world.level.levelgen.placement.InSquarePlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/InSquarePlacement.java:23
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ InSquarePlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.IN_SQUARE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

InSquarePlacement instance = ...;
PlacementModifierType<?> result = instance.type();

NoiseBasedCountPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.NoiseBasedCountPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/NoiseBasedCountPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: RepeatingPlacement

net.minecraft.world.level.levelgen.placement.NoiseBasedCountPlacement#count(RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseBasedCountPlacement.java:33
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ NoiseBasedCountPlacement

ทำงานยังไง

เรียกต่อ: getValue(), getX(), getZ(), ceil(). คืนค่า: (int)Math.ceil((d + this.noiseOffset) * this.noiseToCountRatio).

Parameters

  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected int count(RandomSource randomSource, BlockPos blockPos) {
    return super.count(randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.NoiseBasedCountPlacement#of(int,double,double)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseBasedCountPlacement.java:29
  • Modifiers: public static
  • Return: NoiseBasedCountPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ NoiseBasedCountPlacement

ทำงานยังไง

สร้างออบเจ็กต์: NoiseBasedCountPlacement. คืนค่า: new NoiseBasedCountPlacement(i, d, e).

Parameters

  • int i
  • double d
  • double e

ตัวอย่างใช้งาน

NoiseBasedCountPlacement result = NoiseBasedCountPlacement.of(0, 0.0D, 0.0D);

net.minecraft.world.level.levelgen.placement.NoiseBasedCountPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseBasedCountPlacement.java:39
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ NoiseBasedCountPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.NOISE_BASED_COUNT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

NoiseBasedCountPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

NoiseThresholdCountPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.NoiseThresholdCountPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/NoiseThresholdCountPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: RepeatingPlacement

net.minecraft.world.level.levelgen.placement.NoiseThresholdCountPlacement#count(RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseThresholdCountPlacement.java:33
  • Modifiers: protected
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ NoiseThresholdCountPlacement

ทำงานยังไง

เรียกต่อ: getValue(), getX(), getZ(). คืนค่า: d < this.noiseLevel ? this.belowNoise : this.aboveNoise.

Parameters

  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected int count(RandomSource randomSource, BlockPos blockPos) {
    return super.count(randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.NoiseThresholdCountPlacement#of(double,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseThresholdCountPlacement.java:29
  • Modifiers: public static
  • Return: NoiseThresholdCountPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ NoiseThresholdCountPlacement

ทำงานยังไง

สร้างออบเจ็กต์: NoiseThresholdCountPlacement. คืนค่า: new NoiseThresholdCountPlacement(d, i, j).

Parameters

  • double d
  • int i
  • int j

ตัวอย่างใช้งาน

NoiseThresholdCountPlacement result = NoiseThresholdCountPlacement.of(0.0D, 0, 0);

net.minecraft.world.level.levelgen.placement.NoiseThresholdCountPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/NoiseThresholdCountPlacement.java:39
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ NoiseThresholdCountPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.NOISE_THRESHOLD_COUNT.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

NoiseThresholdCountPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

PlacedFeature

  • Full name: net.minecraft.world.level.levelgen.placement.PlacedFeature
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/PlacedFeature.java
  • Type: record
  • Modifiers: public

net.minecraft.world.level.levelgen.placement.PlacedFeature#getFeatures()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacedFeature.java:58
  • Modifiers: public
  • Return: Stream<ConfiguredFeature<?, ?>>

คืออะไร

อ่านค่า Features

ทำงานยังไง

เรียกต่อ: value(). คืนค่า: this.feature.value().getFeatures().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacedFeature instance = ...;
Stream<ConfiguredFeature<?, ?>> result = instance.getFeatures();

net.minecraft.world.level.levelgen.placement.PlacedFeature#place(WorldGenLevel,ChunkGenerator,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacedFeature.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ place ตาม implementation ของ PlacedFeature

ทำงานยังไง

เรียกต่อ: placeWithContext(), empty(). สร้างออบเจ็กต์: PlacementContext. คืนค่า: this.placeWithContext(new PlacementContext(worldGenLevel, chunkGenerator, Optional.empty()), randomSource, blockPos).

Parameters

  • WorldGenLevel worldGenLevel
  • ChunkGenerator chunkGenerator
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacedFeature instance = ...;
WorldGenLevel worldGenLevel = ...;
ChunkGenerator chunkGenerator = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
boolean result = instance.place(worldGenLevel, chunkGenerator, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.PlacedFeature#placeWithBiomeCheck(WorldGenLevel,ChunkGenerator,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacedFeature.java:37
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ placeWithBiomeCheck ตาม implementation ของ PlacedFeature

ทำงานยังไง

เรียกต่อ: placeWithContext(), of(). สร้างออบเจ็กต์: PlacementContext. คืนค่า: this.placeWithContext(new PlacementContext(worldGenLevel, chunkGenerator, Optional.of(this)), randomSource, blockPos).

Parameters

  • WorldGenLevel worldGenLevel
  • ChunkGenerator chunkGenerator
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacedFeature instance = ...;
WorldGenLevel worldGenLevel = ...;
ChunkGenerator chunkGenerator = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
boolean result = instance.placeWithBiomeCheck(worldGenLevel, chunkGenerator, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.PlacedFeature#toString()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacedFeature.java:62
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ PlacedFeature

ทำงานยังไง

คืนค่า: "Placed " + this.feature.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacedFeature instance = ...;
String result = instance.toString();

PlacementContext

  • Full name: net.minecraft.world.level.levelgen.placement.PlacementContext
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/PlacementContext.java
  • Type: class
  • Modifiers: public
  • Extends: WorldGenerationContext

net.minecraft.world.level.levelgen.placement.PlacementContext#generator()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:50
  • Modifiers: public
  • Return: ChunkGenerator

คืออะไร

ดำเนินการ generator ตาม implementation ของ PlacementContext

ทำงานยังไง

คืนค่า: this.generator.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementContext instance = ...;
ChunkGenerator result = instance.generator();

net.minecraft.world.level.levelgen.placement.PlacementContext#getBlockState(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:34
  • Modifiers: public
  • Return: BlockState

คืออะไร

อ่านค่า Block State

ทำงานยังไง

คืนค่า: this.level.getBlockState(blockPos).

Parameters

  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext instance = ...;
BlockPos blockPos = ...;
BlockState result = instance.getBlockState(blockPos);

net.minecraft.world.level.levelgen.placement.PlacementContext#getCarvingMask(ChunkPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:30
  • Modifiers: public
  • Return: CarvingMask

คืออะไร

อ่านค่า Carving Mask

ทำงานยังไง

เรียกต่อ: getChunk(), getOrCreateCarvingMask(). คืนค่า: ((ProtoChunk)this.level.getChunk(chunkPos.x, chunkPos.z)).getOrCreateCarvingMask().

Parameters

  • ChunkPos chunkPos

ตัวอย่างใช้งาน

PlacementContext instance = ...;
ChunkPos chunkPos = ...;
CarvingMask result = instance.getCarvingMask(chunkPos);

net.minecraft.world.level.levelgen.placement.PlacementContext#getHeight(Heightmap.Types,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:26
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Height

ทำงานยังไง

คืนค่า: this.level.getHeight(types, i, j).

Parameters

  • Heightmap.Types types
  • int i
  • int j

ตัวอย่างใช้งาน

PlacementContext instance = ...;
Heightmap.Types types = ...;
int result = instance.getHeight(types, 0, 0);

net.minecraft.world.level.levelgen.placement.PlacementContext#getLevel()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:42
  • Modifiers: public
  • Return: WorldGenLevel

คืออะไร

อ่านค่า Level

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementContext instance = ...;
WorldGenLevel result = instance.getLevel();

net.minecraft.world.level.levelgen.placement.PlacementContext#getMinY()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:38
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Min Y

ทำงานยังไง

คืนค่า: this.level.getMinY().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementContext instance = ...;
int result = instance.getMinY();

net.minecraft.world.level.levelgen.placement.PlacementContext#PlacementContext(WorldGenLevel,ChunkGenerator,Optional<PlacedFeature>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ PlacementContext ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: level, generator, topFeature.

Parameters

  • WorldGenLevel worldGenLevel
  • ChunkGenerator chunkGenerator
  • Optional<PlacedFeature> optional

ตัวอย่างใช้งาน

WorldGenLevel worldGenLevel = ...;
ChunkGenerator chunkGenerator = ...;
Optional<PlacedFeature> optional = ...;
PlacementContext instance = new PlacementContext(worldGenLevel, chunkGenerator, optional);

net.minecraft.world.level.levelgen.placement.PlacementContext#topFeature()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementContext.java:46
  • Modifiers: public
  • Return: Optional<PlacedFeature>

คืออะไร

ดำเนินการ topFeature ตาม implementation ของ PlacementContext

ทำงานยังไง

คืนค่า: this.topFeature.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementContext instance = ...;
Optional<PlacedFeature> result = instance.topFeature();

PlacementFilter

  • Full name: net.minecraft.world.level.levelgen.placement.PlacementFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/PlacementFilter.java
  • Type: class
  • Modifiers: public abstract
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.PlacementFilter#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementFilter.java:8
  • Modifiers: public final
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: shouldPlace(), of(). คืนค่า: this.shouldPlace(placementContext, randomSource, blockPos) ? Stream.of(blockPos) : Stream.of().

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementFilter instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.PlacementFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementFilter.java:13
  • Modifiers: protected abstract
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

PlacementModifier

  • Full name: net.minecraft.world.level.levelgen.placement.PlacementModifier
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/PlacementModifier.java
  • Type: class
  • Modifiers: public abstract

net.minecraft.world.level.levelgen.placement.PlacementModifier#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementModifier.java:14
  • Modifiers: public abstract
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementModifier instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.PlacementModifier#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementModifier.java:16
  • Modifiers: public abstract
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ PlacementModifier

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementModifier instance = ...;
PlacementModifierType<?> result = instance.type();

PlacementModifierType

  • Full name: net.minecraft.world.level.levelgen.placement.PlacementModifierType
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/PlacementModifierType.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.levelgen.placement.PlacementModifierType#codec()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/PlacementModifierType.java:26
  • Modifiers: ``
  • Return: MapCodec<P>

คืออะไร

ดำเนินการ codec ตาม implementation ของ PlacementModifierType

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

PlacementModifierType instance = ...;
MapCodec<P> result = instance.codec();

RandomOffsetPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java:39
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: getX(), sample(), getY(), getZ(), of(). สร้างออบเจ็กต์: BlockPos. คืนค่า: Stream.of(new BlockPos(i, j, k)).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RandomOffsetPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement#horizontal(IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java:30
  • Modifiers: public static
  • Return: RandomOffsetPlacement

คืออะไร

ดำเนินการ horizontal ตาม implementation ของ RandomOffsetPlacement

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: RandomOffsetPlacement. คืนค่า: new RandomOffsetPlacement(intProvider, ConstantInt.of(0)).

Parameters

  • IntProvider intProvider

ตัวอย่างใช้งาน

IntProvider intProvider = ...;
RandomOffsetPlacement result = RandomOffsetPlacement.horizontal(intProvider);

net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement#of(IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java:22
  • Modifiers: public static
  • Return: RandomOffsetPlacement

คืออะไร

ดำเนินการ of ตาม implementation ของ RandomOffsetPlacement

ทำงานยังไง

สร้างออบเจ็กต์: RandomOffsetPlacement. คืนค่า: new RandomOffsetPlacement(intProvider, intProvider2).

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2

ตัวอย่างใช้งาน

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
RandomOffsetPlacement result = RandomOffsetPlacement.of(intProvider, intProvider2);

net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java:47
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ RandomOffsetPlacement

ทำงานยังไง

คืนค่า: PlacementModifierType.RANDOM_OFFSET.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RandomOffsetPlacement instance = ...;
PlacementModifierType<?> result = instance.type();

net.minecraft.world.level.levelgen.placement.RandomOffsetPlacement#vertical(IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RandomOffsetPlacement.java:26
  • Modifiers: public static
  • Return: RandomOffsetPlacement

คืออะไร

ดำเนินการ vertical ตาม implementation ของ RandomOffsetPlacement

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: RandomOffsetPlacement. คืนค่า: new RandomOffsetPlacement(ConstantInt.of(0), intProvider).

Parameters

  • IntProvider intProvider

ตัวอย่างใช้งาน

IntProvider intProvider = ...;
RandomOffsetPlacement result = RandomOffsetPlacement.vertical(intProvider);

RarityFilter

  • Full name: net.minecraft.world.level.levelgen.placement.RarityFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/RarityFilter.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementFilter

net.minecraft.world.level.levelgen.placement.RarityFilter#onAverageOnceEvery(int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RarityFilter.java:16
  • Modifiers: public static
  • Return: RarityFilter

คืออะไร

จัดการเหตุการณ์ Average Once Every

ทำงานยังไง

สร้างออบเจ็กต์: RarityFilter. คืนค่า: new RarityFilter(i).

Parameters

  • int i

ตัวอย่างใช้งาน

RarityFilter result = RarityFilter.onAverageOnceEvery(0);

net.minecraft.world.level.levelgen.placement.RarityFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RarityFilter.java:20
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

เรียกต่อ: nextFloat(). คืนค่า: randomSource.nextFloat() < 1.0F / this.chance.

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.RarityFilter#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RarityFilter.java:25
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ RarityFilter

ทำงานยังไง

คืนค่า: PlacementModifierType.RARITY_FILTER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

RarityFilter instance = ...;
PlacementModifierType<?> result = instance.type();

RepeatingPlacement

  • Full name: net.minecraft.world.level.levelgen.placement.RepeatingPlacement
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/RepeatingPlacement.java
  • Type: class
  • Modifiers: public abstract
  • Extends: PlacementModifier

net.minecraft.world.level.levelgen.placement.RepeatingPlacement#count(RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RepeatingPlacement.java:9
  • Modifiers: protected abstract
  • Return: int

คืออะไร

ดำเนินการ count ตาม implementation ของ RepeatingPlacement

ทำงานยังไง

ไม่มี implementation ใน declaration นี้; คลาสลูก/implementation เป็นผู้กำหนดพฤติกรรมจริง

Parameters

  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected int count(RandomSource randomSource, BlockPos blockPos) {
    return super.count(randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.RepeatingPlacement#getPositions(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/RepeatingPlacement.java:11
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

อ่านค่า Positions

ทำงานยังไง

เรียกต่อ: range(), count(), mapToObj(). คืนค่า: IntStream.range(0, this.count(randomSource, blockPos)).mapToObj(i -> blockPos).

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

RepeatingPlacement instance = ...;
PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
Stream<BlockPos> result = instance.getPositions(placementContext, randomSource, blockPos);

SurfaceRelativeThresholdFilter

  • Full name: net.minecraft.world.level.levelgen.placement.SurfaceRelativeThresholdFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementFilter

net.minecraft.world.level.levelgen.placement.SurfaceRelativeThresholdFilter#of(Heightmap.Types,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java:29
  • Modifiers: public static
  • Return: SurfaceRelativeThresholdFilter

คืออะไร

ดำเนินการ of ตาม implementation ของ SurfaceRelativeThresholdFilter

ทำงานยังไง

สร้างออบเจ็กต์: SurfaceRelativeThresholdFilter. คืนค่า: new SurfaceRelativeThresholdFilter(types, i, j).

Parameters

  • Heightmap.Types types
  • int i
  • int j

ตัวอย่างใช้งาน

Heightmap.Types types = ...;
SurfaceRelativeThresholdFilter result = SurfaceRelativeThresholdFilter.of(types, 0, 0);

net.minecraft.world.level.levelgen.placement.SurfaceRelativeThresholdFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java:33
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

เรียกต่อ: getHeight(), getX(), getZ(), getY(). คืนค่า: m <= blockPos.getY() && blockPos.getY() <= n.

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.SurfaceRelativeThresholdFilter#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceRelativeThresholdFilter.java:41
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ SurfaceRelativeThresholdFilter

ทำงานยังไง

คืนค่า: PlacementModifierType.SURFACE_RELATIVE_THRESHOLD_FILTER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SurfaceRelativeThresholdFilter instance = ...;
PlacementModifierType<?> result = instance.type();

SurfaceWaterDepthFilter

  • Full name: net.minecraft.world.level.levelgen.placement.SurfaceWaterDepthFilter
  • Package: net.minecraft.world.level.levelgen.placement
  • Source: commonnet/minecraft/world/level/levelgen/placement/SurfaceWaterDepthFilter.java
  • Type: class
  • Modifiers: public
  • Extends: PlacementFilter

net.minecraft.world.level.levelgen.placement.SurfaceWaterDepthFilter#forMaxDepth(int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceWaterDepthFilter.java:21
  • Modifiers: public static
  • Return: SurfaceWaterDepthFilter

คืออะไร

ดำเนินการ forMaxDepth ตาม implementation ของ SurfaceWaterDepthFilter

ทำงานยังไง

สร้างออบเจ็กต์: SurfaceWaterDepthFilter. คืนค่า: new SurfaceWaterDepthFilter(i).

Parameters

  • int i

ตัวอย่างใช้งาน

SurfaceWaterDepthFilter result = SurfaceWaterDepthFilter.forMaxDepth(0);

net.minecraft.world.level.levelgen.placement.SurfaceWaterDepthFilter#shouldPlace(PlacementContext,RandomSource,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceWaterDepthFilter.java:25
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Place

ทำงานยังไง

เรียกต่อ: getHeight(), getX(), getZ(). คืนค่า: j - i <= this.maxWaterDepth.

Parameters

  • PlacementContext placementContext
  • RandomSource randomSource
  • BlockPos blockPos

ตัวอย่างใช้งาน

PlacementContext placementContext = ...;
RandomSource randomSource = ...;
BlockPos blockPos = ...;
@Override
protected boolean shouldPlace(PlacementContext placementContext, RandomSource randomSource, BlockPos blockPos) {
    return super.shouldPlace(placementContext, randomSource, blockPos);
}

net.minecraft.world.level.levelgen.placement.SurfaceWaterDepthFilter#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/placement/SurfaceWaterDepthFilter.java:32
  • Modifiers: public
  • Return: PlacementModifierType<?>

คืออะไร

ดำเนินการ type ตาม implementation ของ SurfaceWaterDepthFilter

ทำงานยังไง

คืนค่า: PlacementModifierType.SURFACE_WATER_DEPTH_FILTER.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SurfaceWaterDepthFilter instance = ...;
PlacementModifierType<?> result = instance.type();