Skip to content

Package net.minecraft.world.level.levelgen.blockpredicates

Part 1/1


BlockPredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java
  • Type: interface
  • Modifiers: public
  • Implements: BiPredicate<WorldGenLevel, BlockPos>

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#allOf(BlockPredicate,BlockPredicate)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:34
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ allOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: allOf(List.of(blockPredicate, blockPredicate2)).

Parameters

  • BlockPredicate blockPredicate
  • BlockPredicate blockPredicate2

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

BlockPredicate blockPredicate = ...;
BlockPredicate blockPredicate2 = ...;
BlockPredicate result = BlockPredicate.allOf(blockPredicate, blockPredicate2);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#allOf(BlockPredicate[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:30
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ allOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: allOf(List.of(blockPredicates)).

Parameters

  • BlockPredicate[] blockPredicates

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

BlockPredicate[] blockPredicates = ...;
BlockPredicate result = BlockPredicate.allOf(blockPredicates);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#allOf(List<BlockPredicate>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:26
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ allOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • List<BlockPredicate> list

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

List<BlockPredicate> list = ...;
BlockPredicate result = BlockPredicate.allOf(list);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#alwaysTrue()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:130
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ alwaysTrue ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: TrueBlockPredicate.INSTANCE.

Parameters

  • ไม่มี

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

BlockPredicate result = BlockPredicate.alwaysTrue();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#anyOf(BlockPredicate,BlockPredicate)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:46
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: anyOf(List.of(blockPredicate, blockPredicate2)).

Parameters

  • BlockPredicate blockPredicate
  • BlockPredicate blockPredicate2

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

BlockPredicate blockPredicate = ...;
BlockPredicate blockPredicate2 = ...;
BlockPredicate result = BlockPredicate.anyOf(blockPredicate, blockPredicate2);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#anyOf(BlockPredicate[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:42
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: anyOf(List.of(blockPredicates)).

Parameters

  • BlockPredicate[] blockPredicates

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

BlockPredicate[] blockPredicates = ...;
BlockPredicate result = BlockPredicate.anyOf(blockPredicates);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#anyOf(List<BlockPredicate>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:38
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ anyOf ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • List<BlockPredicate> list

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

List<BlockPredicate> list = ...;
BlockPredicate result = BlockPredicate.anyOf(list);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#hasSturdyFace(Direction)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:106
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ตรวจสอบว่ามี Sturdy Face

ทำงานยังไง

คืนค่า: hasSturdyFace(Vec3i.ZERO, direction).

Parameters

  • Direction direction

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

Direction direction = ...;
BlockPredicate result = BlockPredicate.hasSturdyFace(direction);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#hasSturdyFace(Vec3i,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:102
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ตรวจสอบว่ามี Sturdy Face

ทำงานยังไง

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

Parameters

  • Vec3i vec3i
  • Direction direction

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

Vec3i vec3i = ...;
Direction direction = ...;
BlockPredicate result = BlockPredicate.hasSturdyFace(vec3i, direction);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#insideWorld(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:126
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ insideWorld ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.insideWorld(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesBlocks(Block[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:62
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesBlocks ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: matchesBlocks(Vec3i.ZERO, blocks).

Parameters

  • Block[] blocks

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

Block[] blocks = ...;
BlockPredicate result = BlockPredicate.matchesBlocks(blocks);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesBlocks(List<Block>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:54
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesBlocks ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: matchesBlocks(Vec3i.ZERO, list).

Parameters

  • List<Block> list

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

List<Block> list = ...;
BlockPredicate result = BlockPredicate.matchesBlocks(list);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesBlocks(Vec3i,Block[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:58
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesBlocks ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: matchesBlocks(vec3i, List.of(blocks)).

Parameters

  • Vec3i vec3i
  • Block[] blocks

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

Vec3i vec3i = ...;
Block[] blocks = ...;
BlockPredicate result = BlockPredicate.matchesBlocks(vec3i, blocks);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesBlocks(Vec3i,List<Block>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:50
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesBlocks ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: direct(). สร้างออบเจ็กต์: MatchingBlocksPredicate. คืนค่า: new MatchingBlocksPredicate(vec3i, HolderSet.direct(Block::builtInRegistryHolder, list)).

Parameters

  • Vec3i vec3i
  • List<Block> list

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

Vec3i vec3i = ...;
List<Block> list = ...;
BlockPredicate result = BlockPredicate.matchesBlocks(vec3i, list);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesFluids(Fluid[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:82
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesFluids ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: matchesFluids(Vec3i.ZERO, fluids).

Parameters

  • Fluid[] fluids

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

Fluid[] fluids = ...;
BlockPredicate result = BlockPredicate.matchesFluids(fluids);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesFluids(Vec3i,Fluid[])

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:78
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesFluids ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: matchesFluids(vec3i, List.of(fluids)).

Parameters

  • Vec3i vec3i
  • Fluid[] fluids

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

Vec3i vec3i = ...;
Fluid[] fluids = ...;
BlockPredicate result = BlockPredicate.matchesFluids(vec3i, fluids);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesFluids(Vec3i,List<Fluid>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:74
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesFluids ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: direct(). สร้างออบเจ็กต์: MatchingFluidsPredicate. คืนค่า: new MatchingFluidsPredicate(vec3i, HolderSet.direct(Fluid::builtInRegistryHolder, list)).

Parameters

  • Vec3i vec3i
  • List<Fluid> list

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

Vec3i vec3i = ...;
List<Fluid> list = ...;
BlockPredicate result = BlockPredicate.matchesFluids(vec3i, list);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesTag(TagKey<Block>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:70
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesTag ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: matchesTag(Vec3i.ZERO, tagKey).

Parameters

  • TagKey<Block> tagKey

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

TagKey<Block> tagKey = ...;
BlockPredicate result = BlockPredicate.matchesTag(tagKey);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#matchesTag(Vec3i,TagKey<Block>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:66
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ matchesTag ตาม implementation ของ BlockPredicate

ทำงานยังไง

สร้างออบเจ็กต์: MatchingBlockTagPredicate. คืนค่า: new MatchingBlockTagPredicate(vec3i, tagKey).

Parameters

  • Vec3i vec3i
  • TagKey<Block> tagKey

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

Vec3i vec3i = ...;
TagKey<Block> tagKey = ...;
BlockPredicate result = BlockPredicate.matchesTag(vec3i, tagKey);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#noFluid()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:118
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ noFluid ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: noFluid(Vec3i.ZERO).

Parameters

  • ไม่มี

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

BlockPredicate result = BlockPredicate.noFluid();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#noFluid(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:122
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ noFluid ตาม implementation ของ BlockPredicate

ทำงานยังไง

เรียกต่อ: matchesFluids(). คืนค่า: matchesFluids(vec3i, Fluids.EMPTY).

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.noFluid(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#not(BlockPredicate)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:86
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ not ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • BlockPredicate blockPredicate

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

BlockPredicate blockPredicate = ...;
BlockPredicate result = BlockPredicate.not(blockPredicate);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#replaceable()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:94
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ replaceable ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: replaceable(Vec3i.ZERO).

Parameters

  • ไม่มี

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

BlockPredicate result = BlockPredicate.replaceable();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#replaceable(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:90
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ replaceable ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.replaceable(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#solid()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:114
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ solid ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: solid(Vec3i.ZERO).

Parameters

  • ไม่มี

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

BlockPredicate result = BlockPredicate.solid();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#solid(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:110
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ solid ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.solid(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:24
  • Modifiers: ``
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockPredicate instance = ...;
BlockPredicateType<?> result = instance.type();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#unobstructed()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:138
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ unobstructed ตาม implementation ของ BlockPredicate

ทำงานยังไง

คืนค่า: unobstructed(Vec3i.ZERO).

Parameters

  • ไม่มี

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

BlockPredicate result = BlockPredicate.unobstructed();

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#unobstructed(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:134
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ unobstructed ตาม implementation ของ BlockPredicate

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.unobstructed(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicate#wouldSurvive(BlockState,Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicate.java:98
  • Modifiers: static
  • Return: BlockPredicate

คืออะไร

ดำเนินการ wouldSurvive ตาม implementation ของ BlockPredicate

ทำงานยังไง

สร้างออบเจ็กต์: WouldSurvivePredicate. คืนค่า: new WouldSurvivePredicate(vec3i, blockState).

Parameters

  • BlockState blockState
  • Vec3i vec3i

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

BlockState blockState = ...;
Vec3i vec3i = ...;
BlockPredicate result = BlockPredicate.wouldSurvive(blockState, vec3i);

BlockPredicateType

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

net.minecraft.world.level.levelgen.blockpredicates.BlockPredicateType#codec()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/BlockPredicateType.java:22
  • Modifiers: ``
  • Return: MapCodec<P>

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

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

HasSturdyFacePredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.HasSturdyFacePredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/HasSturdyFacePredicate.java
  • Type: class
  • Modifiers: public
  • Implements: BlockPredicate

net.minecraft.world.level.levelgen.blockpredicates.HasSturdyFacePredicate#HasSturdyFacePredicate(Vec3i,Direction)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/HasSturdyFacePredicate.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: offset, direction.

Parameters

  • Vec3i vec3i
  • Direction direction

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

Vec3i vec3i = ...;
Direction direction = ...;
HasSturdyFacePredicate instance = new HasSturdyFacePredicate(vec3i, direction);

net.minecraft.world.level.levelgen.blockpredicates.HasSturdyFacePredicate#test(WorldGenLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/HasSturdyFacePredicate.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: offset(), getBlockState(), isFaceSturdy(). คืนค่า: worldGenLevel.getBlockState(blockPos2).isFaceSturdy(worldGenLevel, blockPos2, this.direction).

Parameters

  • WorldGenLevel worldGenLevel
  • BlockPos blockPos

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

HasSturdyFacePredicate instance = ...;
WorldGenLevel worldGenLevel = ...;
BlockPos blockPos = ...;
boolean result = instance.test(worldGenLevel, blockPos);

net.minecraft.world.level.levelgen.blockpredicates.HasSturdyFacePredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/HasSturdyFacePredicate.java:31
  • Modifiers: public
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: BlockPredicateType.HAS_STURDY_FACE.

Parameters

  • ไม่มี

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

HasSturdyFacePredicate instance = ...;
BlockPredicateType<?> result = instance.type();

InsideWorldBoundsPredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.InsideWorldBoundsPredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/InsideWorldBoundsPredicate.java
  • Type: class
  • Modifiers: public
  • Implements: BlockPredicate

net.minecraft.world.level.levelgen.blockpredicates.InsideWorldBoundsPredicate#InsideWorldBoundsPredicate(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/InsideWorldBoundsPredicate.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: offset.

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
InsideWorldBoundsPredicate instance = new InsideWorldBoundsPredicate(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.InsideWorldBoundsPredicate#test(WorldGenLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/InsideWorldBoundsPredicate.java:22
  • Modifiers: public
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: isOutsideBuildHeight(), offset(). คืนค่า: !worldGenLevel.isOutsideBuildHeight(blockPos.offset(this.offset)).

Parameters

  • WorldGenLevel worldGenLevel
  • BlockPos blockPos

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

InsideWorldBoundsPredicate instance = ...;
WorldGenLevel worldGenLevel = ...;
BlockPos blockPos = ...;
boolean result = instance.test(worldGenLevel, blockPos);

net.minecraft.world.level.levelgen.blockpredicates.InsideWorldBoundsPredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/InsideWorldBoundsPredicate.java:26
  • Modifiers: public
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: BlockPredicateType.INSIDE_WORLD_BOUNDS.

Parameters

  • ไม่มี

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

InsideWorldBoundsPredicate instance = ...;
BlockPredicateType<?> result = instance.type();

MatchingBlockTagPredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.MatchingBlockTagPredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/MatchingBlockTagPredicate.java
  • Type: class
  • Modifiers: public
  • Extends: StateTestingPredicate

net.minecraft.world.level.levelgen.blockpredicates.MatchingBlockTagPredicate#MatchingBlockTagPredicate(Vec3i,TagKey<Block>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/MatchingBlockTagPredicate.java:19
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: tag.

Parameters

  • Vec3i vec3i
  • TagKey<Block> tagKey

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

Vec3i vec3i = ...;
TagKey<Block> tagKey = ...;
MatchingBlockTagPredicate instance = new MatchingBlockTagPredicate(vec3i, tagKey);

net.minecraft.world.level.levelgen.blockpredicates.MatchingBlockTagPredicate#test(BlockState)

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

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: is(). คืนค่า: blockState.is(this.tag).

Parameters

  • BlockState blockState

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

BlockState blockState = ...;
@Override
protected boolean test(BlockState blockState) {
    return super.test(blockState);
}

net.minecraft.world.level.levelgen.blockpredicates.MatchingBlockTagPredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/MatchingBlockTagPredicate.java:29
  • Modifiers: public
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: BlockPredicateType.MATCHING_BLOCK_TAG.

Parameters

  • ไม่มี

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

MatchingBlockTagPredicate instance = ...;
BlockPredicateType<?> result = instance.type();

SolidPredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.SolidPredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/SolidPredicate.java
  • Type: class
  • Modifiers: public
  • Extends: StateTestingPredicate

net.minecraft.world.level.levelgen.blockpredicates.SolidPredicate#SolidPredicate(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/SolidPredicate.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
SolidPredicate instance = new SolidPredicate(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.SolidPredicate#test(BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/SolidPredicate.java:16
  • Modifiers: protected
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: isSolid(). คืนค่า: blockState.isSolid().

Parameters

  • BlockState blockState

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

BlockState blockState = ...;
@Override
protected boolean test(BlockState blockState) {
    return super.test(blockState);
}

net.minecraft.world.level.levelgen.blockpredicates.SolidPredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/SolidPredicate.java:21
  • Modifiers: public
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: BlockPredicateType.SOLID.

Parameters

  • ไม่มี

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

SolidPredicate instance = ...;
BlockPredicateType<?> result = instance.type();

StateTestingPredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.StateTestingPredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/StateTestingPredicate.java
  • Type: class
  • Modifiers: public abstract
  • Implements: BlockPredicate

net.minecraft.world.level.levelgen.blockpredicates.StateTestingPredicate#stateTestingCodec(Instance<P>)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/StateTestingPredicate.java:14
  • Modifiers: protected static
  • Return: P1<Mu<P>, Vec3i>

คืออะไร

ดำเนินการ stateTestingCodec ตาม implementation ของ StateTestingPredicate

ทำงานยังไง

เรียกต่อ: group(), offsetCodec(), optionalFieldOf(), forGetter(). คืนค่า: instance.group(Vec3i.offsetCodec(16).optionalFieldOf("offset", Vec3i.ZERO).forGetter(stateTestingPredicate -> stateTestingPredicate.offset)).

Parameters

  • Instance<P> instance

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

Instance<P> instance = ...;
@Override
protected P1<Mu<P>, Vec3i> stateTestingCodec(Instance<P> instance) {
    return super.stateTestingCodec(instance);
}

net.minecraft.world.level.levelgen.blockpredicates.StateTestingPredicate#StateTestingPredicate(Vec3i)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/StateTestingPredicate.java:18
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: offset.

Parameters

  • Vec3i vec3i

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

Vec3i vec3i = ...;
StateTestingPredicate instance = new StateTestingPredicate(vec3i);

net.minecraft.world.level.levelgen.blockpredicates.StateTestingPredicate#test(BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/StateTestingPredicate.java:26
  • Modifiers: protected abstract
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

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

Parameters

  • BlockState blockState

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

BlockState blockState = ...;
@Override
protected boolean test(BlockState blockState) {
    return super.test(blockState);
}

net.minecraft.world.level.levelgen.blockpredicates.StateTestingPredicate#test(WorldGenLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/StateTestingPredicate.java:22
  • Modifiers: public final
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: getBlockState(), offset(). คืนค่า: this.test(worldGenLevel.getBlockState(blockPos.offset(this.offset))).

Parameters

  • WorldGenLevel worldGenLevel
  • BlockPos blockPos

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

StateTestingPredicate instance = ...;
WorldGenLevel worldGenLevel = ...;
BlockPos blockPos = ...;
boolean result = instance.test(worldGenLevel, blockPos);

WouldSurvivePredicate

  • Full name: net.minecraft.world.level.levelgen.blockpredicates.WouldSurvivePredicate
  • Package: net.minecraft.world.level.levelgen.blockpredicates
  • Source: commonnet/minecraft/world/level/levelgen/blockpredicates/WouldSurvivePredicate.java
  • Type: class
  • Modifiers: public
  • Implements: BlockPredicate

net.minecraft.world.level.levelgen.blockpredicates.WouldSurvivePredicate#test(WorldGenLevel,BlockPos)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/WouldSurvivePredicate.java:26
  • Modifiers: public
  • Return: boolean

คืออะไร

ทดสอบเงื่อนไข test

ทำงานยังไง

เรียกต่อ: canSurvive(), offset(). คืนค่า: this.state.canSurvive(worldGenLevel, blockPos.offset(this.offset)).

Parameters

  • WorldGenLevel worldGenLevel
  • BlockPos blockPos

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

WouldSurvivePredicate instance = ...;
WorldGenLevel worldGenLevel = ...;
BlockPos blockPos = ...;
boolean result = instance.test(worldGenLevel, blockPos);

net.minecraft.world.level.levelgen.blockpredicates.WouldSurvivePredicate#type()

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/WouldSurvivePredicate.java:30
  • Modifiers: public
  • Return: BlockPredicateType<?>

คืออะไร

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

ทำงานยังไง

คืนค่า: BlockPredicateType.WOULD_SURVIVE.

Parameters

  • ไม่มี

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

WouldSurvivePredicate instance = ...;
BlockPredicateType<?> result = instance.type();

net.minecraft.world.level.levelgen.blockpredicates.WouldSurvivePredicate#WouldSurvivePredicate(Vec3i,BlockState)

  • Origin: common
  • Source: net/minecraft/world/level/levelgen/blockpredicates/WouldSurvivePredicate.java:21
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: offset, state.

Parameters

  • Vec3i vec3i
  • BlockState blockState

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

Vec3i vec3i = ...;
BlockState blockState = ...;
WouldSurvivePredicate instance = new WouldSurvivePredicate(vec3i, blockState);