Skip to content

Package net.minecraft.world.level.levelgen.feature.foliageplacers

Part 1/1


AcaciaFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer#AcaciaFoliagePlacer(IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
AcaciaFoliagePlacer instance = new AcaciaFoliagePlacer(intProvider, intProvider2);

net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java:25
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

เรียกต่อ: doubleTrunk(), pos(), above(), placeLeavesRow(), radiusOffset().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java:44
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ AcaciaFoliagePlacer

ทำงานยังไง

คืนค่า: 0.

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

AcaciaFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java:49
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: j == 0 ? (i > 1 || k > 1) && i != 0 && k != 0 : i == l && k == l && l > 0.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.AcaciaFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/AcaciaFoliagePlacer.java:20
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.ACACIA_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

BlobFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#BlobFoliagePlacer(IntProvider,IntProvider,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:22
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: height.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • int i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
BlobFoliagePlacer instance = new BlobFoliagePlacer(intProvider, intProvider2, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#blobParts(Instance<P>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:18
  • Modifiers: protected static
  • Return: P3<Mu<P>, IntProvider, IntProvider, Integer>

คืออะไร

ดำเนินการ blobParts ตาม implementation ของ BlobFoliagePlacer

ทำงานยังไง

เรียกต่อ: foliagePlacerParts(), and(), intRange(), fieldOf(), forGetter(). คืนค่า: foliagePlacerParts(instance).and(Codec.intRange(0, 16).fieldOf("height").forGetter(blobFoliagePlacer -> blobFoliagePlacer.height)).

Parameters

  • Instance<P> instance

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

Instance<P> instance = ...;
@Override
protected P3<Mu<P>, IntProvider, IntProvider, Integer> blobParts(Instance<P> instance) {
    return super.blobParts(instance);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:32
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: max(), radiusOffset(), placeLeavesRow(), pos(), doubleTrunk().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:50
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ BlobFoliagePlacer

ทำงานยังไง

คืนค่า: this.height.

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

BlobFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:55
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

เรียกต่อ: nextInt(). คืนค่า: i == l && k == l && (randomSource.nextInt(2) == 0 || j == 0).

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.BlobFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BlobFoliagePlacer.java:27
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.BLOB_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

BushFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.BushFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/BushFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: BlobFoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.BushFoliagePlacer#BushFoliagePlacer(IntProvider,IntProvider,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BushFoliagePlacer.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • int i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
BushFoliagePlacer instance = new BushFoliagePlacer(intProvider, intProvider2, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.BushFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BushFoliagePlacer.java:22
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: radiusOffset(), placeLeavesRow(), pos(), doubleTrunk().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.BushFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BushFoliagePlacer.java:40
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

เรียกต่อ: nextInt(). คืนค่า: i == l && k == l && randomSource.nextInt(2) == 0.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.BushFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/BushFoliagePlacer.java:17
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.BUSH_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

CherryFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer#CherryFoliagePlacer(IntProvider,IntProvider,IntProvider,float,float,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java:32
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: height, wideBottomLayerHoleChance, cornerHoleChance, hangingLeavesChance, hangingLeavesExtensionChance.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • IntProvider intProvider3
  • float f
  • float g
  • float h
  • float i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
IntProvider intProvider3 = ...;
CherryFoliagePlacer instance = new CherryFoliagePlacer(intProvider, intProvider2, intProvider3, 0.0F, 0.0F, 0.0F, 0.0F);

net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java:46
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: doubleTrunk(), pos(), above(), radiusOffset(), placeLeavesRow(), placeLeavesRowWithHangingLeavesBelow().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java:76
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ CherryFoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

CherryFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java:81
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: nextFloat(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.CherryFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/CherryFoliagePlacer.java:41
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.CHERRY_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

DarkOakFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:25
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: pos(), above(), doubleTrunk(), placeLeavesRow(), nextBoolean().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#DarkOakFoliagePlacer(IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:16
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
DarkOakFoliagePlacer instance = new DarkOakFoliagePlacer(intProvider, intProvider2);

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:52
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ DarkOakFoliagePlacer

ทำงานยังไง

คืนค่า: 4.

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

DarkOakFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:62
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#shouldSkipLocationSigned(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:57
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location Signed

ทำงานยังไง

คืนค่า: j != 0 || !bl || i != -l && i < l || k != -l && k < l ? super.shouldSkipLocationSigned(randomSource, i, j, k, l, bl) : true.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocationSigned(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocationSigned(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.DarkOakFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/DarkOakFoliagePlacer.java:20
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.DARK_OAK_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

FancyFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/FancyFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: BlobFoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FancyFoliagePlacer.java:23
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: placeLeavesRow(), pos(), doubleTrunk().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer#FancyFoliagePlacer(IntProvider,IntProvider,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FancyFoliagePlacer.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • int i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
FancyFoliagePlacer instance = new FancyFoliagePlacer(intProvider, intProvider2, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FancyFoliagePlacer.java:41
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

เรียกต่อ: square(). คืนค่า: Mth.square(i + 0.5F) + Mth.square(k + 0.5F) > l * l.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FancyFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FancyFoliagePlacer.java:18
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.FANCY_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

FoliagePlacer

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

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:38
  • Modifiers: public
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

เรียกต่อ: offset().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k

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

FoliagePlacer instance = ...;
LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
instance.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, 0, foliageAttachment, 0, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:51
  • Modifiers: protected abstract
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

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

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:63
  • Modifiers: public abstract
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ FoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

FoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#FoliagePlacer(IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: radius, offset.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
FoliagePlacer instance = new FoliagePlacer(intProvider, intProvider2);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#foliagePlacerParts(Instance<P>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:24
  • Modifiers: protected static
  • Return: P2<Mu<P>, IntProvider, IntProvider>

คืออะไร

ดำเนินการ foliagePlacerParts ตาม implementation ของ FoliagePlacer

ทำงานยังไง

เรียกต่อ: group(), codec(), fieldOf(), forGetter().

Parameters

  • Instance<P> instance

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

Instance<P> instance = ...;
@Override
protected P2<Mu<P>, IntProvider, IntProvider> foliagePlacerParts(Instance<P> instance) {
    return super.foliagePlacerParts(instance);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#foliageRadius(RandomSource,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:65
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageRadius ตาม implementation ของ FoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i

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

FoliagePlacer instance = ...;
RandomSource randomSource = ...;
int result = instance.foliageRadius(randomSource, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#placeLeavesRow(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,BlockPos,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:89
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ placeLeavesRow ตาม implementation ของ FoliagePlacer

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: MutableBlockPos(), shouldSkipLocationSigned(), setWithOffset(), tryPlaceLeaf(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos.

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • BlockPos blockPos
  • int i
  • int j
  • boolean bl

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
BlockPos blockPos = ...;
@Override
protected void placeLeavesRow(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, BlockPos blockPos, int i, int j, boolean bl) {
    super.placeLeavesRow(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, blockPos, i, j, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#placeLeavesRowWithHangingLeavesBelow(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,BlockPos,int,int,boolean,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:112
  • Modifiers: protected final
  • Return: void

คืออะไร

ดำเนินการ placeLeavesRowWithHangingLeavesBelow ตาม implementation ของ FoliagePlacer

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: placeLeavesRow(), below(), MutableBlockPos(), getClockWise(), getAxisDirection(), setWithOffset(), move(), isSet(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos.

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • BlockPos blockPos
  • int i
  • int j
  • boolean bl
  • float f
  • float g

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
BlockPos blockPos = ...;
@Override
protected void placeLeavesRowWithHangingLeavesBelow(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, BlockPos blockPos, int i, int j, boolean bl, float f, float g) {
    super.placeLeavesRowWithHangingLeavesBelow(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, blockPos, i, j, bl, f, g);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:73
  • Modifiers: protected abstract
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#shouldSkipLocationSigned(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:75
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location Signed

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: min(), abs(), shouldSkipLocation(). คืนค่า: this.shouldSkipLocation(randomSource, m, j, n, l, bl).

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocationSigned(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocationSigned(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#tryPlaceLeaf(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:166
  • Modifiers: protected static
  • Return: boolean

คืออะไร

ดำเนินการ tryPlaceLeaf ตาม implementation ของ FoliagePlacer

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isStateAtPosition(), getValueOrElse(), validTreePos(), getState(), hasProperty(), setValue(), isFluidAtPosition(), isSourceOfType(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • BlockPos blockPos

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
BlockPos blockPos = ...;
@Override
protected boolean tryPlaceLeaf(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, BlockPos blockPos) {
    return super.tryPlaceLeaf(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, blockPos);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:36
  • Modifiers: protected abstract
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

FoliagePlacer$FoliageAttachment

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageAttachment
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java
  • Type: class
  • Modifiers: public static final

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageAttachment#doubleTrunk()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:208
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ doubleTrunk ตาม implementation ของ FoliagePlacer$FoliageAttachment

ทำงานยังไง

คืนค่า: this.doubleTrunk.

Parameters

  • ไม่มี

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

FoliagePlacer.FoliageAttachment instance = ...;
boolean result = instance.doubleTrunk();

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageAttachment#FoliageAttachment(BlockPos,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:194
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: pos, radiusOffset, doubleTrunk.

Parameters

  • BlockPos blockPos
  • int i
  • boolean bl

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

BlockPos blockPos = ...;
FoliagePlacer.FoliageAttachment instance = new FoliagePlacer.FoliageAttachment(blockPos, 0, true);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageAttachment#pos()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:200
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ pos ตาม implementation ของ FoliagePlacer$FoliageAttachment

ทำงานยังไง

คืนค่า: this.pos.

Parameters

  • ไม่มี

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

FoliagePlacer.FoliageAttachment instance = ...;
BlockPos result = instance.pos();

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageAttachment#radiusOffset()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:204
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ radiusOffset ตาม implementation ของ FoliagePlacer$FoliageAttachment

ทำงานยังไง

คืนค่า: this.radiusOffset.

Parameters

  • ไม่มี

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

FoliagePlacer.FoliageAttachment instance = ...;
int result = instance.radiusOffset();

FoliagePlacer$FoliageSetter

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageSetter
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java
  • Type: interface
  • Modifiers: public

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageSetter#isSet(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:216
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Set

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

FoliagePlacer.FoliageSetter instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isSet(blockPos);

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacer$FoliageSetter#set(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacer.java:214
  • Modifiers: ``
  • Return: void

คืออะไร

กำหนดค่า set

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

FoliagePlacer.FoliageSetter instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.set(blockPos, blockState);

FoliagePlacerType

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacerType
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacerType.java
  • Type: class
  • Modifiers: public

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacerType#codec()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacerType.java:31
  • Modifiers: public
  • Return: MapCodec<P>

คืออะไร

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

ทำงานยังไง

คืนค่า: this.codec.

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacerType#FoliagePlacerType(MapCodec<P>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/FoliagePlacerType.java:27
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: codec.

Parameters

  • MapCodec<P> mapCodec

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

MapCodec<P> mapCodec = ...;
FoliagePlacerType instance = new FoliagePlacerType(mapCodec);

MegaJungleFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java:29
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: doubleTrunk(), nextInt(), radiusOffset(), placeLeavesRow(), pos().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java:49
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ MegaJungleFoliagePlacer

ทำงานยังไง

คืนค่า: this.height.

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

MegaJungleFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer#MegaJungleFoliagePlacer(IntProvider,IntProvider,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: height.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • int i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
MegaJungleFoliagePlacer instance = new MegaJungleFoliagePlacer(intProvider, intProvider2, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java:54
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: i + k >= 7 ? true : i * i + k * k > l * l.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaJungleFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaJungleFoliagePlacer.java:24
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.MEGA_JUNGLE_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

MegaPineFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java:30
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: pos(), getY(), radiusOffset(), floor(), placeLeavesRow(), getX(), getZ(), doubleTrunk(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java:69
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ MegaPineFoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

MegaPineFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer#MegaPineFoliagePlacer(IntProvider,IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: crownHeight.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • IntProvider intProvider3

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
IntProvider intProvider3 = ...;
MegaPineFoliagePlacer instance = new MegaPineFoliagePlacer(intProvider, intProvider2, intProvider3);

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java:74
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: i + k >= 7 ? true : i * i + k * k > l * l.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.MegaPineFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/MegaPineFoliagePlacer.java:25
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.MEGA_PINE_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

PineFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:28
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: placeLeavesRow(), pos(), doubleTrunk(), radiusOffset().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:57
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ PineFoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

PineFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#foliageRadius(RandomSource,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:52
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageRadius ตาม implementation ของ PineFoliagePlacer

ทำงานยังไง

เรียกต่อ: nextInt(), max(). คืนค่า: super.foliageRadius(randomSource, i) + randomSource.nextInt(Math.max(i + 1, 1)).

Parameters

  • RandomSource randomSource
  • int i

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

PineFoliagePlacer instance = ...;
RandomSource randomSource = ...;
int result = instance.foliageRadius(randomSource, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#PineFoliagePlacer(IntProvider,IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: height.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • IntProvider intProvider3

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
IntProvider intProvider3 = ...;
PineFoliagePlacer instance = new PineFoliagePlacer(intProvider, intProvider2, intProvider3);

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:62
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: i == l && k == l && l > 0.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.PineFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/PineFoliagePlacer.java:23
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.PINE_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

RandomSpreadFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java:37
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

มีการวนลูป. เรียกต่อ: pos(), mutable(), setWithOffset(), nextInt(), tryPlaceLeaf().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java:63
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ RandomSpreadFoliagePlacer

ทำงานยังไง

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

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

RandomSpreadFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer#RandomSpreadFoliagePlacer(IntProvider,IntProvider,IntProvider,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java:26
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: foliageHeight, leafPlacementAttempts.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • IntProvider intProvider3
  • int i

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
IntProvider intProvider3 = ...;
RandomSpreadFoliagePlacer instance = new RandomSpreadFoliagePlacer(intProvider, intProvider2, intProvider3, 0);

net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java:68
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: false.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.RandomSpreadFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/RandomSpreadFoliagePlacer.java:32
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.RANDOM_SPREAD_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}

SpruceFoliagePlacer

  • Full name: net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer
  • Package: net.minecraft.world.level.levelgen.feature.foliageplacers
  • Source: commonnet/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java
  • Type: class
  • Modifiers: public
  • Extends: FoliagePlacer

net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer#createFoliage(LevelSimulatedReader,FoliagePlacer.FoliageSetter,RandomSource,TreeConfiguration,int,FoliagePlacer.FoliageAttachment,int,int,int)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java:29
  • Modifiers: protected
  • Return: void

คืออะไร

สร้าง Foliage

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: pos(), nextInt(), placeLeavesRow(), doubleTrunk(), min(), radiusOffset().

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • FoliagePlacer.FoliageSetter foliageSetter
  • RandomSource randomSource
  • TreeConfiguration treeConfiguration
  • int i
  • FoliagePlacer.FoliageAttachment foliageAttachment
  • int j
  • int k
  • int l

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

LevelSimulatedReader levelSimulatedReader = ...;
FoliagePlacer.FoliageSetter foliageSetter = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
FoliagePlacer.FoliageAttachment foliageAttachment = ...;
@Override
protected void createFoliage(LevelSimulatedReader levelSimulatedReader, FoliagePlacer.FoliageSetter foliageSetter, RandomSource randomSource, TreeConfiguration treeConfiguration, int i, FoliagePlacer.FoliageAttachment foliageAttachment, int j, int k, int l) {
    super.createFoliage(levelSimulatedReader, foliageSetter, randomSource, treeConfiguration, i, foliageAttachment, j, k, l);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer#foliageHeight(RandomSource,int,TreeConfiguration)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java:58
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ foliageHeight ตาม implementation ของ SpruceFoliagePlacer

ทำงานยังไง

เรียกต่อ: max(), sample(). คืนค่า: Math.max(4, i - this.trunkHeight.sample(randomSource)).

Parameters

  • RandomSource randomSource
  • int i
  • TreeConfiguration treeConfiguration

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

SpruceFoliagePlacer instance = ...;
RandomSource randomSource = ...;
TreeConfiguration treeConfiguration = ...;
int result = instance.foliageHeight(randomSource, 0, treeConfiguration);

net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer#shouldSkipLocation(RandomSource,int,int,int,int,boolean)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java:63
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Skip Location

ทำงานยังไง

คืนค่า: i == l && k == l && l > 0.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • boolean bl

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

RandomSource randomSource = ...;
@Override
protected boolean shouldSkipLocation(RandomSource randomSource, int i, int j, int k, int l, boolean bl) {
    return super.shouldSkipLocation(randomSource, i, j, k, l, bl);
}

net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer#SpruceFoliagePlacer(IntProvider,IntProvider,IntProvider)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: trunkHeight.

Parameters

  • IntProvider intProvider
  • IntProvider intProvider2
  • IntProvider intProvider3

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

IntProvider intProvider = ...;
IntProvider intProvider2 = ...;
IntProvider intProvider3 = ...;
SpruceFoliagePlacer instance = new SpruceFoliagePlacer(intProvider, intProvider2, intProvider3);

net.minecraft.world.level.levelgen.feature.foliageplacers.SpruceFoliagePlacer#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/foliageplacers/SpruceFoliagePlacer.java:24
  • Modifiers: protected
  • Return: FoliagePlacerType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: FoliagePlacerType.SPRUCE_FOLIAGE_PLACER.

Parameters

  • ไม่มี

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

@Override
protected FoliagePlacerType<?> type() {
    return super.type();
}