Skip to content

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

Part 1/1


AlterGroundDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.AlterGroundDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/AlterGroundDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.AlterGroundDecorator#AlterGroundDecorator(BlockStateProvider)

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

คืออะไร

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

ทำงานยังไง

แก้ state: provider.

Parameters

  • BlockStateProvider blockStateProvider

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

BlockStateProvider blockStateProvider = ...;
AlterGroundDecorator instance = new AlterGroundDecorator(blockStateProvider);

net.minecraft.world.level.levelgen.feature.treedecorators.AlterGroundDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/AlterGroundDecorator.java:25
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: newArrayList(), roots(), logs(), isEmpty(), addAll(), get(), getY(), stream().

Parameters

  • TreeDecorator.Context context

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

AlterGroundDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.AlterGroundDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/AlterGroundDecorator.java:20
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.ALTER_GROUND.

Parameters

  • ไม่มี

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

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

AttachedToLeavesDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.AttachedToLeavesDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/AttachedToLeavesDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.AttachedToLeavesDecorator#AttachedToLeavesDecorator(float,int,int,BlockStateProvider,int,List<Direction>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/AttachedToLeavesDecorator.java:35
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: probability, exclusionRadiusXZ, exclusionRadiusY, blockProvider, requiredEmptyBlocks, directions.

Parameters

  • float f
  • int i
  • int j
  • BlockStateProvider blockStateProvider
  • int k
  • List<Direction> list

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

BlockStateProvider blockStateProvider = ...;
List<Direction> list = ...;
AttachedToLeavesDecorator instance = new AttachedToLeavesDecorator(0.0F, 0, 0, blockStateProvider, 0, list);

net.minecraft.world.level.levelgen.feature.treedecorators.AttachedToLeavesDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/AttachedToLeavesDecorator.java:44
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: random(), shuffledCopy(), leaves(), getRandom(), relative(), contains(), nextFloat(), hasRequiredEmptyBlocks(). สร้างออบเจ็กต์: HashSet<>.

Parameters

  • TreeDecorator.Context context

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

AttachedToLeavesDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.AttachedToLeavesDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/AttachedToLeavesDecorator.java:76
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.ATTACHED_TO_LEAVES.

Parameters

  • ไม่มี

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

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

BeehiveDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.BeehiveDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/BeehiveDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.BeehiveDecorator#BeehiveDecorator(float)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/BeehiveDecorator.java:29
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: probability.

Parameters

  • float f

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

BeehiveDecorator instance = new BeehiveDecorator(0.0F);

net.minecraft.world.level.levelgen.feature.treedecorators.BeehiveDecorator#place(TreeDecorator.Context)

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

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: leaves(), logs(), isEmpty(), random(), nextFloat(), max(), getFirst(), getY().

Parameters

  • TreeDecorator.Context context

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

BeehiveDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.BeehiveDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/BeehiveDecorator.java:33
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.BEEHIVE.

Parameters

  • ไม่มี

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

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

CocoaDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.CocoaDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.CocoaDecorator#CocoaDecorator(float)

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

คืออะไร

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

ทำงานยังไง

แก้ state: probability.

Parameters

  • float f

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

CocoaDecorator instance = new CocoaDecorator(0.0F);

net.minecraft.world.level.levelgen.feature.treedecorators.CocoaDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java:27
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: random(), nextFloat(), logs(), isEmpty(), getFirst(), getY(), stream(), filter().

Parameters

  • TreeDecorator.Context context

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

CocoaDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.CocoaDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/CocoaDecorator.java:22
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.COCOA.

Parameters

  • ไม่มี

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

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

CreakingHeartDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.CreakingHeartDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.CreakingHeartDecorator#CreakingHeartDecorator(float)

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

คืออะไร

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

ทำงานยังไง

แก้ state: probability.

Parameters

  • float f

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

CreakingHeartDecorator instance = new CreakingHeartDecorator(0.0F);

net.minecraft.world.level.levelgen.feature.treedecorators.CreakingHeartDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java:31
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: random(), logs(), isEmpty(), nextFloat(), shuffle(), stream(), filter(), values(). สร้างออบเจ็กต์: ArrayList<>. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • TreeDecorator.Context context

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

CreakingHeartDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.CreakingHeartDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/CreakingHeartDecorator.java:26
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.CREAKING_HEART.

Parameters

  • ไม่มี

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

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

LeaveVineDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.LeaveVineDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/LeaveVineDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.LeaveVineDecorator#LeaveVineDecorator(float)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/LeaveVineDecorator.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: probability.

Parameters

  • float f

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

LeaveVineDecorator instance = new LeaveVineDecorator(0.0F);

net.minecraft.world.level.levelgen.feature.treedecorators.LeaveVineDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/LeaveVineDecorator.java:25
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: random(), leaves(), forEach(), nextFloat(), west(), isAir(), addHangingVine(), east().

Parameters

  • TreeDecorator.Context context

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

LeaveVineDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.LeaveVineDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/LeaveVineDecorator.java:16
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.LEAVE_VINE.

Parameters

  • ไม่มี

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

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

PaleMossDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator#PaleMossDecorator(float,float,float)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java:36
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: leavesProbability, trunkProbability, groundProbability.

Parameters

  • float f
  • float g
  • float h

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

PaleMossDecorator instance = new PaleMossDecorator(0.0F, 0.0F, 0.0F);

net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java:42
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: random(), level(), shuffledCopy(), logs(), isEmpty(), getFirst(), forEach(), getY(). สร้างออบเจ็กต์: MutableObject<>.

Parameters

  • TreeDecorator.Context context

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

PaleMossDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.PaleMossDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/PaleMossDecorator.java:31
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.PALE_MOSS.

Parameters

  • ไม่มี

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

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

TreeDecorator

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

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:24
  • Modifiers: public abstract
  • Return: void

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TreeDecorator.Context context

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

TreeDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:22
  • Modifiers: protected abstract
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

TreeDecorator$Context

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java
  • Type: class
  • Modifiers: public static final

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#checkBlock(BlockPos,Predicate<BlockState>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:65
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบ Block

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • Predicate<BlockState> predicate

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

TreeDecorator.Context instance = ...;
BlockPos blockPos = ...;
Predicate<BlockState> predicate = ...;
boolean result = instance.checkBlock(blockPos, predicate);

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#Context(LevelSimulatedReader,BiConsumer<BlockPos, BlockState>,RandomSource,Set<BlockPos>,Set<BlockPos>,Set<BlockPos>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:34
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: level, decorationSetter, random, roots, logs, leaves. เรียกต่อ: sort(), comparingInt(). สร้างออบเจ็กต์: ObjectArrayList<>.

Parameters

  • LevelSimulatedReader levelSimulatedReader
  • BiConsumer<BlockPos, BlockState> biConsumer
  • RandomSource randomSource
  • Set<BlockPos> set
  • Set<BlockPos> set2
  • Set<BlockPos> set3

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

LevelSimulatedReader levelSimulatedReader = ...;
BiConsumer<BlockPos, BlockState> biConsumer = ...;
RandomSource randomSource = ...;
Set<BlockPos> set = ...;
Set<BlockPos> set2 = ...;
Set<BlockPos> set3 = ...;
TreeDecorator.Context instance = new TreeDecorator.Context(levelSimulatedReader, biConsumer, randomSource, set, set2, set3);

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#isAir(BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:61
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: isStateAtPosition(). คืนค่า: this.level.isStateAtPosition(blockPos, BlockBehaviour.BlockStateBase::isAir).

Parameters

  • BlockPos blockPos

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

TreeDecorator.Context instance = ...;
BlockPos blockPos = ...;
boolean result = instance.isAir(blockPos);

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#leaves()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:81
  • Modifiers: public
  • Return: ObjectArrayList<BlockPos>

คืออะไร

ดำเนินการ leaves ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

คืนค่า: this.leaves.

Parameters

  • ไม่มี

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

TreeDecorator.Context instance = ...;
ObjectArrayList<BlockPos> result = instance.leaves();

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#level()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:69
  • Modifiers: public
  • Return: LevelSimulatedReader

คืออะไร

ดำเนินการ level ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

คืนค่า: this.level.

Parameters

  • ไม่มี

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

TreeDecorator.Context instance = ...;
LevelSimulatedReader result = instance.level();

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#logs()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:77
  • Modifiers: public
  • Return: ObjectArrayList<BlockPos>

คืออะไร

ดำเนินการ logs ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

คืนค่า: this.logs.

Parameters

  • ไม่มี

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

TreeDecorator.Context instance = ...;
ObjectArrayList<BlockPos> result = instance.logs();

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#placeVine(BlockPos,BooleanProperty)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:53
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ placeVine ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

เรียกต่อ: setBlock(), defaultBlockState(), setValue().

Parameters

  • BlockPos blockPos
  • BooleanProperty booleanProperty

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

TreeDecorator.Context instance = ...;
BlockPos blockPos = ...;
BooleanProperty booleanProperty = ...;
instance.placeVine(blockPos, booleanProperty);

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#random()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:73
  • Modifiers: public
  • Return: RandomSource

คืออะไร

ดำเนินการ random ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

คืนค่า: this.random.

Parameters

  • ไม่มี

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

TreeDecorator.Context instance = ...;
RandomSource result = instance.random();

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#roots()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:85
  • Modifiers: public
  • Return: ObjectArrayList<BlockPos>

คืออะไร

ดำเนินการ roots ตาม implementation ของ TreeDecorator$Context

ทำงานยังไง

คืนค่า: this.roots.

Parameters

  • ไม่มี

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

TreeDecorator.Context instance = ...;
ObjectArrayList<BlockPos> result = instance.roots();

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecorator$Context#setBlock(BlockPos,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecorator.java:57
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Block

ทำงานยังไง

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

Parameters

  • BlockPos blockPos
  • BlockState blockState

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

TreeDecorator.Context instance = ...;
BlockPos blockPos = ...;
BlockState blockState = ...;
instance.setBlock(blockPos, blockState);

TreeDecoratorType

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

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecoratorType#codec()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TreeDecoratorType.java:26
  • Modifiers: public
  • Return: MapCodec<P>

คืออะไร

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

ทำงานยังไง

คืนค่า: this.codec.

Parameters

  • ไม่มี

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

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

net.minecraft.world.level.levelgen.feature.treedecorators.TreeDecoratorType#TreeDecoratorType(MapCodec<P>)

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

คืออะไร

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

ทำงานยังไง

แก้ state: codec.

Parameters

  • MapCodec<P> mapCodec

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

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

TrunkVineDecorator

  • Full name: net.minecraft.world.level.levelgen.feature.treedecorators.TrunkVineDecorator
  • Package: net.minecraft.world.level.levelgen.feature.treedecorators
  • Source: commonnet/minecraft/world/level/levelgen/feature/treedecorators/TrunkVineDecorator.java
  • Type: class
  • Modifiers: public
  • Extends: TreeDecorator

net.minecraft.world.level.levelgen.feature.treedecorators.TrunkVineDecorator#place(TreeDecorator.Context)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TrunkVineDecorator.java:17
  • Modifiers: public
  • Return: void

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: random(), logs(), forEach(), nextInt(), west(), isAir(), placeVine(), east().

Parameters

  • TreeDecorator.Context context

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

TrunkVineDecorator instance = ...;
TreeDecorator.Context context = ...;
instance.place(context);

net.minecraft.world.level.levelgen.feature.treedecorators.TrunkVineDecorator#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/feature/treedecorators/TrunkVineDecorator.java:12
  • Modifiers: protected
  • Return: TreeDecoratorType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: TreeDecoratorType.TRUNK_VINE.

Parameters

  • ไม่มี

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

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