Skip to content

Package net.minecraft.core

Part 1/1


AxisCycle

  • Full name: net.minecraft.core.AxisCycle
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/AxisCycle.java
  • Type: enum
  • Modifiers: public

net.minecraft.core.AxisCycle#between(Direction.Axis,Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/AxisCycle.java:79
  • Modifiers: public static
  • Return: AxisCycle

คืออะไร

ดำเนินการ between ตาม implementation ของ AxisCycle

ทำงานยังไง

เรียกต่อ: floorMod(), ordinal(). คืนค่า: VALUES[Math.floorMod(axis2.ordinal() - axis.ordinal(), 3)].

Parameters

  • Direction.Axis axis
  • Direction.Axis axis2

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

Direction.Axis axis = ...;
Direction.Axis axis2 = ...;
AxisCycle result = AxisCycle.between(axis, axis2);

net.minecraft.core.AxisCycle#cycle(Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/AxisCycle.java:75
  • Modifiers: public abstract
  • Return: Direction.Axis

คืออะไร

ดำเนินการ cycle ตาม implementation ของ AxisCycle

ทำงานยังไง

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

Parameters

  • Direction.Axis axis

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

AxisCycle instance = ...;
Direction.Axis axis = ...;
Direction.Axis result = instance.cycle(axis);

net.minecraft.core.AxisCycle#cycle(double,double,double,Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/AxisCycle.java:73
  • Modifiers: public abstract
  • Return: double

คืออะไร

ดำเนินการ cycle ตาม implementation ของ AxisCycle

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f
  • Direction.Axis axis

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

AxisCycle instance = ...;
Direction.Axis axis = ...;
double result = instance.cycle(0.0D, 0.0D, 0.0D, axis);

net.minecraft.core.AxisCycle#cycle(int,int,int,Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/AxisCycle.java:71
  • Modifiers: public abstract
  • Return: int

คืออะไร

ดำเนินการ cycle ตาม implementation ของ AxisCycle

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k
  • Direction.Axis axis

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

AxisCycle instance = ...;
Direction.Axis axis = ...;
int result = instance.cycle(0, 0, 0, axis);

net.minecraft.core.AxisCycle#inverse()

  • Origin: common
  • Source: net/minecraft/core/AxisCycle.java:77
  • Modifiers: public abstract
  • Return: AxisCycle

คืออะไร

ดำเนินการ inverse ตาม implementation ของ AxisCycle

ทำงานยังไง

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

Parameters

  • ไม่มี

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

AxisCycle instance = ...;
AxisCycle result = instance.inverse();

BlockBox

  • Full name: net.minecraft.core.BlockBox
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/BlockBox.java
  • Type: record
  • Modifiers: public
  • Implements: Iterable<BlockPos>

net.minecraft.core.BlockBox#aabb()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:51
  • Modifiers: public
  • Return: AABB

คืออะไร

ดำเนินการ aabb ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: encapsulatingFullBlocks(). คืนค่า: AABB.encapsulatingFullBlocks(this.min, this.max).

Parameters

  • ไม่มี

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

BlockBox instance = ...;
AABB result = instance.aabb();

net.minecraft.core.BlockBox#BlockBox(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: min, max. เรียกต่อ: min(), max().

Parameters

  • BlockPos min
  • BlockPos max

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

BlockPos min = ...;
BlockPos max = ...;
BlockBox instance = new BlockBox(min, max);

net.minecraft.core.BlockBox#contains(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:42
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี contains

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ().

Parameters

  • BlockPos blockPos

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

BlockBox instance = ...;
BlockPos blockPos = ...;
boolean result = instance.contains(blockPos);

net.minecraft.core.BlockBox#extend(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:72
  • Modifiers: public
  • Return: BlockBox

คืออะไร

ดำเนินการ extend ตาม implementation ของ BlockBox

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getAxisDirection(), of(), max(), relative(), min(). คืนค่า: this.

Parameters

  • Direction direction
  • int i

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

BlockBox instance = ...;
Direction direction = ...;
BlockBox result = instance.extend(direction, 0);

net.minecraft.core.BlockBox#include(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:34
  • Modifiers: public
  • Return: BlockBox

คืออะไร

ดำเนินการ include ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: min(), max(). สร้างออบเจ็กต์: BlockBox. คืนค่า: new BlockBox(BlockPos.min(this.min, blockPos), BlockPos.max(this.max, blockPos)).

Parameters

  • BlockPos blockPos

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

BlockBox instance = ...;
BlockPos blockPos = ...;
BlockBox result = instance.include(blockPos);

net.minecraft.core.BlockBox#isBlock()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:38
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: equals(). คืนค่า: this.min.equals(this.max).

Parameters

  • ไม่มี

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

BlockBox instance = ...;
boolean result = instance.isBlock();

net.minecraft.core.BlockBox#iterator()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:55
  • Modifiers: public
  • Return: Iterator<BlockPos>

คืออะไร

ดำเนินการ iterator ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: betweenClosed(). คืนค่า: BlockPos.betweenClosed(this.min, this.max).iterator().

Parameters

  • ไม่มี

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

BlockBox instance = ...;
Iterator<BlockPos> result = instance.iterator();

net.minecraft.core.BlockBox#move(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:82
  • Modifiers: public
  • Return: BlockBox

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

เรียกต่อ: relative(). สร้างออบเจ็กต์: BlockBox. คืนค่า: i == 0 ? this : new BlockBox(this.min.relative(direction, i), this.max.relative(direction, i)).

Parameters

  • Direction direction
  • int i

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

BlockBox instance = ...;
Direction direction = ...;
BlockBox result = instance.move(direction, 0);

net.minecraft.core.BlockBox#of(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:26
  • Modifiers: public static
  • Return: BlockBox

คืออะไร

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

ทำงานยังไง

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

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
BlockBox result = BlockBox.of(blockPos);

net.minecraft.core.BlockBox#of(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:30
  • Modifiers: public static
  • Return: BlockBox

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: BlockBox. คืนค่า: new BlockBox(blockPos, blockPos2).

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
BlockBox result = BlockBox.of(blockPos, blockPos2);

net.minecraft.core.BlockBox#offset(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:86
  • Modifiers: public
  • Return: BlockBox

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockBox

ทำงานยังไง

สร้างออบเจ็กต์: BlockBox. คืนค่า: new BlockBox(this.min.offset(vec3i), this.max.offset(vec3i)).

Parameters

  • Vec3i vec3i

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

BlockBox instance = ...;
Vec3i vec3i = ...;
BlockBox result = instance.offset(vec3i);

net.minecraft.core.BlockBox#sizeX()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:60
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ sizeX ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: getX(). คืนค่า: this.max.getX() - this.min.getX() + 1.

Parameters

  • ไม่มี

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

BlockBox instance = ...;
int result = instance.sizeX();

net.minecraft.core.BlockBox#sizeY()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:64
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ sizeY ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: getY(). คืนค่า: this.max.getY() - this.min.getY() + 1.

Parameters

  • ไม่มี

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

BlockBox instance = ...;
int result = instance.sizeY();

net.minecraft.core.BlockBox#sizeZ()

  • Origin: common
  • Source: net/minecraft/core/BlockBox.java:68
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ sizeZ ตาม implementation ของ BlockBox

ทำงานยังไง

เรียกต่อ: getZ(). คืนค่า: this.max.getZ() - this.min.getZ() + 1.

Parameters

  • ไม่มี

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

BlockBox instance = ...;
int result = instance.sizeZ();

BlockMath

  • Full name: net.minecraft.core.BlockMath
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/BlockMath.java
  • Type: class
  • Modifiers: public

net.minecraft.core.BlockMath#blockCenterToCorner(Transformation)

  • Origin: common
  • Source: net/minecraft/core/BlockMath.java:28
  • Modifiers: public static
  • Return: Transformation

คืออะไร

ดำเนินการ blockCenterToCorner ตาม implementation ของ BlockMath

ทำงานยังไง

เรียกต่อ: translation(), mul(), getMatrix(), translate(). สร้างออบเจ็กต์: Matrix4f, Transformation. คืนค่า: new Transformation(matrix4f).

Parameters

  • Transformation transformation

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

Transformation transformation = ...;
Transformation result = BlockMath.blockCenterToCorner(transformation);

net.minecraft.core.BlockMath#blockCornerToCenter(Transformation)

  • Origin: common
  • Source: net/minecraft/core/BlockMath.java:35
  • Modifiers: public static
  • Return: Transformation

คืออะไร

ดำเนินการ blockCornerToCenter ตาม implementation ของ BlockMath

ทำงานยังไง

เรียกต่อ: translation(), mul(), getMatrix(), translate(). สร้างออบเจ็กต์: Matrix4f, Transformation. คืนค่า: new Transformation(matrix4f).

Parameters

  • Transformation transformation

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

Transformation transformation = ...;
Transformation result = BlockMath.blockCornerToCenter(transformation);

net.minecraft.core.BlockMath#getUVLockTransform(Transformation,Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockMath.java:42
  • Modifiers: public static
  • Return: Transformation

คืออะไร

อ่านค่า UVLock Transform

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: rotate(), getMatrix(), inverse(), debug(), identity(), get(), compose(), blockCenterToCorner(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Transformation transformation
  • Direction direction

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

Transformation transformation = ...;
Direction direction = ...;
Transformation result = BlockMath.getUVLockTransform(transformation, direction);

BlockPos

  • Full name: net.minecraft.core.BlockPos
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/BlockPos.java
  • Type: class
  • Modifiers: public
  • Extends: Vec3i

net.minecraft.core.BlockPos#above()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:153
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ above ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.UP).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.above();

net.minecraft.core.BlockPos#above(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:157
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ above ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.UP, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.above(0);

net.minecraft.core.BlockPos#asLong()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:110
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: asLong(this.getX(), this.getY(), this.getZ()).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
long result = instance.asLong();

net.minecraft.core.BlockPos#asLong(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:114
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ BlockPos

ทำงานยังไง

คืนค่า: l | (k & PACKED_Z_MASK) << Z_OFFSET.

Parameters

  • int i
  • int j
  • int k

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

long result = BlockPos.asLong(0, 0, 0);

net.minecraft.core.BlockPos#atY(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:242
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ atY ตาม implementation ของ BlockPos

ทำงานยังไง

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

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.atY(0);

net.minecraft.core.BlockPos#below()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:161
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ below ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.DOWN).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.below();

net.minecraft.core.BlockPos#below(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:165
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ below ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.DOWN, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.below(0);

net.minecraft.core.BlockPos#betweenClosed(AABB)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:360
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ betweenClosed ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: containing(). คืนค่า: betweenClosed(blockPos, blockPos2).

Parameters

  • AABB aABB

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

AABB aABB = ...;
Iterable<BlockPos> result = BlockPos.betweenClosed(aABB);

net.minecraft.core.BlockPos#betweenClosed(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:366
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ betweenClosed ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: min(), getX(), getY(), getZ(), max().

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
Iterable<BlockPos> result = BlockPos.betweenClosed(blockPos, blockPos2);

net.minecraft.core.BlockPos#betweenClosed(int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:400
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ betweenClosed ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: index. เรียกต่อ: MutableBlockPos(), computeNext(), endOfData(), set(). สร้างออบเจ็กต์: AbstractIterator<BlockPos>, BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • int n

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

Iterable<BlockPos> result = BlockPos.betweenClosed(0, 0, 0, 0, 0, 0);

net.minecraft.core.BlockPos#betweenClosedStream(AABB)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:392
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ betweenClosedStream ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: floor(). คืนค่า: betweenClosedStream(Mth.floor(aABB.minX), Mth.floor(aABB.minY), Mth.floor(aABB.minZ), Mth.floor(aABB.maxX), Mth.floor(aABB.maxY), Mth.floor(aABB.maxZ)).

Parameters

  • AABB aABB

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

AABB aABB = ...;
Stream<BlockPos> result = BlockPos.betweenClosedStream(aABB);

net.minecraft.core.BlockPos#betweenClosedStream(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:377
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ betweenClosedStream ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: stream(), betweenClosed(), spliterator(). คืนค่า: StreamSupport.stream(betweenClosed(blockPos, blockPos2).spliterator(), false).

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
Stream<BlockPos> result = BlockPos.betweenClosedStream(blockPos, blockPos2);

net.minecraft.core.BlockPos#betweenClosedStream(BoundingBox)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:381
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ betweenClosedStream ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: min(), minX(), maxX(), minY(), maxY(), minZ(), maxZ(), max().

Parameters

  • BoundingBox boundingBox

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

BoundingBox boundingBox = ...;
Stream<BlockPos> result = BlockPos.betweenClosedStream(boundingBox);

net.minecraft.core.BlockPos#betweenClosedStream(int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:396
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ betweenClosedStream ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: stream(), betweenClosed(), spliterator(). คืนค่า: StreamSupport.stream(betweenClosed(i, j, k, l, m, n).spliterator(), false).

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • int n

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

Stream<BlockPos> result = BlockPos.betweenClosedStream(0, 0, 0, 0, 0, 0);

net.minecraft.core.BlockPos#BlockPos(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:62
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k

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

BlockPos instance = new BlockPos(0, 0, 0);

net.minecraft.core.BlockPos#BlockPos(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:66
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ().

Parameters

  • Vec3i vec3i

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

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

net.minecraft.core.BlockPos#breadthFirstTraversal(BlockPos,int,int,BiConsumer<BlockPos, Consumer<BlockPos>>,Function<BlockPos, BlockPos.TraversalNodeStatus>)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:458
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ breadthFirstTraversal ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: add(), of(), isEmpty(), poll(), getLeft(), getRight(), asLong(), apply(). สร้างออบเจ็กต์: ArrayDeque<>, LongOpenHashSet. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • int i
  • int j
  • BiConsumer<BlockPos, Consumer<BlockPos>> biConsumer
  • Function<BlockPos, BlockPos.TraversalNodeStatus> function

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

BlockPos blockPos = ...;
BiConsumer<BlockPos, Consumer<BlockPos>> biConsumer = ...;
Function<BlockPos, BlockPos.TraversalNodeStatus> function = ...;
int result = BlockPos.breadthFirstTraversal(blockPos, 0, 0, biConsumer, function);

net.minecraft.core.BlockPos#clampLocationWithin(Vec3)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:254
  • Modifiers: public
  • Return: Vec3

คืออะไร

ดำเนินการ clampLocationWithin ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: clamp(), getX(), getY(), getZ(). สร้างออบเจ็กต์: Vec3.

Parameters

  • Vec3 vec3

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

BlockPos instance = ...;
Vec3 vec3 = ...;
Vec3 result = instance.clampLocationWithin(vec3);

net.minecraft.core.BlockPos#containing(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:94
  • Modifiers: public static
  • Return: BlockPos

คืออะไร

ดำเนินการ containing ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: floor(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(Mth.floor(d), Mth.floor(e), Mth.floor(f)).

Parameters

  • double d
  • double e
  • double f

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

BlockPos result = BlockPos.containing(0.0D, 0.0D, 0.0D);

net.minecraft.core.BlockPos#containing(Position)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:98
  • Modifiers: public static
  • Return: BlockPos

คืออะไร

ดำเนินการ containing ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: x(), y(), z(). คืนค่า: containing(position.x(), position.y(), position.z()).

Parameters

  • Position position

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

Position position = ...;
BlockPos result = BlockPos.containing(position);

net.minecraft.core.BlockPos#cross(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:234
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ cross ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getY(), getZ(), getX(). สร้างออบเจ็กต์: BlockPos.

Parameters

  • Vec3i vec3i

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

BlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos result = instance.cross(vec3i);

net.minecraft.core.BlockPos#east()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:193
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ east ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.EAST).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.east();

net.minecraft.core.BlockPos#east(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:197
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ east ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.EAST, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.east(0);

net.minecraft.core.BlockPos#findClosestMatch(BlockPos,int,int,Predicate<BlockPos>)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:346
  • Modifiers: public static
  • Return: Optional<BlockPos>

คืออะไร

ค้นหา Closest Match

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: withinManhattan(), test(), of(), empty(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • int i
  • int j
  • Predicate<BlockPos> predicate

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

BlockPos blockPos = ...;
Predicate<BlockPos> predicate = ...;
Optional<BlockPos> result = BlockPos.findClosestMatch(blockPos, 0, 0, predicate);

net.minecraft.core.BlockPos#getBottomCenter()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:133
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Bottom Center

ทำงานยังไง

เรียกต่อ: atBottomCenterOf(). คืนค่า: Vec3.atBottomCenterOf(this).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
Vec3 result = instance.getBottomCenter();

net.minecraft.core.BlockPos#getCenter()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:129
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Center

ทำงานยังไง

เรียกต่อ: atCenterOf(). คืนค่า: Vec3.atCenterOf(this).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
Vec3 result = instance.getCenter();

net.minecraft.core.BlockPos#getFlatIndex(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:121
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Flat Index

ทำงานยังไง

คืนค่า: l & -16L.

Parameters

  • long l

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

long result = BlockPos.getFlatIndex(0L);

net.minecraft.core.BlockPos#getX(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:78
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า X

ทำงานยังไง

คืนค่า: (int)(l << 64 - X_OFFSET - PACKED_HORIZONTAL_LENGTH >> 64 - PACKED_HORIZONTAL_LENGTH).

Parameters

  • long l

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

int result = BlockPos.getX(0L);

net.minecraft.core.BlockPos#getY(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:82
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Y

ทำงานยังไง

คืนค่า: (int)(l << 64 - PACKED_Y_LENGTH >> 64 - PACKED_Y_LENGTH).

Parameters

  • long l

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

int result = BlockPos.getY(0L);

net.minecraft.core.BlockPos#getZ(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:86
  • Modifiers: public static
  • Return: int

คืออะไร

อ่านค่า Z

ทำงานยังไง

คืนค่า: (int)(l << 64 - Z_OFFSET - PACKED_HORIZONTAL_LENGTH >> 64 - PACKED_HORIZONTAL_LENGTH).

Parameters

  • long l

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

int result = BlockPos.getZ(0L);

net.minecraft.core.BlockPos#immutable()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:246
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ immutable ตาม implementation ของ BlockPos

ทำงานยังไง

คืนค่า: this.

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.immutable();

net.minecraft.core.BlockPos#max(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:106
  • Modifiers: public static
  • Return: BlockPos

คืออะไร

ดำเนินการ max ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(Math.max(blockPos.getX(), blockPos2.getX()), Math.max(blockPos.getY(), blockPos2.getY()), Math.max(blockPos.getZ(), blockPos2.getZ())).

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
BlockPos result = BlockPos.max(blockPos, blockPos2);

net.minecraft.core.BlockPos#min(BlockPos,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:102
  • Modifiers: public static
  • Return: BlockPos

คืออะไร

ดำเนินการ min ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(Math.min(blockPos.getX(), blockPos2.getX()), Math.min(blockPos.getY(), blockPos2.getY()), Math.min(blockPos.getZ(), blockPos2.getZ())).

Parameters

  • BlockPos blockPos
  • BlockPos blockPos2

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

BlockPos blockPos = ...;
BlockPos blockPos2 = ...;
BlockPos result = BlockPos.min(blockPos, blockPos2);

net.minecraft.core.BlockPos#multiply(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:145
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ multiply ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.multiply(0);

net.minecraft.core.BlockPos#mutable()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:250
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

ดำเนินการ mutable ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: MutableBlockPos(), getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos.MutableBlockPos. คืนค่า: new BlockPos.MutableBlockPos(this.getX(), this.getY(), this.getZ()).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.mutable();

net.minecraft.core.BlockPos#north()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:169
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ north ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.NORTH).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.north();

net.minecraft.core.BlockPos#north(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:173
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ north ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.NORTH, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.north(0);

net.minecraft.core.BlockPos#of(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:90
  • Modifiers: public static
  • Return: BlockPos

คืออะไร

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

ทำงานยังไง

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

Parameters

  • long l

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

BlockPos result = BlockPos.of(0L);

net.minecraft.core.BlockPos#offset(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:125
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: i == 0 && j == 0 && k == 0 ? this : new BlockPos(this.getX() + i, this.getY() + j, this.getZ() + k).

Parameters

  • int i
  • int j
  • int k

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

BlockPos instance = ...;
BlockPos result = instance.offset(0, 0, 0);

net.minecraft.core.BlockPos#offset(long,Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:70
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getStepX(), getStepY(), getStepZ(). คืนค่า: offset(l, direction.getStepX(), direction.getStepY(), direction.getStepZ()).

Parameters

  • long l
  • Direction direction

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

Direction direction = ...;
long result = BlockPos.offset(0L, direction);

net.minecraft.core.BlockPos#offset(long,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:74
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: asLong(), getX(), getY(), getZ(). คืนค่า: asLong(getX(l) + i, getY(l) + j, getZ(l) + k).

Parameters

  • long l
  • int i
  • int j
  • int k

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

long result = BlockPos.offset(0L, 0, 0, 0);

net.minecraft.core.BlockPos#offset(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:137
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.offset(vec3i.getX(), vec3i.getY(), vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

BlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos result = instance.offset(vec3i);

net.minecraft.core.BlockPos#randomBetweenClosed(RandomSource,int,int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:273
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ randomBetweenClosed ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: counter. เรียกต่อ: MutableBlockPos(), computeNext(), endOfData(), set(), nextInt(). สร้างออบเจ็กต์: AbstractIterator<BlockPos>, BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • RandomSource randomSource
  • int i
  • int j
  • int k
  • int l
  • int m
  • int n
  • int o

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

RandomSource randomSource = ...;
Iterable<BlockPos> result = BlockPos.randomBetweenClosed(randomSource, 0, 0, 0, 0, 0, 0, 0);

net.minecraft.core.BlockPos#randomInCube(RandomSource,int,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:262
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ randomInCube ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: randomBetweenClosed(), getX(), getY(), getZ().

Parameters

  • RandomSource randomSource
  • int i
  • BlockPos blockPos
  • int j

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

RandomSource randomSource = ...;
BlockPos blockPos = ...;
Iterable<BlockPos> result = BlockPos.randomInCube(randomSource, 0, blockPos, 0);

net.minecraft.core.BlockPos#relative(Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:201
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relative ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getStepX(), getY(), getStepY(), getZ(), getStepZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(this.getX() + direction.getStepX(), this.getY() + direction.getStepY(), this.getZ() + direction.getStepZ()).

Parameters

  • Direction direction

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

BlockPos instance = ...;
Direction direction = ...;
BlockPos result = instance.relative(direction);

net.minecraft.core.BlockPos#relative(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:205
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relative ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: getX(), getStepX(), getY(), getStepY(), getZ(), getStepZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: i == 0 ? this : new BlockPos(this.getX() + direction.getStepX() * i, this.getY() + direction.getStepY() * i, this.getZ() + direction.getStepZ() * i).

Parameters

  • Direction direction
  • int i

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

BlockPos instance = ...;
Direction direction = ...;
BlockPos result = instance.relative(direction, 0);

net.minecraft.core.BlockPos#relative(Direction.Axis,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:209
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relative ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Direction.Axis axis
  • int i

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

BlockPos instance = ...;
Direction.Axis axis = ...;
BlockPos result = instance.relative(axis, 0);

net.minecraft.core.BlockPos#rotate(Rotation)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:220
  • Modifiers: public
  • Return: BlockPos

คืออะไร

หมุน rotate

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: getZ(), getY(), getX(). สร้างออบเจ็กต์: BlockPos. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Rotation rotation

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

BlockPos instance = ...;
Rotation rotation = ...;
BlockPos result = instance.rotate(rotation);

net.minecraft.core.BlockPos#south()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:177
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ south ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.SOUTH).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.south();

net.minecraft.core.BlockPos#south(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:181
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ south ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.SOUTH, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.south(0);

net.minecraft.core.BlockPos#spiralAround(BlockPos,int,Direction,Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:424
  • Modifiers: public static
  • Return: Iterable<BlockPos.MutableBlockPos>

คืออะไร

ดำเนินการ spiralAround ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: lastX, lastY, lastZ, leg, legIndex, legSize. เรียกต่อ: validState(), getAxis(), getOpposite(), mutable(), move(), getX(), getY(), getZ(). สร้างออบเจ็กต์: AbstractIterator<BlockPos.MutableBlockPos>. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • BlockPos blockPos
  • int i
  • Direction direction
  • Direction direction2

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

BlockPos blockPos = ...;
Direction direction = ...;
Direction direction2 = ...;
Iterable<BlockPos.MutableBlockPos> result = BlockPos.spiralAround(blockPos, 0, direction, direction2);

net.minecraft.core.BlockPos#squareOutSouthEast(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:268
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ squareOutSouthEast ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: of(), south(), east(). คืนค่า: Stream.of(blockPos, blockPos.south(), blockPos.east(), blockPos.south().east()).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
Stream<BlockPos> result = BlockPos.squareOutSouthEast(blockPos);

net.minecraft.core.BlockPos#subtract(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:141
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ subtract ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: offset(), getX(), getY(), getZ(). คืนค่า: this.offset(-vec3i.getX(), -vec3i.getY(), -vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

BlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos result = instance.subtract(vec3i);

net.minecraft.core.BlockPos#west()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:185
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ west ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.WEST).

Parameters

  • ไม่มี

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

BlockPos instance = ...;
BlockPos result = instance.west();

net.minecraft.core.BlockPos#west(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:189
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ west ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.WEST, i).

Parameters

  • int i

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

BlockPos instance = ...;
BlockPos result = instance.west(0);

net.minecraft.core.BlockPos#withinManhattan(BlockPos,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:293
  • Modifiers: public static
  • Return: Iterable<BlockPos>

คืออะไร

ดำเนินการ withinManhattan ตาม implementation ของ BlockPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: zMirror, y, x, currentDepth, maxX, maxY. เรียกต่อ: getX(), getY(), getZ(), MutableBlockPos(), computeNext(), setZ(), endOfData(), min(). สร้างออบเจ็กต์: AbstractIterator<BlockPos>, BlockPos.MutableBlockPos. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • BlockPos blockPos
  • int i
  • int j
  • int k

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

BlockPos blockPos = ...;
Iterable<BlockPos> result = BlockPos.withinManhattan(blockPos, 0, 0, 0);

net.minecraft.core.BlockPos#withinManhattanStream(BlockPos,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:356
  • Modifiers: public static
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ withinManhattanStream ตาม implementation ของ BlockPos

ทำงานยังไง

เรียกต่อ: stream(), withinManhattan(), spliterator(). คืนค่า: StreamSupport.stream(withinManhattan(blockPos, i, j, k).spliterator(), false).

Parameters

  • BlockPos blockPos
  • int i
  • int j
  • int k

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

BlockPos blockPos = ...;
Stream<BlockPos> result = BlockPos.withinManhattanStream(blockPos, 0, 0, 0);

BlockPos$MutableBlockPos

  • Full name: net.minecraft.core.BlockPos$MutableBlockPos
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/BlockPos.java
  • Type: class
  • Modifiers: public static
  • Extends: BlockPos

net.minecraft.core.BlockPos$MutableBlockPos#clamp(Direction.Axis,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:581
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

ดำเนินการ clamp ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: set(), getX(), getY(), getZ(). สร้างออบเจ็กต์: IllegalStateException. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Direction.Axis axis
  • int i
  • int j

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

BlockPos.MutableBlockPos instance = ...;
Direction.Axis axis = ...;
BlockPos.MutableBlockPos result = instance.clamp(axis, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#immutable()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:609
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ immutable ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockPos.MutableBlockPos instance = ...;
BlockPos result = instance.immutable();

net.minecraft.core.BlockPos$MutableBlockPos#move(Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:565
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

คืนค่า: this.move(direction, 1).

Parameters

  • Direction direction

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

BlockPos.MutableBlockPos instance = ...;
Direction direction = ...;
BlockPos.MutableBlockPos result = instance.move(direction);

net.minecraft.core.BlockPos$MutableBlockPos#move(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:569
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

เรียกต่อ: set(), getX(), getStepX(), getY(), getStepY(), getZ(), getStepZ(). คืนค่า: this.set(this.getX() + direction.getStepX() * i, this.getY() + direction.getStepY() * i, this.getZ() + direction.getStepZ() * i).

Parameters

  • Direction direction
  • int i

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

BlockPos.MutableBlockPos instance = ...;
Direction direction = ...;
BlockPos.MutableBlockPos result = instance.move(direction, 0);

net.minecraft.core.BlockPos$MutableBlockPos#move(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:573
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

เรียกต่อ: set(), getX(), getY(), getZ(). คืนค่า: this.set(this.getX() + i, this.getY() + j, this.getZ() + k).

Parameters

  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.move(0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#move(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:577
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

เคลื่อนที่ move

ทำงานยังไง

เรียกต่อ: set(), getX(), getY(), getZ(). คืนค่า: this.set(this.getX() + vec3i.getX(), this.getY() + vec3i.getY(), this.getZ() + vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

BlockPos.MutableBlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos.MutableBlockPos result = instance.move(vec3i);

net.minecraft.core.BlockPos$MutableBlockPos#multiply(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:510
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ multiply ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

เรียกต่อ: immutable(). คืนค่า: super.multiply(i).immutable().

Parameters

  • int i

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

BlockPos.MutableBlockPos instance = ...;
BlockPos result = instance.multiply(0);

net.minecraft.core.BlockPos$MutableBlockPos#MutableBlockPos()

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:493
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

BlockPos.MutableBlockPos instance = new BlockPos.MutableBlockPos();

net.minecraft.core.BlockPos$MutableBlockPos#MutableBlockPos(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:501
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f

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

BlockPos.MutableBlockPos instance = new BlockPos.MutableBlockPos(0.0D, 0.0D, 0.0D);

net.minecraft.core.BlockPos$MutableBlockPos#MutableBlockPos(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:497
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = new BlockPos.MutableBlockPos(0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#offset(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:505
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ offset ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

เรียกต่อ: immutable(). คืนค่า: super.offset(i, j, k).immutable().

Parameters

  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = ...;
BlockPos result = instance.offset(0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#relative(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:515
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relative ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

เรียกต่อ: immutable(). คืนค่า: super.relative(direction, i).immutable().

Parameters

  • Direction direction
  • int i

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

BlockPos.MutableBlockPos instance = ...;
Direction direction = ...;
BlockPos result = instance.relative(direction, 0);

net.minecraft.core.BlockPos$MutableBlockPos#relative(Direction.Axis,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:520
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relative ตาม implementation ของ BlockPos$MutableBlockPos

ทำงานยังไง

เรียกต่อ: immutable(). คืนค่า: super.relative(axis, i).immutable().

Parameters

  • Direction.Axis axis
  • int i

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

BlockPos.MutableBlockPos instance = ...;
Direction.Axis axis = ...;
BlockPos result = instance.relative(axis, 0);

net.minecraft.core.BlockPos$MutableBlockPos#rotate(Rotation)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:525
  • Modifiers: public
  • Return: BlockPos

คืออะไร

หมุน rotate

ทำงานยังไง

เรียกต่อ: immutable(). คืนค่า: super.rotate(rotation).immutable().

Parameters

  • Rotation rotation

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

BlockPos.MutableBlockPos instance = ...;
Rotation rotation = ...;
BlockPos result = instance.rotate(rotation);

net.minecraft.core.BlockPos$MutableBlockPos#set(AxisCycle,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:549
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: cycle(). คืนค่า: this.set(axisCycle.cycle(i, j, k, Direction.Axis.X), axisCycle.cycle(i, j, k, Direction.Axis.Y), axisCycle.cycle(i, j, k, Direction.Axis.Z)).

Parameters

  • AxisCycle axisCycle
  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = ...;
AxisCycle axisCycle = ...;
BlockPos.MutableBlockPos result = instance.set(axisCycle, 0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#set(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:537
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: floor(). คืนค่า: this.set(Mth.floor(d), Mth.floor(e), Mth.floor(f)).

Parameters

  • double d
  • double e
  • double f

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.set(0.0D, 0.0D, 0.0D);

net.minecraft.core.BlockPos$MutableBlockPos#set(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:530
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: setX(), setY(), setZ(). คืนค่า: this.

Parameters

  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.set(0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#set(long)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:545
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.set(getX(l), getY(l), getZ(l)).

Parameters

  • long l

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.set(0L);

net.minecraft.core.BlockPos$MutableBlockPos#set(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:541
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.set(vec3i.getX(), vec3i.getY(), vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

BlockPos.MutableBlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos.MutableBlockPos result = instance.set(vec3i);

net.minecraft.core.BlockPos$MutableBlockPos#setWithOffset(Vec3i,Direction)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:553
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า With Offset

ทำงานยังไง

เรียกต่อ: set(), getX(), getStepX(), getY(), getStepY(), getZ(), getStepZ(). คืนค่า: this.set(vec3i.getX() + direction.getStepX(), vec3i.getY() + direction.getStepY(), vec3i.getZ() + direction.getStepZ()).

Parameters

  • Vec3i vec3i
  • Direction direction

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

BlockPos.MutableBlockPos instance = ...;
Vec3i vec3i = ...;
Direction direction = ...;
BlockPos.MutableBlockPos result = instance.setWithOffset(vec3i, direction);

net.minecraft.core.BlockPos$MutableBlockPos#setWithOffset(Vec3i,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:557
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า With Offset

ทำงานยังไง

เรียกต่อ: set(), getX(), getY(), getZ(). คืนค่า: this.set(vec3i.getX() + i, vec3i.getY() + j, vec3i.getZ() + k).

Parameters

  • Vec3i vec3i
  • int i
  • int j
  • int k

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

BlockPos.MutableBlockPos instance = ...;
Vec3i vec3i = ...;
BlockPos.MutableBlockPos result = instance.setWithOffset(vec3i, 0, 0, 0);

net.minecraft.core.BlockPos$MutableBlockPos#setWithOffset(Vec3i,Vec3i)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:561
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า With Offset

ทำงานยังไง

เรียกต่อ: set(), getX(), getY(), getZ(). คืนค่า: this.set(vec3i.getX() + vec3i2.getX(), vec3i.getY() + vec3i2.getY(), vec3i.getZ() + vec3i2.getZ()).

Parameters

  • Vec3i vec3i
  • Vec3i vec3i2

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

BlockPos.MutableBlockPos instance = ...;
Vec3i vec3i = ...;
Vec3i vec3i2 = ...;
BlockPos.MutableBlockPos result = instance.setWithOffset(vec3i, vec3i2);

net.minecraft.core.BlockPos$MutableBlockPos#setX(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:594
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า X

ทำงานยังไง

คืนค่า: this.

Parameters

  • int i

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.setX(0);

net.minecraft.core.BlockPos$MutableBlockPos#setY(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:599
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า Y

ทำงานยังไง

คืนค่า: this.

Parameters

  • int i

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.setY(0);

net.minecraft.core.BlockPos$MutableBlockPos#setZ(int)

  • Origin: common
  • Source: net/minecraft/core/BlockPos.java:604
  • Modifiers: public
  • Return: BlockPos.MutableBlockPos

คืออะไร

กำหนดค่า Z

ทำงานยังไง

คืนค่า: this.

Parameters

  • int i

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

BlockPos.MutableBlockPos instance = ...;
BlockPos.MutableBlockPos result = instance.setZ(0);

Cloner

  • Full name: net.minecraft.core.Cloner
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Cloner.java
  • Type: class
  • Modifiers: public

net.minecraft.core.Cloner#clone(T,HolderLookup.Provider,HolderLookup.Provider)

  • Origin: common
  • Source: net/minecraft/core/Cloner.java:18
  • Modifiers: public
  • Return: T

คืออะไร

ทำสำเนา clone

ทำงานยังไง

เรียกต่อ: createSerializationContext(), encodeStart(), getOrThrow(), parse(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.directCodec.parse(dynamicOps2, object2).getOrThrow(string -> new IllegalStateException("Failed to decode: " + string)).

Parameters

  • T object
  • HolderLookup.Provider provider
  • HolderLookup.Provider provider2

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

Cloner instance = ...;
T object = ...;
HolderLookup.Provider provider = ...;
HolderLookup.Provider provider2 = ...;
T result = instance.clone(object, provider, provider2);

Cloner$Factory

  • Full name: net.minecraft.core.Cloner$Factory
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Cloner.java
  • Type: class
  • Modifiers: public static

net.minecraft.core.Cloner$Factory#addCodec(ResourceKey<? extends Registry<? extends T>>,Codec<T>)

  • Origin: common
  • Source: net/minecraft/core/Cloner.java:28
  • Modifiers: public
  • Return: Cloner.Factory

คืออะไร

เพิ่ม Codec

ทำงานยังไง

เรียกต่อ: put(). สร้างออบเจ็กต์: Cloner<>. คืนค่า: this.

Parameters

  • ResourceKey<? extends Registry<? extends T>> resourceKey
  • Codec<T> codec

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

Cloner.Factory instance = ...;
ResourceKey<? extends Registry<? extends T>> resourceKey = ...;
Codec<T> codec = ...;
Cloner.Factory result = instance.addCodec(resourceKey, codec);

net.minecraft.core.Cloner$Factory#cloner(ResourceKey<? extends Registry<? extends T>>)

  • Origin: common
  • Source: net/minecraft/core/Cloner.java:33
  • Modifiers: public
  • Return: Cloner<T>

คืออะไร

ดำเนินการ cloner ตาม implementation ของ Cloner$Factory

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: (Cloner<T>)this.codecs.get(resourceKey).

Parameters

  • ResourceKey<? extends Registry<? extends T>> resourceKey

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

Cloner.Factory instance = ...;
ResourceKey<? extends Registry<? extends T>> resourceKey = ...;
Cloner<T> result = instance.cloner(resourceKey);

Cursor3D

  • Full name: net.minecraft.core.Cursor3D
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Cursor3D.java
  • Type: class
  • Modifiers: public

net.minecraft.core.Cursor3D#advance()

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:30
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ advance ตาม implementation ของ Cursor3D

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: index, x, y, z. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

Cursor3D instance = ...;
boolean result = instance.advance();

net.minecraft.core.Cursor3D#Cursor3D(int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:20
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: originX, originY, originZ, width, height, depth.

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • int n

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

Cursor3D instance = new Cursor3D(0, 0, 0, 0, 0, 0);

net.minecraft.core.Cursor3D#getNextType()

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:55
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Next Type

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: x, y, z. คืนค่า: i.

Parameters

  • ไม่มี

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

Cursor3D instance = ...;
int result = instance.getNextType();

net.minecraft.core.Cursor3D#nextX()

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:43
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ nextX ตาม implementation ของ Cursor3D

ทำงานยังไง

คืนค่า: this.originX + this.x.

Parameters

  • ไม่มี

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

Cursor3D instance = ...;
int result = instance.nextX();

net.minecraft.core.Cursor3D#nextY()

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:47
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ nextY ตาม implementation ของ Cursor3D

ทำงานยังไง

คืนค่า: this.originY + this.y.

Parameters

  • ไม่มี

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

Cursor3D instance = ...;
int result = instance.nextY();

net.minecraft.core.Cursor3D#nextZ()

  • Origin: common
  • Source: net/minecraft/core/Cursor3D.java:51
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ nextZ ตาม implementation ของ Cursor3D

ทำงานยังไง

คืนค่า: this.originZ + this.z.

Parameters

  • ไม่มี

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

Cursor3D instance = ...;
int result = instance.nextZ();

DefaultedMappedRegistry

  • Full name: net.minecraft.core.DefaultedMappedRegistry
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/DefaultedMappedRegistry.java
  • Type: class
  • Modifiers: public
  • Extends: MappedRegistry<T>
  • Implements: DefaultedRegistry<T>

net.minecraft.core.DefaultedMappedRegistry#byId(int)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:60
  • Modifiers: public
  • Return: T

คืออะไร

ดำเนินการ byId ตาม implementation ของ DefaultedMappedRegistry

ทำงานยังไง

เรียกต่อ: value(). คืนค่า: object == null ? this.defaultValue.value() : object.

Parameters

  • int i

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

DefaultedMappedRegistry instance = ...;
T result = instance.byId(0);

net.minecraft.core.DefaultedMappedRegistry#DefaultedMappedRegistry(String,ResourceKey<? extends Registry<T>>,Lifecycle,boolean)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:15
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: defaultKey. เรียกต่อ: parse().

Parameters

  • String string
  • ResourceKey<? extends Registry<T>> resourceKey
  • Lifecycle lifecycle
  • boolean bl

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

ResourceKey<? extends Registry<T>> resourceKey = ...;
Lifecycle lifecycle = ...;
DefaultedMappedRegistry instance = new DefaultedMappedRegistry("value", resourceKey, lifecycle, true);

net.minecraft.core.DefaultedMappedRegistry#getAny()

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:55
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Any

ทำงานยังไง

เรียกต่อ: ofNullable(). คืนค่า: Optional.ofNullable(this.defaultValue).

Parameters

  • ไม่มี

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

DefaultedMappedRegistry instance = ...;
Optional<Holder.Reference<T>> result = instance.getAny();

net.minecraft.core.DefaultedMappedRegistry#getDefaultKey()

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:72
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

อ่านค่า Default Key

ทำงานยังไง

คืนค่า: this.defaultKey.

Parameters

  • ไม่มี

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

DefaultedMappedRegistry instance = ...;
ResourceLocation result = instance.getDefaultKey();

net.minecraft.core.DefaultedMappedRegistry#getId(T)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:30
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

เรียกต่อ: value(). คืนค่า: i == -1 ? super.getId(this.defaultValue.value()) : i.

Parameters

  • T object

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

DefaultedMappedRegistry instance = ...;
T object = ...;
int result = instance.getId(object);

net.minecraft.core.DefaultedMappedRegistry#getKey(T)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:36
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

อ่านค่า Key

ทำงานยังไง

คืนค่า: resourceLocation == null ? this.defaultKey : resourceLocation.

Parameters

  • T object

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

DefaultedMappedRegistry instance = ...;
T object = ...;
ResourceLocation result = instance.getKey(object);

net.minecraft.core.DefaultedMappedRegistry#getOptional(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:50
  • Modifiers: public
  • Return: Optional<T>

คืออะไร

อ่านค่า Optional

ทำงานยังไง

เรียกต่อ: ofNullable(), getValue(). คืนค่า: Optional.ofNullable(super.getValue(resourceLocation)).

Parameters

  • ResourceLocation resourceLocation

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

DefaultedMappedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
Optional<T> result = instance.getOptional(resourceLocation);

net.minecraft.core.DefaultedMappedRegistry#getRandom(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:67
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Random

ทำงานยังไง

เรียกต่อ: or(), of(). คืนค่า: super.getRandom(randomSource).or(() -> Optional.of(this.defaultValue)).

Parameters

  • RandomSource randomSource

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

DefaultedMappedRegistry instance = ...;
RandomSource randomSource = ...;
Optional<Holder.Reference<T>> result = instance.getRandom(randomSource);

net.minecraft.core.DefaultedMappedRegistry#getValue(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:43
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

เรียกต่อ: value(). คืนค่า: object == null ? this.defaultValue.value() : object.

Parameters

  • ResourceLocation resourceLocation

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

DefaultedMappedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
T result = instance.getValue(resourceLocation);

net.minecraft.core.DefaultedMappedRegistry#register(ResourceKey<T>,T,RegistrationInfo)

  • Origin: common
  • Source: net/minecraft/core/DefaultedMappedRegistry.java:20
  • Modifiers: public
  • Return: Holder.Reference<T>

คืออะไร

ลงทะเบียน register

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: defaultValue. เรียกต่อ: equals(), location(). คืนค่า: reference.

Parameters

  • ResourceKey<T> resourceKey
  • T object
  • RegistrationInfo registrationInfo

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

DefaultedMappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
T object = ...;
RegistrationInfo registrationInfo = ...;
Holder.Reference<T> result = instance.register(resourceKey, object, registrationInfo);

DefaultedRegistry

  • Full name: net.minecraft.core.DefaultedRegistry
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/DefaultedRegistry.java
  • Type: interface
  • Modifiers: public
  • Implements: Registry<T>

net.minecraft.core.DefaultedRegistry#byId(int)

  • Origin: common
  • Source: net/minecraft/core/DefaultedRegistry.java:16
  • Modifiers: ``
  • Return: T

คืออะไร

ดำเนินการ byId ตาม implementation ของ DefaultedRegistry

ทำงานยังไง

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

Parameters

  • int i

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

DefaultedRegistry instance = ...;
T result = instance.byId(0);

net.minecraft.core.DefaultedRegistry#getDefaultKey()

  • Origin: common
  • Source: net/minecraft/core/DefaultedRegistry.java:20
  • Modifiers: ``
  • Return: ResourceLocation

คืออะไร

อ่านค่า Default Key

ทำงานยังไง

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

Parameters

  • ไม่มี

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

DefaultedRegistry instance = ...;
ResourceLocation result = instance.getDefaultKey();

net.minecraft.core.DefaultedRegistry#getKey(T)

  • Origin: common
  • Source: net/minecraft/core/DefaultedRegistry.java:8
  • Modifiers: ``
  • Return: ResourceLocation

คืออะไร

อ่านค่า Key

ทำงานยังไง

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

Parameters

  • T object

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

DefaultedRegistry instance = ...;
T object = ...;
ResourceLocation result = instance.getKey(object);

net.minecraft.core.DefaultedRegistry#getValue(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/DefaultedRegistry.java:12
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

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

Parameters

  • ResourceLocation resourceLocation

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

DefaultedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
T result = instance.getValue(resourceLocation);

Direction

  • Full name: net.minecraft.core.Direction
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Direction.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.core.Direction#allShuffled(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:112
  • Modifiers: public static
  • Return: Collection<Direction>

คืออะไร

ดำเนินการ allShuffled ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: shuffledCopy(), values(). คืนค่า: Util.shuffledCopy(values(), randomSource).

Parameters

  • RandomSource randomSource

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

RandomSource randomSource = ...;
Collection<Direction> result = Direction.allShuffled(randomSource);

net.minecraft.core.Direction#byName(String)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:265
  • Modifiers: public static
  • Return: Direction

คืออะไร

ดำเนินการ byName ตาม implementation ของ Direction

ทำงานยังไง

คืนค่า: CODEC.byName(string).

Parameters

  • String string

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

Direction result = Direction.byName("value");

net.minecraft.core.Direction#from2DDataValue(int)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:274
  • Modifiers: public static
  • Return: Direction

คืออะไร

ดำเนินการ from2DDataValue ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: abs(). คืนค่า: BY_2D_DATA[Mth.abs(i % BY_2D_DATA.length)].

Parameters

  • int i

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

Direction result = Direction.from2DDataValue(0);

net.minecraft.core.Direction#from3DDataValue(int)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:270
  • Modifiers: public static
  • Return: Direction

คืออะไร

ดำเนินการ from3DDataValue ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: abs(). คืนค่า: BY_3D_DATA[Mth.abs(i % BY_3D_DATA.length)].

Parameters

  • int i

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

Direction result = Direction.from3DDataValue(0);

net.minecraft.core.Direction#fromAxisAndDirection(Direction.Axis,Direction.AxisDirection)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:282
  • Modifiers: public static
  • Return: Direction

คืออะไร

ดำเนินการ fromAxisAndDirection ตาม implementation ของ Direction

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (axis) { case X -> axisDirection == Direction.AxisDirection.POSITIVE ? EAST : WEST.

Parameters

  • Direction.Axis axis
  • Direction.AxisDirection axisDirection

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

Direction.Axis axis = ...;
Direction.AxisDirection axisDirection = ...;
Direction result = Direction.fromAxisAndDirection(axis, axisDirection);

net.minecraft.core.Direction#fromYRot(double)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:278
  • Modifiers: public static
  • Return: Direction

คืออะไร

ดำเนินการ fromYRot ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: from2DDataValue(), floor(). คืนค่า: from2DDataValue(Mth.floor(d / 90.0 + 0.5) & 3).

Parameters

  • double d

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

Direction result = Direction.fromYRot(0.0D);

net.minecraft.core.Direction#get(Direction.AxisDirection,Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:358
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า get

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getAxisDirection(), getAxis(). สร้างออบเจ็กต์: IllegalArgumentException. คืนค่า: direction.

Parameters

  • Direction.AxisDirection axisDirection
  • Direction.Axis axis

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

Direction.AxisDirection axisDirection = ...;
Direction.Axis axis = ...;
Direction result = Direction.get(axisDirection, axis);

net.minecraft.core.Direction#get2DDataValue()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:145
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ get2DDataValue ตาม implementation ของ Direction

ทำงานยังไง

คืนค่า: this.data2d.

Parameters

  • ไม่มี

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

Direction instance = ...;
int result = instance.get2DDataValue();

net.minecraft.core.Direction#get3DDataValue()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:141
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ get3DDataValue ตาม implementation ของ Direction

ทำงานยังไง

คืนค่า: this.data3d.

Parameters

  • ไม่มี

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

Direction instance = ...;
int result = instance.get3DDataValue();

net.minecraft.core.Direction#getApproximateNearest(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:298
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Approximate Nearest

ทำงานยังไง

คืนค่า: getApproximateNearest((float)d, (float)e, (float)f).

Parameters

  • double d
  • double e
  • double f

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

Direction result = Direction.getApproximateNearest(0.0D, 0.0D, 0.0D);

net.minecraft.core.Direction#getApproximateNearest(float,float,float)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:302
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Approximate Nearest

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getX(), getY(), getZ(). คืนค่า: direction.

Parameters

  • float f
  • float g
  • float h

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

Direction result = Direction.getApproximateNearest(0.0F, 0.0F, 0.0F);

net.minecraft.core.Direction#getApproximateNearest(Vec3)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:317
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Approximate Nearest

ทำงานยังไง

คืนค่า: getApproximateNearest(vec3.x, vec3.y, vec3.z).

Parameters

  • Vec3 vec3

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

Vec3 vec3 = ...;
Direction result = Direction.getApproximateNearest(vec3);

net.minecraft.core.Direction#getAxis()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:261
  • Modifiers: public
  • Return: Direction.Axis

คืออะไร

อ่านค่า Axis

ทำงานยังไง

คืนค่า: this.axis.

Parameters

  • ไม่มี

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

Direction instance = ...;
Direction.Axis result = instance.getAxis();

net.minecraft.core.Direction#getAxisDirection()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:149
  • Modifiers: public
  • Return: Direction.AxisDirection

คืออะไร

อ่านค่า Axis Direction

ทำงานยังไง

คืนค่า: this.axisDirection.

Parameters

  • ไม่มี

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

Direction instance = ...;
Direction.AxisDirection result = instance.getAxisDirection();

net.minecraft.core.Direction#getClockWise()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:181
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Clock Wise

ทำงานยังไง

แยกกรณีด้วย switch. สร้างออบเจ็กต์: IllegalStateException. คืนค่า: switch (this) { case NORTH -> EAST.

Parameters

  • ไม่มี

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

Direction instance = ...;
Direction result = instance.getClockWise();

net.minecraft.core.Direction#getClockWise(Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:165
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Clock Wise

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: getClockWiseX(), getClockWiseZ(). คืนค่า: switch (axis) { case X -> this != WEST && this != EAST ? this.getClockWiseX() : this.

Parameters

  • Direction.Axis axis

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

Direction instance = ...;
Direction.Axis axis = ...;
Direction result = instance.getClockWise(axis);

net.minecraft.core.Direction#getCounterClockWise()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:231
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Counter Clock Wise

ทำงานยังไง

แยกกรณีด้วย switch. สร้างออบเจ็กต์: IllegalStateException. คืนค่า: switch (this) { case NORTH -> WEST.

Parameters

  • ไม่มี

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

Direction instance = ...;
Direction result = instance.getCounterClockWise();

net.minecraft.core.Direction#getCounterClockWise(Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:173
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Counter Clock Wise

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: getCounterClockWiseX(), getCounterClockWiseZ(). คืนค่า: switch (axis) { case X -> this != WEST && this != EAST ? this.getCounterClockWiseX() : this.

Parameters

  • Direction.Axis axis

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

Direction instance = ...;
Direction.Axis axis = ...;
Direction result = instance.getCounterClockWise(axis);

net.minecraft.core.Direction#getFacingAxis(Entity,Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:153
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Facing Axis

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: isFacingAngle(), getViewYRot(), getViewXRot(). คืนค่า: switch (axis) { case X -> EAST.isFacingAngle(entity.getViewYRot(1.0F)) ? EAST : WEST.

Parameters

  • Entity entity
  • Direction.Axis axis

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

Entity entity = ...;
Direction.Axis axis = ...;
Direction result = Direction.getFacingAxis(entity, axis);

net.minecraft.core.Direction#getName()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:257
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction instance = ...;
String result = instance.getName();

net.minecraft.core.Direction#getNearest(int,int,int,Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:321
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Nearest

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k
  • Direction direction

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

Direction direction = ...;
Direction result = Direction.getNearest(0, 0, 0, direction);

net.minecraft.core.Direction#getNearest(Vec3i,Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:338
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Nearest

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: getNearest(vec3i.getX(), vec3i.getY(), vec3i.getZ(), direction).

Parameters

  • Vec3i vec3i
  • Direction direction

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

Vec3i vec3i = ...;
Direction direction = ...;
Direction result = Direction.getNearest(vec3i, direction);

net.minecraft.core.Direction#getOpposite()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:161
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Opposite

ทำงานยังไง

เรียกต่อ: from3DDataValue(). คืนค่า: from3DDataValue(this.oppositeIndex).

Parameters

  • ไม่มี

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

Direction instance = ...;
Direction result = instance.getOpposite();

net.minecraft.core.Direction#getRandom(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:294
  • Modifiers: public static
  • Return: Direction

คืออะไร

อ่านค่า Random

ทำงานยังไง

คืนค่า: Util.getRandom(VALUES, randomSource).

Parameters

  • RandomSource randomSource

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

RandomSource randomSource = ...;
Direction result = Direction.getRandom(randomSource);

net.minecraft.core.Direction#getRotation()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:130
  • Modifiers: public
  • Return: Quaternionf

คืออะไร

อ่านค่า Rotation

ทำงานยังไง

แยกกรณีด้วย switch. เรียกต่อ: rotationX(), rotationXYZ(). สร้างออบเจ็กต์: Quaternionf. คืนค่า: switch (this) { case DOWN -> new Quaternionf().rotationX((float) Math.PI).

Parameters

  • ไม่มี

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

Direction instance = ...;
Quaternionf result = instance.getRotation();

net.minecraft.core.Direction#getSerializedName()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:349
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

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

net.minecraft.core.Direction#getStepX()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:241
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step X

ทำงานยังไง

เรียกต่อ: getX(). คืนค่า: this.normal.getX().

Parameters

  • ไม่มี

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

Direction instance = ...;
int result = instance.getStepX();

net.minecraft.core.Direction#getStepY()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:245
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step Y

ทำงานยังไง

เรียกต่อ: getY(). คืนค่า: this.normal.getY().

Parameters

  • ไม่มี

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

Direction instance = ...;
int result = instance.getStepY();

net.minecraft.core.Direction#getStepZ()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:249
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step Z

ทำงานยังไง

เรียกต่อ: getZ(). คืนค่า: this.normal.getZ().

Parameters

  • ไม่มี

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

Direction instance = ...;
int result = instance.getStepZ();

net.minecraft.core.Direction#getUnitVec3()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:372
  • Modifiers: public
  • Return: Vec3

คืออะไร

อ่านค่า Unit Vec3

ทำงานยังไง

คืนค่า: this.normalVec3.

Parameters

  • ไม่มี

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

Direction instance = ...;
Vec3 result = instance.getUnitVec3();

net.minecraft.core.Direction#getUnitVec3i()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:368
  • Modifiers: public
  • Return: Vec3i

คืออะไร

อ่านค่า Unit Vec3i

ทำงานยังไง

คืนค่า: this.normal.

Parameters

  • ไม่มี

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

Direction instance = ...;
Vec3i result = instance.getUnitVec3i();

net.minecraft.core.Direction#getYRot(Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:120
  • Modifiers: public static
  • Return: float

คืออะไร

อ่านค่า YRot

ทำงานยังไง

แยกกรณีด้วย switch ; มีการวนลูป. สร้างออบเจ็กต์: IllegalStateException. คืนค่า: switch (direction) { case NORTH -> 180.0F.

Parameters

  • Direction direction

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

Direction direction = ...;
float result = Direction.getYRot(direction);

net.minecraft.core.Direction#isFacingAngle(float)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:376
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Facing Angle

ทำงานยังไง

เรียกต่อ: sin(), cos(), getX(), getZ(). คืนค่า: this.normal.getX() * h + this.normal.getZ() * i > 0.0F.

Parameters

  • float f

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

Direction instance = ...;
boolean result = instance.isFacingAngle(0.0F);

net.minecraft.core.Direction#orderedByNearest(Entity)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:71
  • Modifiers: public static
  • Return: Direction[]

คืออะไร

ดำเนินการ orderedByNearest ตาม implementation ของ Direction

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getViewXRot(), getViewYRot(), sin(), cos(), makeDirectionArray(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Entity entity

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

Entity entity = ...;
Direction[] result = Direction.orderedByNearest(entity);

net.minecraft.core.Direction#rotate(Matrix4f,Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:106
  • Modifiers: public static
  • Return: Direction

คืออะไร

หมุน rotate

ทำงานยังไง

เรียกต่อ: getUnitVec3i(), transform(), getX(), getY(), getZ(), getApproximateNearest(), x(), y(). สร้างออบเจ็กต์: Vector4f. คืนค่า: getApproximateNearest(vector4f.x(), vector4f.y(), vector4f.z()).

Parameters

  • Matrix4f matrix4f
  • Direction direction

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

Matrix4f matrix4f = ...;
Direction direction = ...;
Direction result = Direction.rotate(matrix4f, direction);

net.minecraft.core.Direction#step()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:253
  • Modifiers: public
  • Return: Vector3f

คืออะไร

ดำเนินการ step ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: getStepX(), getStepY(), getStepZ(). สร้างออบเจ็กต์: Vector3f. คืนค่า: new Vector3f(this.getStepX(), this.getStepY(), this.getStepZ()).

Parameters

  • ไม่มี

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

Direction instance = ...;
Vector3f result = instance.step();

net.minecraft.core.Direction#stream()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:116
  • Modifiers: public static
  • Return: Stream<Direction>

คืออะไร

ดำเนินการ stream ตาม implementation ของ Direction

ทำงานยังไง

เรียกต่อ: of(). คืนค่า: Stream.of(VALUES).

Parameters

  • ไม่มี

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

Stream<Direction> result = Direction.stream();

net.minecraft.core.Direction#toString()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:344
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

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

net.minecraft.core.Direction#toYRot()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:290
  • Modifiers: public
  • Return: float

คืออะไร

ดำเนินการ toYRot ตาม implementation ของ Direction

ทำงานยังไง

คืนค่า: (this.data2d & 3) * 90.

Parameters

  • ไม่มี

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

Direction instance = ...;
float result = instance.toYRot();

Direction$Axis

  • Full name: net.minecraft.core.Direction$Axis
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Direction.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable,Predicate<Direction>

net.minecraft.core.Direction$Axis#byName(String)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:456
  • Modifiers: public static
  • Return: Direction.Axis

คืออะไร

ดำเนินการ byName ตาม implementation ของ Direction$Axis

ทำงานยังไง

คืนค่า: CODEC.byName(string).

Parameters

  • String string

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

Direction.Axis result = Direction.Axis.byName("value");

net.minecraft.core.Direction$Axis#choose(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:508
  • Modifiers: public abstract
  • Return: double

คืออะไร

ดำเนินการ choose ตาม implementation ของ Direction$Axis

ทำงานยังไง

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

Parameters

  • double d
  • double e
  • double f

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

Direction.Axis instance = ...;
double result = instance.choose(0.0D, 0.0D, 0.0D);

net.minecraft.core.Direction$Axis#choose(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:506
  • Modifiers: public abstract
  • Return: int

คืออะไร

ดำเนินการ choose ตาม implementation ของ Direction$Axis

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k

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

Direction.Axis instance = ...;
int result = instance.choose(0, 0, 0);

net.minecraft.core.Direction$Axis#getDirections()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:477
  • Modifiers: public
  • Return: Direction[]

คืออะไร

อ่านค่า Directions

ทำงานยังไง

เรียกต่อ: getPositive(), getNegative(). คืนค่า: new Direction[]{this.getPositive(), this.getNegative()}.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
Direction[] result = instance.getDirections();

net.minecraft.core.Direction$Axis#getName()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:461
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
String result = instance.getName();

net.minecraft.core.Direction$Axis#getNegative()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:475
  • Modifiers: public abstract
  • Return: Direction

คืออะไร

อ่านค่า Negative

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
Direction result = instance.getNegative();

net.minecraft.core.Direction$Axis#getPlane()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:494
  • Modifiers: public
  • Return: Direction.Plane

คืออะไร

อ่านค่า Plane

ทำงานยังไง

แยกกรณีด้วย switch. คืนค่า: switch (this) { case X, Z -> Direction.Plane.HORIZONTAL.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
Direction.Plane result = instance.getPlane();

net.minecraft.core.Direction$Axis#getPositive()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:473
  • Modifiers: public abstract
  • Return: Direction

คืออะไร

อ่านค่า Positive

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
Direction result = instance.getPositive();

net.minecraft.core.Direction$Axis#getRandom(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:486
  • Modifiers: public static
  • Return: Direction.Axis

คืออะไร

อ่านค่า Random

ทำงานยังไง

คืนค่า: Util.getRandom(VALUES, randomSource).

Parameters

  • RandomSource randomSource

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

RandomSource randomSource = ...;
Direction.Axis result = Direction.Axis.getRandom(randomSource);

net.minecraft.core.Direction$Axis#getSerializedName()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:501
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
String result = instance.getSerializedName();

net.minecraft.core.Direction$Axis#isHorizontal()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:469
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this == X || this == Z.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
boolean result = instance.isHorizontal();

net.minecraft.core.Direction$Axis#isVertical()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:465
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this == Y.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
boolean result = instance.isVertical();

net.minecraft.core.Direction$Axis#test(Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:490
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getAxis(). คืนค่า: direction != null && direction.getAxis() == this.

Parameters

  • Direction direction

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

Direction.Axis instance = ...;
Direction direction = ...;
boolean result = instance.test(direction);

net.minecraft.core.Direction$Axis#toString()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:481
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ Direction$Axis

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction.Axis instance = ...;
String result = instance.toString();

Direction$AxisDirection

  • Full name: net.minecraft.core.Direction$AxisDirection
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Direction.java
  • Type: enum
  • Modifiers: public

net.minecraft.core.Direction$AxisDirection#getName()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:527
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction.AxisDirection instance = ...;
String result = instance.getName();

net.minecraft.core.Direction$AxisDirection#getStep()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:523
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step

ทำงานยังไง

คืนค่า: this.step.

Parameters

  • ไม่มี

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

Direction.AxisDirection instance = ...;
int result = instance.getStep();

net.minecraft.core.Direction$AxisDirection#opposite()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:536
  • Modifiers: public
  • Return: Direction.AxisDirection

คืออะไร

ดำเนินการ opposite ตาม implementation ของ Direction$AxisDirection

ทำงานยังไง

คืนค่า: this == POSITIVE ? NEGATIVE : POSITIVE.

Parameters

  • ไม่มี

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

Direction.AxisDirection instance = ...;
Direction.AxisDirection result = instance.opposite();

net.minecraft.core.Direction$AxisDirection#toString()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:531
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toString ตาม implementation ของ Direction$AxisDirection

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

Direction.AxisDirection instance = ...;
String result = instance.toString();

Direction$Plane

  • Full name: net.minecraft.core.Direction$Plane
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Direction.java
  • Type: enum
  • Modifiers: public
  • Implements: Iterable<Direction>,Predicate<Direction>

net.minecraft.core.Direction$Plane#getRandomAxis(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:557
  • Modifiers: public
  • Return: Direction.Axis

คืออะไร

อ่านค่า Random Axis

ทำงานยังไง

เรียกต่อ: getRandom(). คืนค่า: Util.getRandom(this.axis, randomSource).

Parameters

  • RandomSource randomSource

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

Direction.Plane instance = ...;
RandomSource randomSource = ...;
Direction.Axis result = instance.getRandomAxis(randomSource);

net.minecraft.core.Direction$Plane#getRandomDirection(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:553
  • Modifiers: public
  • Return: Direction

คืออะไร

อ่านค่า Random Direction

ทำงานยังไง

เรียกต่อ: getRandom(). คืนค่า: Util.getRandom(this.faces, randomSource).

Parameters

  • RandomSource randomSource

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

Direction.Plane instance = ...;
RandomSource randomSource = ...;
Direction result = instance.getRandomDirection(randomSource);

net.minecraft.core.Direction$Plane#iterator()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:565
  • Modifiers: public
  • Return: Iterator<Direction>

คืออะไร

ดำเนินการ iterator ตาม implementation ของ Direction$Plane

ทำงานยังไง

เรียกต่อ: forArray(). คืนค่า: Iterators.forArray(this.faces).

Parameters

  • ไม่มี

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

Direction.Plane instance = ...;
Iterator<Direction> result = instance.iterator();

net.minecraft.core.Direction$Plane#length()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:578
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ length ตาม implementation ของ Direction$Plane

ทำงานยังไง

คืนค่า: this.faces.length.

Parameters

  • ไม่มี

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

Direction.Plane instance = ...;
int result = instance.length();

net.minecraft.core.Direction$Plane#shuffledCopy(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:574
  • Modifiers: public
  • Return: List<Direction>

คืออะไร

ดำเนินการ shuffledCopy ตาม implementation ของ Direction$Plane

ทำงานยังไง

คืนค่า: Util.shuffledCopy(this.faces, randomSource).

Parameters

  • RandomSource randomSource

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

Direction.Plane instance = ...;
RandomSource randomSource = ...;
List<Direction> result = instance.shuffledCopy(randomSource);

net.minecraft.core.Direction$Plane#stream()

  • Origin: common
  • Source: net/minecraft/core/Direction.java:570
  • Modifiers: public
  • Return: Stream<Direction>

คืออะไร

ดำเนินการ stream ตาม implementation ของ Direction$Plane

ทำงานยังไง

คืนค่า: Arrays.stream(this.faces).

Parameters

  • ไม่มี

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

Direction.Plane instance = ...;
Stream<Direction> result = instance.stream();

net.minecraft.core.Direction$Plane#test(Direction)

  • Origin: common
  • Source: net/minecraft/core/Direction.java:561
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: getAxis(), getPlane(). คืนค่า: direction != null && direction.getAxis().getPlane() == this.

Parameters

  • Direction direction

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

Direction.Plane instance = ...;
Direction direction = ...;
boolean result = instance.test(direction);

Direction8

  • Full name: net.minecraft.core.Direction8
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Direction8.java
  • Type: enum
  • Modifiers: public

net.minecraft.core.Direction8#getDirections()

  • Origin: common
  • Source: net/minecraft/core/Direction8.java:29
  • Modifiers: public
  • Return: Set<Direction>

คืออะไร

อ่านค่า Directions

ทำงานยังไง

คืนค่า: this.directions.

Parameters

  • ไม่มี

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

Direction8 instance = ...;
Set<Direction> result = instance.getDirections();

net.minecraft.core.Direction8#getStepX()

  • Origin: common
  • Source: net/minecraft/core/Direction8.java:33
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step X

ทำงานยังไง

เรียกต่อ: getX(). คืนค่า: this.step.getX().

Parameters

  • ไม่มี

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

Direction8 instance = ...;
int result = instance.getStepX();

net.minecraft.core.Direction8#getStepZ()

  • Origin: common
  • Source: net/minecraft/core/Direction8.java:37
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Step Z

ทำงานยังไง

เรียกต่อ: getZ(). คืนค่า: this.step.getZ().

Parameters

  • ไม่มี

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

Direction8 instance = ...;
int result = instance.getStepZ();

FrontAndTop

  • Full name: net.minecraft.core.FrontAndTop
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/FrontAndTop.java
  • Type: enum
  • Modifiers: public
  • Implements: StringRepresentable

net.minecraft.core.FrontAndTop#fromFrontAndTop(Direction,Direction)

  • Origin: common
  • Source: net/minecraft/core/FrontAndTop.java:45
  • Modifiers: public static
  • Return: FrontAndTop

คืออะไร

ดำเนินการ fromFrontAndTop ตาม implementation ของ FrontAndTop

ทำงานยังไง

เรียกต่อ: lookupKey(). คืนค่า: BY_TOP_FRONT[lookupKey(direction, direction2)].

Parameters

  • Direction direction
  • Direction direction2

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

Direction direction = ...;
Direction direction2 = ...;
FrontAndTop result = FrontAndTop.fromFrontAndTop(direction, direction2);

net.minecraft.core.FrontAndTop#front()

  • Origin: common
  • Source: net/minecraft/core/FrontAndTop.java:49
  • Modifiers: public
  • Return: Direction

คืออะไร

ดำเนินการ front ตาม implementation ของ FrontAndTop

ทำงานยังไง

คืนค่า: this.front.

Parameters

  • ไม่มี

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

FrontAndTop instance = ...;
Direction result = instance.front();

net.minecraft.core.FrontAndTop#getSerializedName()

  • Origin: common
  • Source: net/minecraft/core/FrontAndTop.java:40
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Serialized Name

ทำงานยังไง

คืนค่า: this.name.

Parameters

  • ไม่มี

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

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

net.minecraft.core.FrontAndTop#top()

  • Origin: common
  • Source: net/minecraft/core/FrontAndTop.java:53
  • Modifiers: public
  • Return: Direction

คืออะไร

ดำเนินการ top ตาม implementation ของ FrontAndTop

ทำงานยังไง

คืนค่า: this.top.

Parameters

  • ไม่มี

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

FrontAndTop instance = ...;
Direction result = instance.top();

GlobalPos

  • Full name: net.minecraft.core.GlobalPos
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/GlobalPos.java
  • Type: record
  • Modifiers: public

net.minecraft.core.GlobalPos#isCloseEnough(ResourceKey<Level>,BlockPos,int)

  • Origin: common
  • Source: net/minecraft/core/GlobalPos.java:33
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Close Enough

ทำงานยังไง

เรียกต่อ: equals(), distChessboard(). คืนค่า: this.dimension.equals(resourceKey) && this.pos.distChessboard(blockPos) <= i.

Parameters

  • ResourceKey<Level> resourceKey
  • BlockPos blockPos
  • int i

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

GlobalPos instance = ...;
ResourceKey<Level> resourceKey = ...;
BlockPos blockPos = ...;
boolean result = instance.isCloseEnough(resourceKey, blockPos, 0);

net.minecraft.core.GlobalPos#of(ResourceKey<Level>,BlockPos)

  • Origin: common
  • Source: net/minecraft/core/GlobalPos.java:24
  • Modifiers: public static
  • Return: GlobalPos

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: GlobalPos. คืนค่า: new GlobalPos(resourceKey, blockPos).

Parameters

  • ResourceKey<Level> resourceKey
  • BlockPos blockPos

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

ResourceKey<Level> resourceKey = ...;
BlockPos blockPos = ...;
GlobalPos result = GlobalPos.of(resourceKey, blockPos);

net.minecraft.core.GlobalPos#toString()

  • Origin: common
  • Source: net/minecraft/core/GlobalPos.java:28
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

คืนค่า: this.dimension + " " + this.pos.

Parameters

  • ไม่มี

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

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

Holder

  • Full name: net.minecraft.core.Holder
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Holder.java
  • Type: interface
  • Modifiers: public

net.minecraft.core.Holder#canSerializeIn(HolderOwner<T>)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:38
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Serialize In

ทำงานยังไง

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

Parameters

  • HolderOwner<T> holderOwner

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

Holder instance = ...;
HolderOwner<T> holderOwner = ...;
boolean result = instance.canSerializeIn(holderOwner);

net.minecraft.core.Holder#direct(T)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:44
  • Modifiers: static
  • Return: Holder<T>

คืออะไร

ดำเนินการ direct ตาม implementation ของ Holder

ทำงานยังไง

สร้างออบเจ็กต์: Holder.Direct<>. คืนค่า: new Holder.Direct<>(object).

Parameters

  • T object

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

T object = ...;
Holder<T> result = Holder.direct(object);

net.minecraft.core.Holder#getRegisteredName()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:40
  • Modifiers: default
  • Return: String

คืออะไร

อ่านค่า Registered Name

ทำงานยังไง

เรียกต่อ: unwrapKey(), map(), location(), toString(), orElse(). คืนค่า: this.unwrapKey().map(resourceKey -> resourceKey.location().toString()).orElse("[unregistered]").

Parameters

  • ไม่มี

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

Holder instance = ...;
String result = instance.getRegisteredName();

net.minecraft.core.Holder#is(Holder<T>)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:27
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Holder<T> holder

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

Holder instance = ...;
Holder<T> holder = ...;
boolean result = instance.is(holder);

net.minecraft.core.Holder#is(Predicate<ResourceKey<T>>)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:23
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • Predicate<ResourceKey<T>> predicate

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

Holder instance = ...;
Predicate<ResourceKey<T>> predicate = ...;
boolean result = instance.is(predicate);

net.minecraft.core.Holder#is(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:21
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey

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

Holder instance = ...;
ResourceKey<T> resourceKey = ...;
boolean result = instance.is(resourceKey);

net.minecraft.core.Holder#is(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:19
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ResourceLocation resourceLocation

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

Holder instance = ...;
ResourceLocation resourceLocation = ...;
boolean result = instance.is(resourceLocation);

net.minecraft.core.Holder#is(TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Holder.java:25
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • TagKey<T> tagKey

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

Holder instance = ...;
TagKey<T> tagKey = ...;
boolean result = instance.is(tagKey);

net.minecraft.core.Holder#isBound()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:17
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
boolean result = instance.isBound();

net.minecraft.core.Holder#kind()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:36
  • Modifiers: ``
  • Return: Holder.Kind

คืออะไร

ดำเนินการ kind ตาม implementation ของ Holder

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
Holder.Kind result = instance.kind();

net.minecraft.core.Holder#tags()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:30
  • Modifiers: ``
  • Return: Stream<TagKey<T>>

คืออะไร

ดำเนินการ tags ตาม implementation ของ Holder

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
Stream<TagKey<T>> result = instance.tags();

net.minecraft.core.Holder#unwrap()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:32
  • Modifiers: ``
  • Return: Either<ResourceKey<T>, T>

คืออะไร

ดำเนินการ unwrap ตาม implementation ของ Holder

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
Either<ResourceKey<T>, T> result = instance.unwrap();

net.minecraft.core.Holder#unwrapKey()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:34
  • Modifiers: ``
  • Return: Optional<ResourceKey<T>>

คืออะไร

ดำเนินการ unwrapKey ตาม implementation ของ Holder

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
Optional<ResourceKey<T>> result = instance.unwrapKey();

net.minecraft.core.Holder#value()

  • Origin: common
  • Source: net/minecraft/core/Holder.java:15
  • Modifiers: ``
  • Return: T

คืออะไร

ดำเนินการ value ตาม implementation ของ Holder

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Holder instance = ...;
T result = instance.value();

HolderGetter

  • Full name: net.minecraft.core.HolderGetter
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/HolderGetter.java
  • Type: interface
  • Modifiers: public

net.minecraft.core.HolderGetter#get(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderGetter.java:8
  • Modifiers: ``
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey

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

HolderGetter instance = ...;
ResourceKey<T> resourceKey = ...;
Optional<Holder.Reference<T>> result = instance.get(resourceKey);

net.minecraft.core.HolderGetter#get(TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderGetter.java:14
  • Modifiers: ``
  • Return: Optional<HolderSet.Named<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • TagKey<T> tagKey

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

HolderGetter instance = ...;
TagKey<T> tagKey = ...;
Optional<HolderSet.Named<T>> result = instance.get(tagKey);

net.minecraft.core.HolderGetter#getOrThrow(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderGetter.java:10
  • Modifiers: default
  • Return: Holder.Reference<T>

คืออะไร

อ่านค่า Or Throw

ทำงานยังไง

เรียกต่อ: get(), orElseThrow(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.get(resourceKey).orElseThrow(() -> new IllegalStateException("Missing element " + resourceKey)).

Parameters

  • ResourceKey<T> resourceKey

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

HolderGetter instance = ...;
ResourceKey<T> resourceKey = ...;
Holder.Reference<T> result = instance.getOrThrow(resourceKey);

net.minecraft.core.HolderGetter#getOrThrow(TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderGetter.java:16
  • Modifiers: default
  • Return: HolderSet.Named<T>

คืออะไร

อ่านค่า Or Throw

ทำงานยังไง

เรียกต่อ: get(), orElseThrow(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.get(tagKey).orElseThrow(() -> new IllegalStateException("Missing tag " + tagKey)).

Parameters

  • TagKey<T> tagKey

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

HolderGetter instance = ...;
TagKey<T> tagKey = ...;
HolderSet.Named<T> result = instance.getOrThrow(tagKey);

HolderLookup

  • Full name: net.minecraft.core.HolderLookup
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/HolderLookup.java
  • Type: interface
  • Modifiers: public
  • Implements: HolderGetter<T>

net.minecraft.core.HolderLookup#listElementIds()

  • Origin: common
  • Source: net/minecraft/core/HolderLookup.java:19
  • Modifiers: default
  • Return: Stream<ResourceKey<T>>

คืออะไร

ดำเนินการ listElementIds ตาม implementation ของ HolderLookup

ทำงานยังไง

เรียกต่อ: listElements(), map(). คืนค่า: this.listElements().map(Holder.Reference::key).

Parameters

  • ไม่มี

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

HolderLookup instance = ...;
Stream<ResourceKey<T>> result = instance.listElementIds();

net.minecraft.core.HolderLookup#listElements()

  • Origin: common
  • Source: net/minecraft/core/HolderLookup.java:17
  • Modifiers: ``
  • Return: Stream<Holder.Reference<T>>

คืออะไร

ดำเนินการ listElements ตาม implementation ของ HolderLookup

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderLookup instance = ...;
Stream<Holder.Reference<T>> result = instance.listElements();

net.minecraft.core.HolderLookup#listTagIds()

  • Origin: common
  • Source: net/minecraft/core/HolderLookup.java:25
  • Modifiers: default
  • Return: Stream<TagKey<T>>

คืออะไร

ดำเนินการ listTagIds ตาม implementation ของ HolderLookup

ทำงานยังไง

เรียกต่อ: listTags(), map(). คืนค่า: this.listTags().map(HolderSet.Named::key).

Parameters

  • ไม่มี

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

HolderLookup instance = ...;
Stream<TagKey<T>> result = instance.listTagIds();

net.minecraft.core.HolderLookup#listTags()

  • Origin: common
  • Source: net/minecraft/core/HolderLookup.java:23
  • Modifiers: ``
  • Return: Stream<HolderSet.Named<T>>

คืออะไร

ดำเนินการ listTags ตาม implementation ของ HolderLookup

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderLookup instance = ...;
Stream<HolderSet.Named<T>> result = instance.listTags();

HolderOwner

  • Full name: net.minecraft.core.HolderOwner
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/HolderOwner.java
  • Type: interface
  • Modifiers: public

net.minecraft.core.HolderOwner#canSerializeIn(HolderOwner<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderOwner.java:4
  • Modifiers: default
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Serialize In

ทำงานยังไง

คืนค่า: holderOwner == this.

Parameters

  • HolderOwner<T> holderOwner

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

HolderOwner instance = ...;
HolderOwner<T> holderOwner = ...;
boolean result = instance.canSerializeIn(holderOwner);

HolderSet

  • Full name: net.minecraft.core.HolderSet
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/HolderSet.java
  • Type: interface
  • Modifiers: public
  • Implements: Iterable<Holder<T>>

net.minecraft.core.HolderSet#canSerializeIn(HolderOwner<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:33
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Serialize In

ทำงานยังไง

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

Parameters

  • HolderOwner<T> holderOwner

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

HolderSet instance = ...;
HolderOwner<T> holderOwner = ...;
boolean result = instance.canSerializeIn(holderOwner);

net.minecraft.core.HolderSet#contains(Holder<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:31
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี contains

ทำงานยังไง

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

Parameters

  • Holder<T> holder

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

HolderSet instance = ...;
Holder<T> holder = ...;
boolean result = instance.contains(holder);

net.minecraft.core.HolderSet#direct(Function<E, Holder<T>>,Collection<E>)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:66
  • Modifiers: static
  • Return: HolderSet.Direct<T>

คืออะไร

ดำเนินการ direct ตาม implementation ของ HolderSet

ทำงานยังไง

เรียกต่อ: stream(), map(), toList(). คืนค่า: direct(collection.stream().map(function).toList()).

Parameters

  • Function<E, Holder<T>> function
  • Collection<E> collection

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

Function<E, Holder<T>> function = ...;
Collection<E> collection = ...;
HolderSet.Direct<T> result = HolderSet.direct(function, collection);

net.minecraft.core.HolderSet#direct(Function<E, Holder<T>>,E[])

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:61
  • Modifiers: static
  • Return: HolderSet.Direct<T>

คืออะไร

ดำเนินการ direct ตาม implementation ของ HolderSet

ทำงานยังไง

เรียกต่อ: of(), map(), toList(). คืนค่า: direct(Stream.of(objects).map(function).toList()).

Parameters

  • Function<E, Holder<T>> function
  • E[] objects

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

Function<E, Holder<T>> function = ...;
E[] objects = ...;
HolderSet.Direct<T> result = HolderSet.direct(function, objects);

net.minecraft.core.HolderSet#direct(Holder<T>[])

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:52
  • Modifiers: static
  • Return: HolderSet.Direct<T>

คืออะไร

ดำเนินการ direct ตาม implementation ของ HolderSet

ทำงานยังไง

เรียกต่อ: of(). สร้างออบเจ็กต์: HolderSet.Direct<>. คืนค่า: new HolderSet.Direct<>(List.of(holders)).

Parameters

  • Holder<T>[] holders

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

Holder<T>[] holders = ...;
HolderSet.Direct<T> result = HolderSet.direct(holders);

net.minecraft.core.HolderSet#direct(List<? extends Holder<T>>)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:57
  • Modifiers: static
  • Return: HolderSet.Direct<T>

คืออะไร

ดำเนินการ direct ตาม implementation ของ HolderSet

ทำงานยังไง

เรียกต่อ: copyOf(). สร้างออบเจ็กต์: HolderSet.Direct<>. คืนค่า: new HolderSet.Direct<>(List.copyOf(list)).

Parameters

  • List<? extends Holder<T>> list

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

List<? extends Holder<T>> list = ...;
HolderSet.Direct<T> result = HolderSet.direct(list);

net.minecraft.core.HolderSet#empty()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:48
  • Modifiers: static
  • Return: HolderSet<T>

คืออะไร

ดำเนินการ empty ตาม implementation ของ HolderSet

ทำงานยังไง

คืนค่า: (HolderSet<T>)HolderSet.Direct.EMPTY.

Parameters

  • ไม่มี

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

HolderSet<T> result = HolderSet.empty();

net.minecraft.core.HolderSet#emptyNamed(HolderOwner<T>,TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:37
  • Modifiers: static
  • Return: HolderSet.Named<T>

คืออะไร

ดำเนินการ emptyNamed ตาม implementation ของ HolderSet

ทำงานยังไง

เรียกต่อ: contents(), key(). สร้างออบเจ็กต์: HolderSet.Named<T>, UnsupportedOperationException.

Parameters

  • HolderOwner<T> holderOwner
  • TagKey<T> tagKey

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

HolderOwner<T> holderOwner = ...;
TagKey<T> tagKey = ...;
HolderSet.Named<T> result = HolderSet.emptyNamed(holderOwner, tagKey);

net.minecraft.core.HolderSet#get(int)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:29
  • Modifiers: ``
  • Return: Holder<T>

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • int i

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

HolderSet instance = ...;
Holder<T> result = instance.get(0);

net.minecraft.core.HolderSet#getRandomElement(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:27
  • Modifiers: ``
  • Return: Optional<Holder<T>>

คืออะไร

อ่านค่า Random Element

ทำงานยังไง

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

Parameters

  • RandomSource randomSource

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

HolderSet instance = ...;
RandomSource randomSource = ...;
Optional<Holder<T>> result = instance.getRandomElement(randomSource);

net.minecraft.core.HolderSet#isBound()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:23
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderSet instance = ...;
boolean result = instance.isBound();

net.minecraft.core.HolderSet#size()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:21
  • Modifiers: ``
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ HolderSet

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderSet instance = ...;
int result = instance.size();

net.minecraft.core.HolderSet#stream()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:19
  • Modifiers: ``
  • Return: Stream<Holder<T>>

คืออะไร

ดำเนินการ stream ตาม implementation ของ HolderSet

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderSet instance = ...;
Stream<Holder<T>> result = instance.stream();

net.minecraft.core.HolderSet#unwrap()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:25
  • Modifiers: ``
  • Return: Either<TagKey<T>, List<Holder<T>>>

คืออะไร

ดำเนินการ unwrap ตาม implementation ของ HolderSet

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderSet instance = ...;
Either<TagKey<T>, List<Holder<T>>> result = instance.unwrap();

net.minecraft.core.HolderSet#unwrapKey()

  • Origin: common
  • Source: net/minecraft/core/HolderSet.java:35
  • Modifiers: ``
  • Return: Optional<TagKey<T>>

คืออะไร

ดำเนินการ unwrapKey ตาม implementation ของ HolderSet

ทำงานยังไง

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

Parameters

  • ไม่มี

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

HolderSet instance = ...;
Optional<TagKey<T>> result = instance.unwrapKey();

IdMap

  • Full name: net.minecraft.core.IdMap
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/IdMap.java
  • Type: interface
  • Modifiers: public
  • Implements: Iterable<T>

net.minecraft.core.IdMap#byId(int)

  • Origin: common
  • Source: net/minecraft/core/IdMap.java:10
  • Modifiers: ``
  • Return: T

คืออะไร

ดำเนินการ byId ตาม implementation ของ IdMap

ทำงานยังไง

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

Parameters

  • int i

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

IdMap instance = ...;
T result = instance.byId(0);

net.minecraft.core.IdMap#byIdOrThrow(int)

  • Origin: common
  • Source: net/minecraft/core/IdMap.java:13
  • Modifiers: default
  • Return: T

คืออะไร

ดำเนินการ byIdOrThrow ตาม implementation ของ IdMap

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: byId(). สร้างออบเจ็กต์: IllegalArgumentException. คืนค่า: object.

Parameters

  • int i

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

IdMap instance = ...;
T result = instance.byIdOrThrow(0);

net.minecraft.core.IdMap#getId(T)

  • Origin: common
  • Source: net/minecraft/core/IdMap.java:8
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

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

Parameters

  • T object

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

IdMap instance = ...;
T object = ...;
int result = instance.getId(object);

net.minecraft.core.IdMap#getIdOrThrow(T)

  • Origin: common
  • Source: net/minecraft/core/IdMap.java:22
  • Modifiers: default
  • Return: int

คืออะไร

อ่านค่า Id Or Throw

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getId(). สร้างออบเจ็กต์: IllegalArgumentException. คืนค่า: i.

Parameters

  • T object

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

IdMap instance = ...;
T object = ...;
int result = instance.getIdOrThrow(object);

net.minecraft.core.IdMap#size()

  • Origin: common
  • Source: net/minecraft/core/IdMap.java:31
  • Modifiers: ``
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ IdMap

ทำงานยังไง

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

Parameters

  • ไม่มี

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

IdMap instance = ...;
int result = instance.size();

IdMapper

  • Full name: net.minecraft.core.IdMapper
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/IdMapper.java
  • Type: class
  • Modifiers: public
  • Implements: IdMap<T>

net.minecraft.core.IdMapper#add(T)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:40
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม add

ทำงานยังไง

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

Parameters

  • T object

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

IdMapper instance = ...;
T object = ...;
instance.add(object);

net.minecraft.core.IdMapper#addMapping(T,int)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:27
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Mapping

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: nextId. เรียกต่อ: put(), size(), add(), set().

Parameters

  • T object
  • int i

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

IdMapper instance = ...;
T object = ...;
instance.addMapping(object, 0);

net.minecraft.core.IdMapper#byId(int)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:49
  • Modifiers: public final
  • Return: T

คืออะไร

ดำเนินการ byId ตาม implementation ของ IdMapper

ทำงานยังไง

เรียกต่อ: size(), get(). คืนค่า: i >= 0 && i < this.idToT.size() ? this.idToT.get(i) : null.

Parameters

  • int i

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

IdMapper instance = ...;
T result = instance.byId(0);

net.minecraft.core.IdMapper#contains(int)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:60
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี contains

ทำงานยังไง

เรียกต่อ: byId(). คืนค่า: this.byId(i) != null.

Parameters

  • int i

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

IdMapper instance = ...;
boolean result = instance.contains(0);

net.minecraft.core.IdMapper#getId(T)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:44
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

เรียกต่อ: getInt(). คืนค่า: this.tToId.getInt(object).

Parameters

  • T object

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

IdMapper instance = ...;
T object = ...;
int result = instance.getId(object);

net.minecraft.core.IdMapper#IdMapper()

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

IdMapper instance = new IdMapper();

net.minecraft.core.IdMapper#IdMapper(int)

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:21
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: idToT, tToId. เรียกต่อ: newArrayListWithExpectedSize(), defaultReturnValue(). สร้างออบเจ็กต์: Reference2IntOpenHashMap<>.

Parameters

  • int i

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

IdMapper instance = new IdMapper(0);

net.minecraft.core.IdMapper#iterator()

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:55
  • Modifiers: public
  • Return: Iterator<T>

คืออะไร

ดำเนินการ iterator ตาม implementation ของ IdMapper

ทำงานยังไง

เรียกต่อ: filter(). คืนค่า: Iterators.filter(this.idToT.iterator(), Objects::nonNull).

Parameters

  • ไม่มี

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

IdMapper instance = ...;
Iterator<T> result = instance.iterator();

net.minecraft.core.IdMapper#size()

  • Origin: common
  • Source: net/minecraft/core/IdMapper.java:64
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ IdMapper

ทำงานยังไง

คืนค่า: this.tToId.size().

Parameters

  • ไม่มี

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

IdMapper instance = ...;
int result = instance.size();

LayeredRegistryAccess

  • Full name: net.minecraft.core.LayeredRegistryAccess
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/LayeredRegistryAccess.java
  • Type: class
  • Modifiers: public

net.minecraft.core.LayeredRegistryAccess#compositeAccess()

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:84
  • Modifiers: public
  • Return: RegistryAccess.Frozen

คืออะไร

ดำเนินการ compositeAccess ตาม implementation ของ LayeredRegistryAccess

ทำงานยังไง

คืนค่า: this.composite.

Parameters

  • ไม่มี

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

LayeredRegistryAccess instance = ...;
RegistryAccess.Frozen result = instance.compositeAccess();

net.minecraft.core.LayeredRegistryAccess#getAccessForLoading(T)

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:45
  • Modifiers: public
  • Return: RegistryAccess.Frozen

คืออะไร

อ่านค่า Access For Loading

ทำงานยังไง

เรียกต่อ: getLayerIndexOrThrow(), getCompositeAccessForLayers(). คืนค่า: this.getCompositeAccessForLayers(0, i).

Parameters

  • T object

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

LayeredRegistryAccess instance = ...;
T object = ...;
RegistryAccess.Frozen result = instance.getAccessForLoading(object);

net.minecraft.core.LayeredRegistryAccess#getAccessFrom(T)

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:50
  • Modifiers: public
  • Return: RegistryAccess.Frozen

คืออะไร

อ่านค่า Access From

ทำงานยังไง

เรียกต่อ: getLayerIndexOrThrow(), getCompositeAccessForLayers(), size(). คืนค่า: this.getCompositeAccessForLayers(i, this.values.size()).

Parameters

  • T object

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

LayeredRegistryAccess instance = ...;
T object = ...;
RegistryAccess.Frozen result = instance.getAccessFrom(object);

net.minecraft.core.LayeredRegistryAccess#getLayer(T)

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:40
  • Modifiers: public
  • Return: RegistryAccess.Frozen

คืออะไร

อ่านค่า Layer

ทำงานยังไง

เรียกต่อ: getLayerIndexOrThrow(), get(). คืนค่า: this.values.get(i).

Parameters

  • T object

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

LayeredRegistryAccess instance = ...;
T object = ...;
RegistryAccess.Frozen result = instance.getLayer(object);

net.minecraft.core.LayeredRegistryAccess#LayeredRegistryAccess(List<T>)

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:17
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

เรียกต่อ: make(), size(), fill(), asList(). คืนค่า: Arrays.asList(frozens).

Parameters

  • List<T> list

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

List<T> list = ...;
LayeredRegistryAccess instance = new LayeredRegistryAccess(list);

net.minecraft.core.LayeredRegistryAccess#replaceFrom(T,List<RegistryAccess.Frozen>)

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:63
  • Modifiers: public
  • Return: LayeredRegistryAccess<T>

คืออะไร

ดำเนินการ replaceFrom ตาม implementation ของ LayeredRegistryAccess

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getLayerIndexOrThrow(), size(), add(), get(), addAll(). สร้างออบเจ็กต์: IllegalStateException, ArrayList<>, LayeredRegistryAccess<>. คืนค่า: new LayeredRegistryAccess<>(this.keys, list2).

Parameters

  • T object
  • List<RegistryAccess.Frozen> list

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

LayeredRegistryAccess instance = ...;
T object = ...;
List<RegistryAccess.Frozen> list = ...;
LayeredRegistryAccess<T> result = instance.replaceFrom(object, list);

net.minecraft.core.LayeredRegistryAccess#replaceFrom(T,RegistryAccess.Frozen[])

  • Origin: common
  • Source: net/minecraft/core/LayeredRegistryAccess.java:59
  • Modifiers: public
  • Return: LayeredRegistryAccess<T>

คืออะไร

ดำเนินการ replaceFrom ตาม implementation ของ LayeredRegistryAccess

ทำงานยังไง

เรียกต่อ: asList(). คืนค่า: this.replaceFrom(object, Arrays.asList(frozens)).

Parameters

  • T object
  • RegistryAccess.Frozen[] frozens

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

LayeredRegistryAccess instance = ...;
T object = ...;
RegistryAccess.Frozen[] frozens = ...;
LayeredRegistryAccess<T> result = instance.replaceFrom(object, frozens);

MappedRegistry

  • Full name: net.minecraft.core.MappedRegistry
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/MappedRegistry.java
  • Type: class
  • Modifiers: public
  • Implements: WritableRegistry<T>

net.minecraft.core.MappedRegistry#bindAllTagsToEmpty()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:366
  • Modifiers: public
  • Return: void

คืออะไร

ผูก All Tags To Empty

ทำงานยังไง

เรียกต่อ: validateWrite(), values(), forEach(), bind(), of().

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
instance.bindAllTagsToEmpty();

net.minecraft.core.MappedRegistry#bindTag(TagKey<T>,List<Holder<T>>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:348
  • Modifiers: public
  • Return: void

คืออะไร

ผูก Tag

ทำงานยังไง

เรียกต่อ: validateWrite(), getOrCreateTagForRegistration(), bind().

Parameters

  • TagKey<T> tagKey
  • List<Holder<T>> list

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

MappedRegistry instance = ...;
TagKey<T> tagKey = ...;
List<Holder<T>> list = ...;
instance.bindTag(tagKey, list);

net.minecraft.core.MappedRegistry#byId(int)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:148
  • Modifiers: public
  • Return: T

คืออะไร

ดำเนินการ byId ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: size(), get(), value(). คืนค่า: i >= 0 && i < this.byId.size() ? this.byId.get(i).value() : null.

Parameters

  • int i

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

MappedRegistry instance = ...;
T result = instance.byId(0);

net.minecraft.core.MappedRegistry#containsKey(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:271
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Key

ทำงานยังไง

คืนค่า: this.byKey.containsKey(resourceKey).

Parameters

  • ResourceKey<T> resourceKey

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

MappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
boolean result = instance.containsKey(resourceKey);

net.minecraft.core.MappedRegistry#containsKey(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:266
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Key

ทำงานยังไง

คืนค่า: this.byLocation.containsKey(resourceLocation).

Parameters

  • ResourceLocation resourceLocation

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

MappedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
boolean result = instance.containsKey(resourceLocation);

net.minecraft.core.MappedRegistry#createIntrusiveHolder(T)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:323
  • Modifiers: public
  • Return: Holder.Reference<T>

คืออะไร

สร้าง Intrusive Holder

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: unregisteredIntrusiveHolders. เรียกต่อ: validateWrite(), computeIfAbsent(), createIntrusive(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.unregisteredIntrusiveHolders.computeIfAbsent(object, objectx -> Holder.Reference.createIntrusive(this, (T)objectx)).

Parameters

  • T object

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

MappedRegistry instance = ...;
T object = ...;
Holder.Reference<T> result = instance.createIntrusiveHolder(object);

net.minecraft.core.MappedRegistry#createRegistrationLookup()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:371
  • Modifiers: public
  • Return: HolderGetter<T>

คืออะไร

สร้าง Registration Lookup

ทำงานยังไง

เรียกต่อ: validateWrite(), get(), of(), getOrThrow(), getOrCreateHolderOrThrow(), getOrCreateTagForRegistration(). สร้างออบเจ็กต์: HolderGetter<T>. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
HolderGetter<T> result = instance.createRegistrationLookup();

net.minecraft.core.MappedRegistry#entrySet()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:233
  • Modifiers: public
  • Return: Set<Entry<ResourceKey<T>, T>>

คืออะไร

ดำเนินการ entrySet ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: unmodifiableSet(), transformValues(). คืนค่า: Collections.unmodifiableSet(Maps.transformValues(this.byKey, Holder::value).entrySet()).

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Set<Entry<ResourceKey<T>, T>> result = instance.entrySet();

net.minecraft.core.MappedRegistry#freeze()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:276
  • Modifiers: public
  • Return: Registry<T>

คืออะไร

ดำเนินการ freeze ตาม implementation ของ MappedRegistry

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: frozen, unregisteredIntrusiveHolders, allTags. เรียกต่อ: forEach(), bindValue(), entrySet(), stream(), filter(), getValue(), isBound(), map(). สร้างออบเจ็กต์: IllegalStateException. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Registry<T> result = instance.freeze();

net.minecraft.core.MappedRegistry#get(int)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:154
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: size(), ofNullable(), empty(). คืนค่า: i >= 0 && i < this.byId.size() ? Optional.ofNullable(this.byId.get(i)) : Optional.empty().

Parameters

  • int i

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

MappedRegistry instance = ...;
Optional<Holder.Reference<T>> result = instance.get(0);

net.minecraft.core.MappedRegistry#get(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:164
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: ofNullable(). คืนค่า: Optional.ofNullable(this.byKey.get(resourceKey)).

Parameters

  • ResourceKey<T> resourceKey

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

MappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
Optional<Holder.Reference<T>> result = instance.get(resourceKey);

net.minecraft.core.MappedRegistry#get(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:159
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: ofNullable(). คืนค่า: Optional.ofNullable(this.byLocation.get(resourceLocation)).

Parameters

  • ResourceLocation resourceLocation

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

MappedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
Optional<Holder.Reference<T>> result = instance.get(resourceLocation);

net.minecraft.core.MappedRegistry#get(TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:333
  • Modifiers: public
  • Return: Optional<HolderSet.Named<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.allTags.get(tagKey).

Parameters

  • TagKey<T> tagKey

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

MappedRegistry instance = ...;
TagKey<T> tagKey = ...;
Optional<HolderSet.Named<T>> result = instance.get(tagKey);

net.minecraft.core.MappedRegistry#getAny()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:169
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Any

ทำงานยังไง

เรียกต่อ: isEmpty(), empty(), of(), getFirst(). คืนค่า: this.byId.isEmpty() ? Optional.empty() : Optional.of(this.byId.getFirst()).

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Optional<Holder.Reference<T>> result = instance.getAny();

net.minecraft.core.MappedRegistry#getId(T)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:137
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

เรียกต่อ: getInt(). คืนค่า: this.toId.getInt(object).

Parameters

  • T object

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

MappedRegistry instance = ...;
T object = ...;
int result = instance.getId(object);

net.minecraft.core.MappedRegistry#getKey(T)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:125
  • Modifiers: public
  • Return: ResourceLocation

คืออะไร

อ่านค่า Key

ทำงานยังไง

เรียกต่อ: get(), key(), location(). คืนค่า: reference != null ? reference.key().location() : null.

Parameters

  • T object

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

MappedRegistry instance = ...;
T object = ...;
ResourceLocation result = instance.getKey(object);

net.minecraft.core.MappedRegistry#getRandom(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:261
  • Modifiers: public
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Random

ทำงานยังไง

เรียกต่อ: getRandomSafe(). คืนค่า: Util.getRandomSafe(this.byId, randomSource).

Parameters

  • RandomSource randomSource

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

MappedRegistry instance = ...;
RandomSource randomSource = ...;
Optional<Holder.Reference<T>> result = instance.getRandom(randomSource);

net.minecraft.core.MappedRegistry#getResourceKey(T)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:132
  • Modifiers: public
  • Return: Optional<ResourceKey<T>>

คืออะไร

อ่านค่า Resource Key

ทำงานยังไง

เรียกต่อ: ofNullable(), get(), map(). คืนค่า: Optional.ofNullable(this.byValue.get(object)).map(Holder.Reference::key).

Parameters

  • T object

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

MappedRegistry instance = ...;
T object = ...;
Optional<ResourceKey<T>> result = instance.getResourceKey(object);

net.minecraft.core.MappedRegistry#getTags()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:243
  • Modifiers: public
  • Return: Stream<HolderSet.Named<T>>

คืออะไร

อ่านค่า Tags

ทำงานยังไง

คืนค่า: this.allTags.getTags().

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Stream<HolderSet.Named<T>> result = instance.getTags();

net.minecraft.core.MappedRegistry#getValue(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:142
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

เรียกต่อ: getValueFromNullable(), get(). คืนค่า: getValueFromNullable(this.byKey.get(resourceKey)).

Parameters

  • ResourceKey<T> resourceKey

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

MappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
T result = instance.getValue(resourceKey);

net.minecraft.core.MappedRegistry#getValue(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:211
  • Modifiers: public
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

เรียกต่อ: get(), getValueFromNullable(). คืนค่า: getValueFromNullable(reference).

Parameters

  • ResourceLocation resourceLocation

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

MappedRegistry instance = ...;
ResourceLocation resourceLocation = ...;
T result = instance.getValue(resourceLocation);

net.minecraft.core.MappedRegistry#isEmpty()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:256
  • Modifiers: public
  • Return: boolean

คืออะไร

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

ทำงานยังไง

คืนค่า: this.byKey.isEmpty().

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
boolean result = instance.isEmpty();

net.minecraft.core.MappedRegistry#iterator()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:206
  • Modifiers: public
  • Return: Iterator<T>

คืออะไร

ดำเนินการ iterator ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: transform(). คืนค่า: Iterators.transform(this.byId.iterator(), Holder::value).

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Iterator<T> result = instance.iterator();

net.minecraft.core.MappedRegistry#key()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:67
  • Modifiers: public
  • Return: ResourceKey<? extends Registry<T>>

คืออะไร

ดำเนินการ key ตาม implementation ของ MappedRegistry

ทำงานยังไง

คืนค่า: this.key.

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
ResourceKey<? extends Registry<T>> result = instance.key();

net.minecraft.core.MappedRegistry#keySet()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:223
  • Modifiers: public
  • Return: Set<ResourceLocation>

คืออะไร

ดำเนินการ keySet ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: unmodifiableSet(). คืนค่า: Collections.unmodifiableSet(this.byLocation.keySet()).

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Set<ResourceLocation> result = instance.keySet();

net.minecraft.core.MappedRegistry#listElements()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:238
  • Modifiers: public
  • Return: Stream<Holder.Reference<T>>

คืออะไร

ดำเนินการ listElements ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: stream(). คืนค่า: this.byId.stream().

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Stream<Holder.Reference<T>> result = instance.listElements();

net.minecraft.core.MappedRegistry#listTags()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:50
  • Modifiers: public
  • Return: Stream<HolderSet.Named<T>>

คืออะไร

ดำเนินการ listTags ตาม implementation ของ MappedRegistry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Stream<HolderSet.Named<T>> result = instance.listTags();

net.minecraft.core.MappedRegistry#MappedRegistry(ResourceKey<? extends Registry<T>>,Lifecycle)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:55
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ResourceKey<? extends Registry<T>> resourceKey
  • Lifecycle lifecycle

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

ResourceKey<? extends Registry<T>> resourceKey = ...;
Lifecycle lifecycle = ...;
MappedRegistry instance = new MappedRegistry(resourceKey, lifecycle);

net.minecraft.core.MappedRegistry#MappedRegistry(ResourceKey<? extends Registry<T>>,Lifecycle,boolean)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:59
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: key, registryLifecycle, unregisteredIntrusiveHolders. สร้างออบเจ็กต์: IdentityHashMap<>.

Parameters

  • ResourceKey<? extends Registry<T>> resourceKey
  • Lifecycle lifecycle
  • boolean bl

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

ResourceKey<? extends Registry<T>> resourceKey = ...;
Lifecycle lifecycle = ...;
MappedRegistry instance = new MappedRegistry(resourceKey, lifecycle, true);

net.minecraft.core.MappedRegistry#prepareTagReload(TagLoader.LoadResult<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:397
  • Modifiers: public
  • Return: Registry.PendingTags<T>

คืออะไร

ดำเนินการ prepareTagReload ตาม implementation ของ MappedRegistry

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: allTags. เรียกต่อ: builder(), tags(), forEach(), get(), createTag(), put(), copyOf(), build(). สร้างออบเจ็กต์: IllegalStateException, HashMap<>, HolderLookup.RegistryLookup.Delegate<T>, Registry.PendingTags<T>. มีจุด return อย่างน้อย 6 จุด.

Parameters

  • TagLoader.LoadResult<T> loadResult

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

MappedRegistry instance = ...;
TagLoader.LoadResult<T> loadResult = ...;
Registry.PendingTags<T> result = instance.prepareTagReload(loadResult);

net.minecraft.core.MappedRegistry#register(ResourceKey<T>,T,RegistrationInfo)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:89
  • Modifiers: public
  • Return: Holder.Reference<T>

คืออะไร

ลงทะเบียน register

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: registryLifecycle. เรียกต่อ: validateWrite(), requireNonNull(), containsKey(), location(), pauseInIde(), remove(), bindKey(), computeIfAbsent(). สร้างออบเจ็กต์: IllegalStateException, AssertionError. คืนค่า: reference.

Parameters

  • ResourceKey<T> resourceKey
  • T object
  • RegistrationInfo registrationInfo

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

MappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
T object = ...;
RegistrationInfo registrationInfo = ...;
Holder.Reference<T> result = instance.register(resourceKey, object, registrationInfo);

net.minecraft.core.MappedRegistry#registrationInfo(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:196
  • Modifiers: public
  • Return: Optional<RegistrationInfo>

คืออะไร

ดำเนินการ registrationInfo ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: ofNullable(), get(). คืนค่า: Optional.ofNullable(this.registrationInfos.get(resourceKey)).

Parameters

  • ResourceKey<T> resourceKey

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

MappedRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
Optional<RegistrationInfo> result = instance.registrationInfo(resourceKey);

net.minecraft.core.MappedRegistry#registryKeySet()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:228
  • Modifiers: public
  • Return: Set<ResourceKey<T>>

คืออะไร

ดำเนินการ registryKeySet ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: unmodifiableSet(), keySet(). คืนค่า: Collections.unmodifiableSet(this.byKey.keySet()).

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Set<ResourceKey<T>> result = instance.registryKeySet();

net.minecraft.core.MappedRegistry#registryLifecycle()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:201
  • Modifiers: public
  • Return: Lifecycle

คืออะไร

ดำเนินการ registryLifecycle ตาม implementation ของ MappedRegistry

ทำงานยังไง

คืนค่า: this.registryLifecycle.

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
Lifecycle result = instance.registryLifecycle();

net.minecraft.core.MappedRegistry#size()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:191
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ MappedRegistry

ทำงานยังไง

คืนค่า: this.byKey.size().

Parameters

  • ไม่มี

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

MappedRegistry instance = ...;
int result = instance.size();

net.minecraft.core.MappedRegistry#toString()

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:72
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

คืนค่า: "Registry[" + this.key + " (" + this.registryLifecycle + ")]".

Parameters

  • ไม่มี

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

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

net.minecraft.core.MappedRegistry#wrapAsHolder(T)

  • Origin: common
  • Source: net/minecraft/core/MappedRegistry.java:174
  • Modifiers: public
  • Return: Holder<T>

คืออะไร

ดำเนินการ wrapAsHolder ตาม implementation ของ MappedRegistry

ทำงานยังไง

เรียกต่อ: get(), direct(). คืนค่า: reference != null ? reference : Holder.direct(object).

Parameters

  • T object

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

MappedRegistry instance = ...;
T object = ...;
Holder<T> result = instance.wrapAsHolder(object);

NonNullList

  • Full name: net.minecraft.core.NonNullList
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/NonNullList.java
  • Type: class
  • Modifiers: public
  • Extends: AbstractList<E>

net.minecraft.core.NonNullList#add(int,E)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:53
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม add

ทำงานยังไง

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

Parameters

  • int i
  • E object

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

NonNullList instance = ...;
E object = ...;
instance.add(0, object);

net.minecraft.core.NonNullList#clear()

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:69
  • Modifiers: public
  • Return: void

คืออะไร

ล้าง clear

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: defaultValue. เรียกต่อ: size(), set().

Parameters

  • ไม่มี

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

NonNullList instance = ...;
instance.clear();

net.minecraft.core.NonNullList#create()

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:16
  • Modifiers: public static
  • Return: NonNullList<E>

คืออะไร

สร้าง create

ทำงานยังไง

เรียกต่อ: newArrayList(). สร้างออบเจ็กต์: NonNullList<>. คืนค่า: new NonNullList<>(Lists.newArrayList(), null).

Parameters

  • ไม่มี

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

NonNullList<E> result = NonNullList.create();

net.minecraft.core.NonNullList#createWithCapacity(int)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:20
  • Modifiers: public static
  • Return: NonNullList<E>

คืออะไร

สร้าง With Capacity

ทำงานยังไง

เรียกต่อ: newArrayListWithCapacity(). สร้างออบเจ็กต์: NonNullList<>. คืนค่า: new NonNullList<>(Lists.newArrayListWithCapacity(i), null).

Parameters

  • int i

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

NonNullList<E> result = NonNullList.createWithCapacity(0);

net.minecraft.core.NonNullList#get(int)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:41
  • Modifiers: public
  • Return: E

คืออะไร

อ่านค่า get

ทำงานยังไง

คืนค่า: this.list.get(i).

Parameters

  • int i

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

NonNullList instance = ...;
E result = instance.get(0);

net.minecraft.core.NonNullList#NonNullList(List<E>,E)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:36
  • Modifiers: protected
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: list, defaultValue.

Parameters

  • List<E> list
  • E object

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

List<E> list = ...;
E object = ...;
NonNullList instance = new NonNullList(list, object);

net.minecraft.core.NonNullList#of(E,E[])

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:31
  • Modifiers: public static
  • Return: NonNullList<E>

คืออะไร

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

ทำงานยังไง

เรียกต่อ: asList(). สร้างออบเจ็กต์: NonNullList<>. คืนค่า: new NonNullList<>(Arrays.asList(objects), object).

Parameters

  • E object
  • E[] objects

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

E object = ...;
E[] objects = ...;
NonNullList<E> result = NonNullList.of(object, objects);

net.minecraft.core.NonNullList#remove(int)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:59
  • Modifiers: public
  • Return: E

คืออะไร

ลบ remove

ทำงานยังไง

คืนค่า: this.list.remove(i).

Parameters

  • int i

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

NonNullList instance = ...;
E result = instance.remove(0);

net.minecraft.core.NonNullList#set(int,E)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:47
  • Modifiers: public
  • Return: E

คืออะไร

กำหนดค่า set

ทำงานยังไง

เรียกต่อ: notNull(). คืนค่า: this.list.set(i, object).

Parameters

  • int i
  • E object

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

NonNullList instance = ...;
E object = ...;
E result = instance.set(0, object);

net.minecraft.core.NonNullList#size()

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:64
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ NonNullList

ทำงานยังไง

คืนค่า: this.list.size().

Parameters

  • ไม่มี

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

NonNullList instance = ...;
int result = instance.size();

net.minecraft.core.NonNullList#withSize(int,E)

  • Origin: common
  • Source: net/minecraft/core/NonNullList.java:24
  • Modifiers: public static
  • Return: NonNullList<E>

คืออะไร

ดำเนินการ withSize ตาม implementation ของ NonNullList

ทำงานยังไง

เรียกต่อ: notNull(), fill(), asList(). สร้างออบเจ็กต์: NonNullList<>. คืนค่า: new NonNullList<>(Arrays.asList((E[])objects), object).

Parameters

  • int i
  • E object

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

E object = ...;
NonNullList<E> result = NonNullList.withSize(0, object);

Position

  • Full name: net.minecraft.core.Position
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Position.java
  • Type: interface
  • Modifiers: public

net.minecraft.core.Position#x()

  • Origin: common
  • Source: net/minecraft/core/Position.java:4
  • Modifiers: ``
  • Return: double

คืออะไร

ดำเนินการ x ตาม implementation ของ Position

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Position instance = ...;
double result = instance.x();

net.minecraft.core.Position#y()

  • Origin: common
  • Source: net/minecraft/core/Position.java:6
  • Modifiers: ``
  • Return: double

คืออะไร

ดำเนินการ y ตาม implementation ของ Position

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Position instance = ...;
double result = instance.y();

net.minecraft.core.Position#z()

  • Origin: common
  • Source: net/minecraft/core/Position.java:8
  • Modifiers: ``
  • Return: double

คืออะไร

ดำเนินการ z ตาม implementation ของ Position

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Position instance = ...;
double result = instance.z();

QuartPos

  • Full name: net.minecraft.core.QuartPos
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/QuartPos.java
  • Type: class
  • Modifiers: public final

net.minecraft.core.QuartPos#fromBlock(int)

  • Origin: common
  • Source: net/minecraft/core/QuartPos.java:12
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ fromBlock ตาม implementation ของ QuartPos

ทำงานยังไง

คืนค่า: i >> 2.

Parameters

  • int i

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

int result = QuartPos.fromBlock(0);

net.minecraft.core.QuartPos#fromSection(int)

  • Origin: common
  • Source: net/minecraft/core/QuartPos.java:24
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ fromSection ตาม implementation ของ QuartPos

ทำงานยังไง

คืนค่า: i << 2.

Parameters

  • int i

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

int result = QuartPos.fromSection(0);

net.minecraft.core.QuartPos#quartLocal(int)

  • Origin: common
  • Source: net/minecraft/core/QuartPos.java:16
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ quartLocal ตาม implementation ของ QuartPos

ทำงานยังไง

คืนค่า: i & 3.

Parameters

  • int i

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

int result = QuartPos.quartLocal(0);

net.minecraft.core.QuartPos#toBlock(int)

  • Origin: common
  • Source: net/minecraft/core/QuartPos.java:20
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ toBlock ตาม implementation ของ QuartPos

ทำงานยังไง

คืนค่า: i << 2.

Parameters

  • int i

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

int result = QuartPos.toBlock(0);

net.minecraft.core.QuartPos#toSection(int)

  • Origin: common
  • Source: net/minecraft/core/QuartPos.java:28
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ toSection ตาม implementation ของ QuartPos

ทำงานยังไง

คืนค่า: i >> 2.

Parameters

  • int i

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

int result = QuartPos.toSection(0);

Registry

  • Full name: net.minecraft.core.Registry
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Registry.java
  • Type: interface
  • Modifiers: public
  • Implements: Keyable,HolderLookup.RegistryLookup<T>,IdMap<T>,FabricRegistry

net.minecraft.core.Registry#asHolderIdMap()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:156
  • Modifiers: default
  • Return: IdMap<Holder<T>>

คืออะไร

ดำเนินการ asHolderIdMap ตาม implementation ของ Registry

ทำงานยังไง

เรียกต่อ: getId(), value(), byId(), get(), orElse(), size(), iterator(), listElements(). สร้างออบเจ็กต์: IdMap<Holder<T>>. มีจุด return อย่างน้อย 4 จุด.

Parameters

  • ไม่มี

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

Registry instance = ...;
IdMap<Holder<T>> result = instance.asHolderIdMap();

net.minecraft.core.Registry#byNameCodec()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:32
  • Modifiers: default
  • Return: Codec<T>

คืออะไร

ดำเนินการ byNameCodec ตาม implementation ของ Registry

ทำงานยังไง

เรียกต่อ: referenceHolderWithLifecycle(), flatComapMap(), safeCastToReference(), wrapAsHolder(). คืนค่า: this.referenceHolderWithLifecycle().flatComapMap(Holder.Reference::value, object -> this.safeCastToReference(this.wrapAsHolder((T)object))).

Parameters

  • ไม่มี

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

Registry instance = ...;
Codec<T> result = instance.byNameCodec();

net.minecraft.core.Registry#containsKey(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:113
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Key

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey

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

Registry instance = ...;
ResourceKey<T> resourceKey = ...;
boolean result = instance.containsKey(resourceKey);

net.minecraft.core.Registry#containsKey(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:111
  • Modifiers: ``
  • Return: boolean

คืออะไร

ตรวจสอบว่ามี Key

ทำงานยังไง

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

Parameters

  • ResourceLocation resourceLocation

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

Registry instance = ...;
ResourceLocation resourceLocation = ...;
boolean result = instance.containsKey(resourceLocation);

net.minecraft.core.Registry#createIntrusiveHolder(T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:138
  • Modifiers: ``
  • Return: Holder.Reference<T>

คืออะไร

สร้าง Intrusive Holder

ทำงานยังไง

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

Parameters

  • T object

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

Registry instance = ...;
T object = ...;
Holder.Reference<T> result = instance.createIntrusiveHolder(object);

net.minecraft.core.Registry#entrySet()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:101
  • Modifiers: ``
  • Return: Set<Entry<ResourceKey<T>, T>>

คืออะไร

ดำเนินการ entrySet ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Set<Entry<ResourceKey<T>, T>> result = instance.entrySet();

net.minecraft.core.Registry#freeze()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:136
  • Modifiers: ``
  • Return: Registry<T>

คืออะไร

ดำเนินการ freeze ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Registry<T> result = instance.freeze();

net.minecraft.core.Registry#get(int)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:140
  • Modifiers: ``
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • int i

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

Registry instance = ...;
Optional<Holder.Reference<T>> result = instance.get(0);

net.minecraft.core.Registry#get(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:142
  • Modifiers: ``
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า get

ทำงานยังไง

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

Parameters

  • ResourceLocation resourceLocation

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

Registry instance = ...;
ResourceLocation resourceLocation = ...;
Optional<Holder.Reference<T>> result = instance.get(resourceLocation);

net.minecraft.core.Registry#getAny()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:88
  • Modifiers: ``
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Any

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Optional<Holder.Reference<T>> result = instance.getAny();

net.minecraft.core.Registry#getId(T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:69
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Id

ทำงานยังไง

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

Parameters

  • T object

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

Registry instance = ...;
T object = ...;
int result = instance.getId(object);

net.minecraft.core.Registry#getKey(T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:64
  • Modifiers: ``
  • Return: ResourceLocation

คืออะไร

อ่านค่า Key

ทำงานยังไง

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

Parameters

  • T object

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

Registry instance = ...;
T object = ...;
ResourceLocation result = instance.getKey(object);

net.minecraft.core.Registry#getOptional(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:84
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

อ่านค่า Optional

ทำงานยังไง

เรียกต่อ: ofNullable(), getValue(). คืนค่า: Optional.ofNullable(this.getValue(resourceKey)).

Parameters

  • ResourceKey<T> resourceKey

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

Registry instance = ...;
ResourceKey<T> resourceKey = ...;
Optional<T> result = instance.getOptional(resourceKey);

net.minecraft.core.Registry#getOptional(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:80
  • Modifiers: default
  • Return: Optional<T>

คืออะไร

อ่านค่า Optional

ทำงานยังไง

เรียกต่อ: ofNullable(), getValue(). คืนค่า: Optional.ofNullable(this.getValue(resourceLocation)).

Parameters

  • ResourceLocation resourceLocation

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

Registry instance = ...;
ResourceLocation resourceLocation = ...;
Optional<T> result = instance.getOptional(resourceLocation);

net.minecraft.core.Registry#getRandom(RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:105
  • Modifiers: ``
  • Return: Optional<Holder.Reference<T>>

คืออะไร

อ่านค่า Random

ทำงานยังไง

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

Parameters

  • RandomSource randomSource

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

Registry instance = ...;
RandomSource randomSource = ...;
Optional<Holder.Reference<T>> result = instance.getRandom(randomSource);

net.minecraft.core.Registry#getRandomElementOf(TagKey<T>,RandomSource)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:150
  • Modifiers: default
  • Return: Optional<Holder<T>>

คืออะไร

อ่านค่า Random Element Of

ทำงานยังไง

เรียกต่อ: get(), flatMap(), getRandomElement(). คืนค่า: this.get(tagKey).flatMap(named -> named.getRandomElement(randomSource)).

Parameters

  • TagKey<T> tagKey
  • RandomSource randomSource

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

Registry instance = ...;
TagKey<T> tagKey = ...;
RandomSource randomSource = ...;
Optional<Holder<T>> result = instance.getRandomElementOf(tagKey, randomSource);

net.minecraft.core.Registry#getResourceKey(T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:67
  • Modifiers: ``
  • Return: Optional<ResourceKey<T>>

คืออะไร

อ่านค่า Resource Key

ทำงานยังไง

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

Parameters

  • T object

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

Registry instance = ...;
T object = ...;
Optional<ResourceKey<T>> result = instance.getResourceKey(object);

net.minecraft.core.Registry#getTagOrEmpty(TagKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:146
  • Modifiers: default
  • Return: Iterable<Holder<T>>

คืออะไร

อ่านค่า Tag Or Empty

ทำงานยังไง

เรียกต่อ: orElse(), get(), of(). คืนค่า: DataFixUtils.orElse(this.get(tagKey), List.<T>of()).

Parameters

  • TagKey<T> tagKey

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

Registry instance = ...;
TagKey<T> tagKey = ...;
Iterable<Holder<T>> result = instance.getTagOrEmpty(tagKey);

net.minecraft.core.Registry#getTags()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:154
  • Modifiers: ``
  • Return: Stream<HolderSet.Named<T>>

คืออะไร

อ่านค่า Tags

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Stream<HolderSet.Named<T>> result = instance.getTags();

net.minecraft.core.Registry#getValue(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:72
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey

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

Registry instance = ...;
ResourceKey<T> resourceKey = ...;
T result = instance.getValue(resourceKey);

net.minecraft.core.Registry#getValue(ResourceLocation)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:75
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า Value

ทำงานยังไง

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

Parameters

  • ResourceLocation resourceLocation

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

Registry instance = ...;
ResourceLocation resourceLocation = ...;
T result = instance.getValue(resourceLocation);

net.minecraft.core.Registry#getValueOrThrow(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:90
  • Modifiers: default
  • Return: T

คืออะไร

อ่านค่า Value Or Throw

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getValue(), key(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: object.

Parameters

  • ResourceKey<T> resourceKey

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

Registry instance = ...;
ResourceKey<T> resourceKey = ...;
T result = instance.getValueOrThrow(resourceKey);

net.minecraft.core.Registry#holderByNameCodec()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:36
  • Modifiers: default
  • Return: Codec<Holder<T>>

คืออะไร

ดำเนินการ holderByNameCodec ตาม implementation ของ Registry

ทำงานยังไง

เรียกต่อ: referenceHolderWithLifecycle(), flatComapMap(). คืนค่า: this.referenceHolderWithLifecycle().flatComapMap(reference -> (Holder<T>)reference, this::safeCastToReference).

Parameters

  • ไม่มี

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

Registry instance = ...;
Codec<Holder<T>> result = instance.holderByNameCodec();

net.minecraft.core.Registry#key()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:29
  • Modifiers: ``
  • Return: ResourceKey<? extends Registry<T>>

คืออะไร

ดำเนินการ key ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
ResourceKey<? extends Registry<T>> result = instance.key();

net.minecraft.core.Registry#keys(DynamicOps<U>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:59
  • Modifiers: default
  • Return: Stream<U>

คืออะไร

ดำเนินการ keys ตาม implementation ของ Registry

ทำงานยังไง

เรียกต่อ: keySet(), stream(), map(), createString(), toString(). คืนค่า: this.keySet().stream().map(resourceLocation -> dynamicOps.createString(resourceLocation.toString())).

Parameters

  • DynamicOps<U> dynamicOps

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

Registry instance = ...;
DynamicOps<U> dynamicOps = ...;
Stream<U> result = instance.keys(dynamicOps);

net.minecraft.core.Registry#keySet()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:99
  • Modifiers: ``
  • Return: Set<ResourceLocation>

คืออะไร

ดำเนินการ keySet ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Set<ResourceLocation> result = instance.keySet();

net.minecraft.core.Registry#prepareTagReload(TagLoader.LoadResult<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:179
  • Modifiers: ``
  • Return: Registry.PendingTags<T>

คืออะไร

ดำเนินการ prepareTagReload ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • TagLoader.LoadResult<T> loadResult

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

Registry instance = ...;
TagLoader.LoadResult<T> loadResult = ...;
Registry.PendingTags<T> result = instance.prepareTagReload(loadResult);

net.minecraft.core.Registry#register(Registry<? super T>,String,T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:115
  • Modifiers: static
  • Return: T

คืออะไร

ลงทะเบียน register

ทำงานยังไง

เรียกต่อ: parse(). คืนค่า: register(registry, ResourceLocation.parse(string), object).

Parameters

  • Registry<? super T> registry
  • String string
  • T object

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

Registry<? super T> registry = ...;
T object = ...;
T result = Registry.register(registry, "value", object);

net.minecraft.core.Registry#register(Registry<V>,ResourceKey<V>,T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:123
  • Modifiers: static
  • Return: T

คืออะไร

ลงทะเบียน register

ทำงานยังไง

คืนค่า: object.

Parameters

  • Registry<V> registry
  • ResourceKey<V> resourceKey
  • T object

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

Registry<V> registry = ...;
ResourceKey<V> resourceKey = ...;
T object = ...;
T result = Registry.register(registry, resourceKey, object);

net.minecraft.core.Registry#register(Registry<V>,ResourceLocation,T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:119
  • Modifiers: static
  • Return: T

คืออะไร

ลงทะเบียน register

ทำงานยังไง

เรียกต่อ: create(), key(). คืนค่า: register(registry, ResourceKey.create(registry.key(), resourceLocation), object).

Parameters

  • Registry<V> registry
  • ResourceLocation resourceLocation
  • T object

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

Registry<V> registry = ...;
ResourceLocation resourceLocation = ...;
T object = ...;
T result = Registry.register(registry, resourceLocation, object);

net.minecraft.core.Registry#registerForHolder(Registry<T>,ResourceKey<T>,T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:128
  • Modifiers: static
  • Return: Holder.Reference<T>

คืออะไร

ลงทะเบียน For Holder

ทำงานยังไง

เรียกต่อ: register(). คืนค่า: ((WritableRegistry)registry).register(resourceKey, object, RegistrationInfo.BUILT_IN).

Parameters

  • Registry<T> registry
  • ResourceKey<T> resourceKey
  • T object

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

Registry<T> registry = ...;
ResourceKey<T> resourceKey = ...;
T object = ...;
Holder.Reference<T> result = Registry.registerForHolder(registry, resourceKey, object);

net.minecraft.core.Registry#registerForHolder(Registry<T>,ResourceLocation,T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:132
  • Modifiers: static
  • Return: Holder.Reference<T>

คืออะไร

ลงทะเบียน For Holder

ทำงานยังไง

เรียกต่อ: create(), key(). คืนค่า: registerForHolder(registry, ResourceKey.create(registry.key(), resourceLocation), object).

Parameters

  • Registry<T> registry
  • ResourceLocation resourceLocation
  • T object

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

Registry<T> registry = ...;
ResourceLocation resourceLocation = ...;
T object = ...;
Holder.Reference<T> result = Registry.registerForHolder(registry, resourceLocation, object);

net.minecraft.core.Registry#registrationInfo(ResourceKey<T>)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:78
  • Modifiers: ``
  • Return: Optional<RegistrationInfo>

คืออะไร

ดำเนินการ registrationInfo ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey

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

Registry instance = ...;
ResourceKey<T> resourceKey = ...;
Optional<RegistrationInfo> result = instance.registrationInfo(resourceKey);

net.minecraft.core.Registry#registryKeySet()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:103
  • Modifiers: ``
  • Return: Set<ResourceKey<T>>

คืออะไร

ดำเนินการ registryKeySet ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • ไม่มี

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

Registry instance = ...;
Set<ResourceKey<T>> result = instance.registryKeySet();

net.minecraft.core.Registry#stream()

  • Origin: common
  • Source: net/minecraft/core/Registry.java:107
  • Modifiers: default
  • Return: Stream<T>

คืออะไร

ดำเนินการ stream ตาม implementation ของ Registry

ทำงานยังไง

เรียกต่อ: spliterator(). คืนค่า: StreamSupport.stream(this.spliterator(), false).

Parameters

  • ไม่มี

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

Registry instance = ...;
Stream<T> result = instance.stream();

net.minecraft.core.Registry#wrapAsHolder(T)

  • Origin: common
  • Source: net/minecraft/core/Registry.java:144
  • Modifiers: ``
  • Return: Holder<T>

คืออะไร

ดำเนินการ wrapAsHolder ตาม implementation ของ Registry

ทำงานยังไง

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

Parameters

  • T object

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

Registry instance = ...;
T object = ...;
Holder<T> result = instance.wrapAsHolder(object);

RegistryAccess

  • Full name: net.minecraft.core.RegistryAccess
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/RegistryAccess.java
  • Type: interface
  • Modifiers: public
  • Implements: HolderLookup.Provider

net.minecraft.core.RegistryAccess#freeze()

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:52
  • Modifiers: default
  • Return: RegistryAccess.Frozen

คืออะไร

ดำเนินการ freeze ตาม implementation ของ RegistryAccess

ทำงานยังไง

เรียกต่อ: FrozenAccess(), registries(), map(). สร้างออบเจ็กต์: FrozenAccess. คืนค่า: new FrozenAccess(this.registries().map(RegistryAccess.RegistryEntry::freeze)).

Parameters

  • ไม่มี

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

RegistryAccess instance = ...;
RegistryAccess.Frozen result = instance.freeze();

net.minecraft.core.RegistryAccess#fromRegistryOfRegistries(Registry<? extends Registry<?>>)

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:32
  • Modifiers: static
  • Return: RegistryAccess.Frozen

คืออะไร

ดำเนินการ fromRegistryOfRegistries ตาม implementation ของ RegistryAccess

ทำงานยังไง

เรียกต่อ: Frozen(), lookup(), getOptional(), registries(), entrySet(), stream(), map(), freeze(). สร้างออบเจ็กต์: RegistryAccess.Frozen. มีจุด return อย่างน้อย 3 จุด.

Parameters

  • Registry<? extends Registry<?>> registry

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

Registry<? extends Registry<?>> registry = ...;
RegistryAccess.Frozen result = RegistryAccess.fromRegistryOfRegistries(registry);

net.minecraft.core.RegistryAccess#listRegistryKeys()

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:27
  • Modifiers: default
  • Return: Stream<ResourceKey<? extends Registry<?>>>

คืออะไร

ดำเนินการ listRegistryKeys ตาม implementation ของ RegistryAccess

ทำงานยังไง

เรียกต่อ: registries(), map(). คืนค่า: this.registries().map(registryEntry -> registryEntry.key).

Parameters

  • ไม่มี

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

RegistryAccess instance = ...;
Stream<ResourceKey<? extends Registry<?>>> result = instance.listRegistryKeys();

net.minecraft.core.RegistryAccess#lookup(ResourceKey<? extends Registry<? extends E>>)

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:18
  • Modifiers: ``
  • Return: Optional<Registry<E>>

คืออะไร

ดำเนินการ lookup ตาม implementation ของ RegistryAccess

ทำงานยังไง

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

Parameters

  • ResourceKey<? extends Registry<? extends E>> resourceKey

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

RegistryAccess instance = ...;
ResourceKey<? extends Registry<? extends E>> resourceKey = ...;
Optional<Registry<E>> result = instance.lookup(resourceKey);

net.minecraft.core.RegistryAccess#lookupOrThrow(ResourceKey<? extends Registry<? extends E>>)

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:21
  • Modifiers: default
  • Return: Registry<E>

คืออะไร

ดำเนินการ lookupOrThrow ตาม implementation ของ RegistryAccess

ทำงานยังไง

เรียกต่อ: lookup(), orElseThrow(). สร้างออบเจ็กต์: IllegalStateException. คืนค่า: this.lookup(resourceKey).orElseThrow(() -> new IllegalStateException("Missing registry: " + resourceKey)).

Parameters

  • ResourceKey<? extends Registry<? extends E>> resourceKey

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

RegistryAccess instance = ...;
ResourceKey<? extends Registry<? extends E>> resourceKey = ...;
Registry<E> result = instance.lookupOrThrow(resourceKey);

net.minecraft.core.RegistryAccess#registries()

  • Origin: common
  • Source: net/minecraft/core/RegistryAccess.java:25
  • Modifiers: ``
  • Return: Stream<RegistryAccess.RegistryEntry<?>>

คืออะไร

ดำเนินการ registries ตาม implementation ของ RegistryAccess

ทำงานยังไง

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

Parameters

  • ไม่มี

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

RegistryAccess instance = ...;
Stream<RegistryAccess.RegistryEntry<?>> result = instance.registries();

RegistryCodecs

  • Full name: net.minecraft.core.RegistryCodecs
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/RegistryCodecs.java
  • Type: class
  • Modifiers: public

net.minecraft.core.RegistryCodecs#homogeneousList(ResourceKey<? extends Registry<E>>)

  • Origin: common
  • Source: net/minecraft/core/RegistryCodecs.java:18
  • Modifiers: public static
  • Return: Codec<HolderSet<E>>

คืออะไร

ดำเนินการ homogeneousList ตาม implementation ของ RegistryCodecs

ทำงานยังไง

คืนค่า: homogeneousList(resourceKey, false).

Parameters

  • ResourceKey<? extends Registry<E>> resourceKey

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

ResourceKey<? extends Registry<E>> resourceKey = ...;
Codec<HolderSet<E>> result = RegistryCodecs.homogeneousList(resourceKey);

net.minecraft.core.RegistryCodecs#homogeneousList(ResourceKey<? extends Registry<E>>,boolean)

  • Origin: common
  • Source: net/minecraft/core/RegistryCodecs.java:22
  • Modifiers: public static
  • Return: Codec<HolderSet<E>>

คืออะไร

ดำเนินการ homogeneousList ตาม implementation ของ RegistryCodecs

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: HolderSetCodec.create(resourceKey, RegistryFixedCodec.create(resourceKey), bl).

Parameters

  • ResourceKey<? extends Registry<E>> resourceKey
  • boolean bl

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

ResourceKey<? extends Registry<E>> resourceKey = ...;
Codec<HolderSet<E>> result = RegistryCodecs.homogeneousList(resourceKey, true);

net.minecraft.core.RegistryCodecs#homogeneousList(ResourceKey<? extends Registry<E>>,Codec<E>)

  • Origin: common
  • Source: net/minecraft/core/RegistryCodecs.java:10
  • Modifiers: public static
  • Return: Codec<HolderSet<E>>

คืออะไร

ดำเนินการ homogeneousList ตาม implementation ของ RegistryCodecs

ทำงานยังไง

คืนค่า: homogeneousList(resourceKey, codec, false).

Parameters

  • ResourceKey<? extends Registry<E>> resourceKey
  • Codec<E> codec

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

ResourceKey<? extends Registry<E>> resourceKey = ...;
Codec<E> codec = ...;
Codec<HolderSet<E>> result = RegistryCodecs.homogeneousList(resourceKey, codec);

net.minecraft.core.RegistryCodecs#homogeneousList(ResourceKey<? extends Registry<E>>,Codec<E>,boolean)

  • Origin: common
  • Source: net/minecraft/core/RegistryCodecs.java:14
  • Modifiers: public static
  • Return: Codec<HolderSet<E>>

คืออะไร

ดำเนินการ homogeneousList ตาม implementation ของ RegistryCodecs

ทำงานยังไง

เรียกต่อ: create(). คืนค่า: HolderSetCodec.create(resourceKey, RegistryFileCodec.create(resourceKey, codec), bl).

Parameters

  • ResourceKey<? extends Registry<E>> resourceKey
  • Codec<E> codec
  • boolean bl

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

ResourceKey<? extends Registry<E>> resourceKey = ...;
Codec<E> codec = ...;
Codec<HolderSet<E>> result = RegistryCodecs.homogeneousList(resourceKey, codec, true);

RegistrySetBuilder

  • Full name: net.minecraft.core.RegistrySetBuilder
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/RegistrySetBuilder.java
  • Type: class
  • Modifiers: public

net.minecraft.core.RegistrySetBuilder#add(ResourceKey<? extends Registry<T>>,Lifecycle,RegistrySetBuilder.RegistryBootstrap<T>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySetBuilder.java:63
  • Modifiers: public
  • Return: RegistrySetBuilder

คืออะไร

เพิ่ม add

ทำงานยังไง

สร้างออบเจ็กต์: RegistrySetBuilder.RegistryStub<>. คืนค่า: this.

Parameters

  • ResourceKey<? extends Registry<T>> resourceKey
  • Lifecycle lifecycle
  • RegistrySetBuilder.RegistryBootstrap<T> registryBootstrap

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

RegistrySetBuilder instance = ...;
ResourceKey<? extends Registry<T>> resourceKey = ...;
Lifecycle lifecycle = ...;
RegistrySetBuilder.RegistryBootstrap<T> registryBootstrap = ...;
RegistrySetBuilder result = instance.add(resourceKey, lifecycle, registryBootstrap);

net.minecraft.core.RegistrySetBuilder#add(ResourceKey<? extends Registry<T>>,RegistrySetBuilder.RegistryBootstrap<T>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySetBuilder.java:70
  • Modifiers: public
  • Return: RegistrySetBuilder

คืออะไร

เพิ่ม add

ทำงานยังไง

เรียกต่อ: stable(). คืนค่า: this.add(resourceKey, Lifecycle.stable(), registryBootstrap).

Parameters

  • ResourceKey<? extends Registry<T>> resourceKey
  • RegistrySetBuilder.RegistryBootstrap<T> registryBootstrap

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

RegistrySetBuilder instance = ...;
ResourceKey<? extends Registry<T>> resourceKey = ...;
RegistrySetBuilder.RegistryBootstrap<T> registryBootstrap = ...;
RegistrySetBuilder result = instance.add(resourceKey, registryBootstrap);

net.minecraft.core.RegistrySetBuilder#build(RegistryAccess)

  • Origin: common
  • Source: net/minecraft/core/RegistrySetBuilder.java:130
  • Modifiers: public
  • Return: HolderLookup.Provider

คืออะไร

สร้าง build

ทำงานยังไง

เรียกต่อ: createState(), stream(), map(), collectRegisteredValues(), buildAsLookup(), buildProviderWithContext(), reportNotCollectedHolders(), reportUnclaimedRegisteredValues(). คืนค่า: provider.

Parameters

  • RegistryAccess registryAccess

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

RegistrySetBuilder instance = ...;
RegistryAccess registryAccess = ...;
HolderLookup.Provider result = instance.build(registryAccess);

net.minecraft.core.RegistrySetBuilder#buildPatch(RegistryAccess,HolderLookup.Provider,Cloner.Factory)

  • Origin: common
  • Source: net/minecraft/core/RegistrySetBuilder.java:198
  • Modifiers: public
  • Return: RegistrySetBuilder.PatchedRegistries

คืออะไร

สร้าง Patch

ทำงานยังไง

เรียกต่อ: createState(), stream(), map(), collectRegisteredValues(), forEach(), put(), listRegistryKeys(), collect(). สร้างออบเจ็กต์: HashMap<>, RegistrySetBuilder.RegistryContents<>, RegistrySetBuilder.PatchedRegistries. คืนค่า: new RegistrySetBuilder.PatchedRegistries(provider3, provider2).

Parameters

  • RegistryAccess registryAccess
  • HolderLookup.Provider provider
  • Cloner.Factory factory

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

RegistrySetBuilder instance = ...;
RegistryAccess registryAccess = ...;
HolderLookup.Provider provider = ...;
Cloner.Factory factory = ...;
RegistrySetBuilder.PatchedRegistries result = instance.buildPatch(registryAccess, provider, factory);

RegistrySetBuilder$RegistryBootstrap

  • Full name: net.minecraft.core.RegistrySetBuilder$RegistryBootstrap
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/RegistrySetBuilder.java
  • Type: interface
  • Modifiers: public

net.minecraft.core.RegistrySetBuilder$RegistryBootstrap#run(BootstrapContext<T>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySetBuilder.java:355
  • Modifiers: ``
  • Return: void

คืออะไร

สั่งทำงาน run

ทำงานยังไง

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

Parameters

  • BootstrapContext<T> bootstrapContext

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

RegistrySetBuilder.RegistryBootstrap instance = ...;
BootstrapContext<T> bootstrapContext = ...;
instance.run(bootstrapContext);

RegistrySynchronization

  • Full name: net.minecraft.core.RegistrySynchronization
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/RegistrySynchronization.java
  • Type: class
  • Modifiers: public

net.minecraft.core.RegistrySynchronization#isNetworkable(ResourceKey<? extends Registry<?>>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySynchronization.java:84
  • Modifiers: public static
  • Return: boolean

คืออะไร

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

ทำงานยังไง

เรียกต่อ: contains(). คืนค่า: NETWORKABLE_REGISTRIES.contains(resourceKey).

Parameters

  • ResourceKey<? extends Registry<?>> resourceKey

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

ResourceKey<? extends Registry<?>> resourceKey = ...;
boolean result = RegistrySynchronization.isNetworkable(resourceKey);

net.minecraft.core.RegistrySynchronization#networkedRegistries(LayeredRegistryAccess<RegistryLayer>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySynchronization.java:74
  • Modifiers: public static
  • Return: Stream<RegistryAccess.RegistryEntry<?>>

คืออะไร

ดำเนินการ networkedRegistries ตาม implementation ของ RegistrySynchronization

ทำงานยังไง

เรียกต่อ: ownedNetworkableRegistries(), getAccessFrom(). คืนค่า: ownedNetworkableRegistries(layeredRegistryAccess.getAccessFrom(RegistryLayer.WORLDGEN)).

Parameters

  • LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess

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

LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess = ...;
Stream<RegistryAccess.RegistryEntry<?>> result = RegistrySynchronization.networkedRegistries(layeredRegistryAccess);

net.minecraft.core.RegistrySynchronization#networkSafeRegistries(LayeredRegistryAccess<RegistryLayer>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySynchronization.java:78
  • Modifiers: public static
  • Return: Stream<RegistryAccess.RegistryEntry<?>>

คืออะไร

ดำเนินการ networkSafeRegistries ตาม implementation ของ RegistrySynchronization

ทำงานยังไง

เรียกต่อ: getLayer(), registries(), networkedRegistries(), concat(). คืนค่า: Stream.concat(stream2, stream).

Parameters

  • LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess

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

LayeredRegistryAccess<RegistryLayer> layeredRegistryAccess = ...;
Stream<RegistryAccess.RegistryEntry<?>> result = RegistrySynchronization.networkSafeRegistries(layeredRegistryAccess);

net.minecraft.core.RegistrySynchronization#packRegistries(DynamicOps<Tag>,RegistryAccess,Set<KnownPack>,BiConsumer<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>>)

  • Origin: common
  • Source: net/minecraft/core/RegistrySynchronization.java:27
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ packRegistries ตาม implementation ของ RegistrySynchronization

ทำงานยังไง

เรียกต่อ: forEach(), packRegistry().

Parameters

  • DynamicOps<Tag> dynamicOps
  • RegistryAccess registryAccess
  • Set<KnownPack> set
  • BiConsumer<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> biConsumer

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

DynamicOps<Tag> dynamicOps = ...;
RegistryAccess registryAccess = ...;
Set<KnownPack> set = ...;
BiConsumer<ResourceKey<? extends Registry<?>>, List<RegistrySynchronization.PackedRegistryEntry>> biConsumer = ...;
RegistrySynchronization.packRegistries(dynamicOps, registryAccess, set, biConsumer);

Rotations

  • Full name: net.minecraft.core.Rotations
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Rotations.java
  • Type: class
  • Modifiers: public

net.minecraft.core.Rotations#equals(Object)

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:43
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

แก้ state: x, y, z. คืนค่า: !(object instanceof Rotations rotations) ? false : this.x == rotations.x && this.y == rotations.y && this.z == rotations.z.

Parameters

  • Object object

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

Rotations instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.core.Rotations#getWrappedX()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:60
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Wrapped X

ทำงานยังไง

เรียกต่อ: wrapDegrees(). คืนค่า: Mth.wrapDegrees(this.x).

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getWrappedX();

net.minecraft.core.Rotations#getWrappedY()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:64
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Wrapped Y

ทำงานยังไง

เรียกต่อ: wrapDegrees(). คืนค่า: Mth.wrapDegrees(this.y).

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getWrappedY();

net.minecraft.core.Rotations#getWrappedZ()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:68
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Wrapped Z

ทำงานยังไง

เรียกต่อ: wrapDegrees(). คืนค่า: Mth.wrapDegrees(this.z).

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getWrappedZ();

net.minecraft.core.Rotations#getX()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:48
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า X

ทำงานยังไง

คืนค่า: this.x.

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getX();

net.minecraft.core.Rotations#getY()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:52
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Y

ทำงานยังไง

คืนค่า: this.y.

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getY();

net.minecraft.core.Rotations#getZ()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:56
  • Modifiers: public
  • Return: float

คืออะไร

อ่านค่า Z

ทำงานยังไง

คืนค่า: this.z.

Parameters

  • ไม่มี

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

Rotations instance = ...;
float result = instance.getZ();

net.minecraft.core.Rotations#Rotations(float,float,float)

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:25
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: x, y, z. เรียกต่อ: isInfinite(), isNaN().

Parameters

  • float f
  • float g
  • float h

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

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

net.minecraft.core.Rotations#Rotations(ListTag)

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:31
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ListTag listTag

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

ListTag listTag = ...;
Rotations instance = new Rotations(listTag);

net.minecraft.core.Rotations#save()

  • Origin: common
  • Source: net/minecraft/core/Rotations.java:35
  • Modifiers: public
  • Return: ListTag

คืออะไร

บันทึก save

ทำงานยังไง

เรียกต่อ: add(), valueOf(). สร้างออบเจ็กต์: ListTag. คืนค่า: listTag.

Parameters

  • ไม่มี

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

Rotations instance = ...;
ListTag result = instance.save();

SectionPos

  • Full name: net.minecraft.core.SectionPos
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/SectionPos.java
  • Type: class
  • Modifiers: public
  • Extends: Vec3i

net.minecraft.core.SectionPos#aroundAndAtBlockPos(BlockPos,LongConsumer)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:256
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ aroundAndAtBlockPos ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ().

Parameters

  • BlockPos blockPos
  • LongConsumer longConsumer

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

BlockPos blockPos = ...;
LongConsumer longConsumer = ...;
SectionPos.aroundAndAtBlockPos(blockPos, longConsumer);

net.minecraft.core.SectionPos#aroundAndAtBlockPos(int,int,int,LongConsumer)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:264
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ aroundAndAtBlockPos ตาม implementation ของ SectionPos

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k
  • LongConsumer longConsumer

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

LongConsumer longConsumer = ...;
SectionPos.aroundAndAtBlockPos(0, 0, 0, longConsumer);

net.minecraft.core.SectionPos#aroundAndAtBlockPos(long,LongConsumer)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:260
  • Modifiers: public static
  • Return: void

คืออะไร

ดำเนินการ aroundAndAtBlockPos ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ().

Parameters

  • long l
  • LongConsumer longConsumer

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

LongConsumer longConsumer = ...;
SectionPos.aroundAndAtBlockPos(0L, longConsumer);

net.minecraft.core.SectionPos#aroundChunk(ChunkPos,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:234
  • Modifiers: public static
  • Return: Stream<SectionPos>

คืออะไร

ดำเนินการ aroundChunk ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: betweenClosedStream(). คืนค่า: betweenClosedStream(l - i, j, m - i, l + i, k, m + i).

Parameters

  • ChunkPos chunkPos
  • int i
  • int j
  • int k

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

ChunkPos chunkPos = ...;
Stream<SectionPos> result = SectionPos.aroundChunk(chunkPos, 0, 0, 0);

net.minecraft.core.SectionPos#asLong()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:215
  • Modifiers: public
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: x(), y(), z(). คืนค่า: asLong(this.x(), this.y(), this.z()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
long result = instance.asLong();

net.minecraft.core.SectionPos#asLong(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:204
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getX(), getY(), getZ(). คืนค่า: asLong(blockToSectionCoord(blockPos.getX()), blockToSectionCoord(blockPos.getY()), blockToSectionCoord(blockPos.getZ())).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
long result = SectionPos.asLong(blockPos);

net.minecraft.core.SectionPos#asLong(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:208
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ asLong ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: l | (k & 4194303L) << 20.

Parameters

  • int i
  • int j
  • int k

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

long result = SectionPos.asLong(0, 0, 0);

net.minecraft.core.SectionPos#betweenClosedStream(int,int,int,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:240
  • Modifiers: public static
  • Return: Stream<SectionPos>

คืออะไร

ดำเนินการ betweenClosedStream ตาม implementation ของ SectionPos

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: stream(), tryAdvance(), advance(), accept(), nextX(), nextY(), nextZ(). สร้างออบเจ็กต์: AbstractSpliterator<SectionPos>, Cursor3D, SectionPos. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i
  • int j
  • int k
  • int l
  • int m
  • int n

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

Stream<SectionPos> result = SectionPos.betweenClosedStream(0, 0, 0, 0, 0, 0);

net.minecraft.core.SectionPos#blocksInside()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:223
  • Modifiers: public
  • Return: Stream<BlockPos>

คืออะไร

ดำเนินการ blocksInside ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: betweenClosedStream(), minBlockX(), minBlockY(), minBlockZ(), maxBlockX(), maxBlockY(), maxBlockZ(). คืนค่า: BlockPos.betweenClosedStream(this.minBlockX(), this.minBlockY(), this.minBlockZ(), this.maxBlockX(), this.maxBlockY(), this.maxBlockZ()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
Stream<BlockPos> result = instance.blocksInside();

net.minecraft.core.SectionPos#blockToSection(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:179
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ blockToSection ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: asLong(), blockToSectionCoord(), getX(), getY(), getZ(). คืนค่า: asLong(blockToSectionCoord(BlockPos.getX(l)), blockToSectionCoord(BlockPos.getY(l)), blockToSectionCoord(BlockPos.getZ(l))).

Parameters

  • long l

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

long result = SectionPos.blockToSection(0L);

net.minecraft.core.SectionPos#blockToSectionCoord(double)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:80
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ blockToSectionCoord ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: floor(). คืนค่า: Mth.floor(d) >> 4.

Parameters

  • double d

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

int result = SectionPos.blockToSectionCoord(0.0D);

net.minecraft.core.SectionPos#blockToSectionCoord(int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:76
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ blockToSectionCoord ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: i >> 4.

Parameters

  • int i

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

int result = SectionPos.blockToSectionCoord(0);

net.minecraft.core.SectionPos#bottomOf(ChunkAccess)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:60
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

ดำเนินการ bottomOf ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: of(), getPos(), getMinSectionY(). คืนค่า: of(chunkAccess.getPos(), chunkAccess.getMinSectionY()).

Parameters

  • ChunkAccess chunkAccess

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

ChunkAccess chunkAccess = ...;
SectionPos result = SectionPos.bottomOf(chunkAccess);

net.minecraft.core.SectionPos#center()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:195
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ center ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: origin(), offset(). คืนค่า: this.origin().offset(8, 8, 8).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
BlockPos result = instance.center();

net.minecraft.core.SectionPos#chunk()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:200
  • Modifiers: public
  • Return: ChunkPos

คืออะไร

ดำเนินการ chunk ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: x(), z(). สร้างออบเจ็กต์: ChunkPos. คืนค่า: new ChunkPos(this.x(), this.z()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
ChunkPos result = instance.chunk();

net.minecraft.core.SectionPos#cube(SectionPos,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:227
  • Modifiers: public static
  • Return: Stream<SectionPos>

คืออะไร

ดำเนินการ cube ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: x(), y(), z(), betweenClosedStream(). คืนค่า: betweenClosedStream(j - i, k - i, l - i, j + i, k + i, l + i).

Parameters

  • SectionPos sectionPos
  • int i

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

SectionPos sectionPos = ...;
Stream<SectionPos> result = SectionPos.cube(sectionPos, 0);

net.minecraft.core.SectionPos#getZeroNode(int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:183
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Zero Node

ทำงานยังไง

เรียกต่อ: asLong(). คืนค่า: getZeroNode(asLong(i, 0, j)).

Parameters

  • int i
  • int j

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

long result = SectionPos.getZeroNode(0, 0);

net.minecraft.core.SectionPos#getZeroNode(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:187
  • Modifiers: public static
  • Return: long

คืออะไร

อ่านค่า Zero Node

ทำงานยังไง

คืนค่า: l & -1048576L.

Parameters

  • long l

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

long result = SectionPos.getZeroNode(0L);

net.minecraft.core.SectionPos#maxBlockX()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:167
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ maxBlockX ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), x(). คืนค่า: sectionToBlockCoord(this.x(), 15).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.maxBlockX();

net.minecraft.core.SectionPos#maxBlockY()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:171
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ maxBlockY ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), y(). คืนค่า: sectionToBlockCoord(this.y(), 15).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.maxBlockY();

net.minecraft.core.SectionPos#maxBlockZ()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:175
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ maxBlockZ ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), z(). คืนค่า: sectionToBlockCoord(this.z(), 15).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.maxBlockZ();

net.minecraft.core.SectionPos#minBlockX()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:155
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ minBlockX ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), x(). คืนค่า: sectionToBlockCoord(this.x()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.minBlockX();

net.minecraft.core.SectionPos#minBlockY()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:159
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ minBlockY ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), y(). คืนค่า: sectionToBlockCoord(this.y()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.minBlockY();

net.minecraft.core.SectionPos#minBlockZ()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:163
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ minBlockZ ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), z(). คืนค่า: sectionToBlockCoord(this.z()).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.minBlockZ();

net.minecraft.core.SectionPos#of(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:40
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), getX(), getY(), getZ(). สร้างออบเจ็กต์: SectionPos. คืนค่า: new SectionPos(blockToSectionCoord(blockPos.getX()), blockToSectionCoord(blockPos.getY()), blockToSectionCoord(blockPos.getZ())).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
SectionPos result = SectionPos.of(blockPos);

net.minecraft.core.SectionPos#of(ChunkPos,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:44
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

สร้างออบเจ็กต์: SectionPos. คืนค่า: new SectionPos(chunkPos.x, i, chunkPos.z).

Parameters

  • ChunkPos chunkPos
  • int i

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

ChunkPos chunkPos = ...;
SectionPos result = SectionPos.of(chunkPos, 0);

net.minecraft.core.SectionPos#of(EntityAccess)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:48
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

เรียกต่อ: blockPosition(). คืนค่า: of(entityAccess.blockPosition()).

Parameters

  • EntityAccess entityAccess

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

EntityAccess entityAccess = ...;
SectionPos result = SectionPos.of(entityAccess);

net.minecraft.core.SectionPos#of(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:36
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

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

Parameters

  • int i
  • int j
  • int k

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

SectionPos result = SectionPos.of(0, 0, 0);

net.minecraft.core.SectionPos#of(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:56
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

เรียกต่อ: x(), y(), z(). สร้างออบเจ็กต์: SectionPos. คืนค่า: new SectionPos(x(l), y(l), z(l)).

Parameters

  • long l

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

SectionPos result = SectionPos.of(0L);

net.minecraft.core.SectionPos#of(Position)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:52
  • Modifiers: public static
  • Return: SectionPos

คืออะไร

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

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), x(), y(), z(). สร้างออบเจ็กต์: SectionPos. คืนค่า: new SectionPos(blockToSectionCoord(position.x()), blockToSectionCoord(position.y()), blockToSectionCoord(position.z())).

Parameters

  • Position position

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

Position position = ...;
SectionPos result = SectionPos.of(position);

net.minecraft.core.SectionPos#offset(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:219
  • Modifiers: public
  • Return: SectionPos

คืออะไร

ดำเนินการ offset ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: x(), y(), z(). สร้างออบเจ็กต์: SectionPos. คืนค่า: i == 0 && j == 0 && k == 0 ? this : new SectionPos(this.x() + i, this.y() + j, this.z() + k).

Parameters

  • int i
  • int j
  • int k

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

SectionPos instance = ...;
SectionPos result = instance.offset(0, 0, 0);

net.minecraft.core.SectionPos#offset(long,Direction)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:64
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ offset ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: getStepX(), getStepY(), getStepZ(). คืนค่า: offset(l, direction.getStepX(), direction.getStepY(), direction.getStepZ()).

Parameters

  • long l
  • Direction direction

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

Direction direction = ...;
long result = SectionPos.offset(0L, direction);

net.minecraft.core.SectionPos#offset(long,int,int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:68
  • Modifiers: public static
  • Return: long

คืออะไร

ดำเนินการ offset ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: asLong(), x(), y(), z(). คืนค่า: asLong(x(l) + i, y(l) + j, z(l) + k).

Parameters

  • long l
  • int i
  • int j
  • int k

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

long result = SectionPos.offset(0L, 0, 0, 0);

net.minecraft.core.SectionPos#origin()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:191
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ origin ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionToBlockCoord(), x(), y(), z(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(sectionToBlockCoord(this.x()), sectionToBlockCoord(this.y()), sectionToBlockCoord(this.z())).

Parameters

  • ไม่มี

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

SectionPos instance = ...;
BlockPos result = instance.origin();

net.minecraft.core.SectionPos#posToSectionCoord(double)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:72
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ posToSectionCoord ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: blockToSectionCoord(), floor(). คืนค่า: blockToSectionCoord(Mth.floor(d)).

Parameters

  • double d

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

int result = SectionPos.posToSectionCoord(0.0D);

net.minecraft.core.SectionPos#relativeToBlockPos(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:119
  • Modifiers: public
  • Return: BlockPos

คืออะไร

ดำเนินการ relativeToBlockPos ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: relativeToBlockX(), relativeToBlockY(), relativeToBlockZ(). สร้างออบเจ็กต์: BlockPos. คืนค่า: new BlockPos(this.relativeToBlockX(s), this.relativeToBlockY(s), this.relativeToBlockZ(s)).

Parameters

  • short s

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

SectionPos instance = ...;
BlockPos result = instance.relativeToBlockPos(0);

net.minecraft.core.SectionPos#relativeToBlockX(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:107
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ relativeToBlockX ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: minBlockX(), sectionRelativeX(). คืนค่า: this.minBlockX() + sectionRelativeX(s).

Parameters

  • short s

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

SectionPos instance = ...;
int result = instance.relativeToBlockX(0);

net.minecraft.core.SectionPos#relativeToBlockY(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:111
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ relativeToBlockY ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: minBlockY(), sectionRelativeY(). คืนค่า: this.minBlockY() + sectionRelativeY(s).

Parameters

  • short s

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

SectionPos instance = ...;
int result = instance.relativeToBlockY(0);

net.minecraft.core.SectionPos#relativeToBlockZ(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:115
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ relativeToBlockZ ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: minBlockZ(), sectionRelativeZ(). คืนค่า: this.minBlockZ() + sectionRelativeZ(s).

Parameters

  • short s

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

SectionPos instance = ...;
int result = instance.relativeToBlockZ(0);

net.minecraft.core.SectionPos#sectionRelative(int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:84
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionRelative ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: i & 15.

Parameters

  • int i

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

int result = SectionPos.sectionRelative(0);

net.minecraft.core.SectionPos#sectionRelativePos(BlockPos)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:88
  • Modifiers: public static
  • Return: short

คืออะไร

ดำเนินการ sectionRelativePos ตาม implementation ของ SectionPos

ทำงานยังไง

เรียกต่อ: sectionRelative(), getX(), getY(), getZ(). คืนค่า: (short)(i << 8 | k << 4 | j << 0).

Parameters

  • BlockPos blockPos

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

BlockPos blockPos = ...;
short result = SectionPos.sectionRelativePos(blockPos);

net.minecraft.core.SectionPos#sectionRelativeX(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:95
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionRelativeX ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: s >>> 8 & 15.

Parameters

  • short s

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

int result = SectionPos.sectionRelativeX(0);

net.minecraft.core.SectionPos#sectionRelativeY(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:99
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionRelativeY ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: s >>> 0 & 15.

Parameters

  • short s

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

int result = SectionPos.sectionRelativeY(0);

net.minecraft.core.SectionPos#sectionRelativeZ(short)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:103
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionRelativeZ ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: s >>> 4 & 15.

Parameters

  • short s

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

int result = SectionPos.sectionRelativeZ(0);

net.minecraft.core.SectionPos#sectionToBlockCoord(int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:123
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionToBlockCoord ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: i << 4.

Parameters

  • int i

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

int result = SectionPos.sectionToBlockCoord(0);

net.minecraft.core.SectionPos#sectionToBlockCoord(int,int)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:127
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ sectionToBlockCoord ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: sectionToBlockCoord(i) + j.

Parameters

  • int i
  • int j

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

int result = SectionPos.sectionToBlockCoord(0, 0);

net.minecraft.core.SectionPos#x()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:143
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ x ตาม implementation ของ SectionPos

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.x();

net.minecraft.core.SectionPos#x(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:131
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ x ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: (int)(l << 0 >> 42).

Parameters

  • long l

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

int result = SectionPos.x(0L);

net.minecraft.core.SectionPos#y()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:147
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ y ตาม implementation ของ SectionPos

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.y();

net.minecraft.core.SectionPos#y(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:135
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ y ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: (int)(l << 44 >> 44).

Parameters

  • long l

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

int result = SectionPos.y(0L);

net.minecraft.core.SectionPos#z()

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:151
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ z ตาม implementation ของ SectionPos

ทำงานยังไง

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

Parameters

  • ไม่มี

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

SectionPos instance = ...;
int result = instance.z();

net.minecraft.core.SectionPos#z(long)

  • Origin: common
  • Source: net/minecraft/core/SectionPos.java:139
  • Modifiers: public static
  • Return: int

คืออะไร

ดำเนินการ z ตาม implementation ของ SectionPos

ทำงานยังไง

คืนค่า: (int)(l << 22 >> 42).

Parameters

  • long l

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

int result = SectionPos.z(0L);

UUIDUtil

  • Full name: net.minecraft.core.UUIDUtil
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/UUIDUtil.java
  • Type: class
  • Modifiers: public final

net.minecraft.core.UUIDUtil#createOfflinePlayerUUID(String)

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:86
  • Modifiers: public static
  • Return: UUID

คืออะไร

สร้าง Offline Player UUID

ทำงานยังไง

เรียกต่อ: nameUUIDFromBytes(), getBytes(). คืนค่า: UUID.nameUUIDFromBytes(("OfflinePlayer:" + string).getBytes(StandardCharsets.UTF_8)).

Parameters

  • String string

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

UUID result = UUIDUtil.createOfflinePlayerUUID("value");

net.minecraft.core.UUIDUtil#createOfflineProfile(String)

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:90
  • Modifiers: public static
  • Return: GameProfile

คืออะไร

สร้าง Offline Profile

ทำงานยังไง

เรียกต่อ: createOfflinePlayerUUID(). สร้างออบเจ็กต์: GameProfile. คืนค่า: new GameProfile(uUID, string).

Parameters

  • String string

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

GameProfile result = UUIDUtil.createOfflineProfile("value");

net.minecraft.core.UUIDUtil#readUUID(Dynamic<?>)

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:77
  • Modifiers: public static
  • Return: UUID

คืออะไร

อ่าน UUID

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: asIntStream(), toArray(), uuidFromIntArray(). สร้างออบเจ็กต์: IllegalArgumentException. คืนค่า: uuidFromIntArray(is).

Parameters

  • Dynamic<?> dynamic

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

Dynamic<?> dynamic = ...;
UUID result = UUIDUtil.readUUID(dynamic);

net.minecraft.core.UUIDUtil#uuidFromIntArray(int[])

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:57
  • Modifiers: public static
  • Return: UUID

คืออะไร

ดำเนินการ uuidFromIntArray ตาม implementation ของ UUIDUtil

ทำงานยังไง

สร้างออบเจ็กต์: UUID. คืนค่า: new UUID((long)is[0] << 32 | is[1] & 4294967295L, (long)is[2] << 32 | is[3] & 4294967295L).

Parameters

  • int[] is

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

int[] is = ...;
UUID result = UUIDUtil.uuidFromIntArray(is);

net.minecraft.core.UUIDUtil#uuidToByteArray(UUID)

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:71
  • Modifiers: public static
  • Return: byte[]

คืออะไร

ดำเนินการ uuidToByteArray ตาม implementation ของ UUIDUtil

ทำงานยังไง

เรียกต่อ: wrap(), order(), putLong(), getMostSignificantBits(), getLeastSignificantBits(). คืนค่า: bs.

Parameters

  • UUID uUID

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

UUID uUID = ...;
byte[] result = UUIDUtil.uuidToByteArray(uUID);

net.minecraft.core.UUIDUtil#uuidToIntArray(UUID)

  • Origin: common
  • Source: net/minecraft/core/UUIDUtil.java:61
  • Modifiers: public static
  • Return: int[]

คืออะไร

ดำเนินการ uuidToIntArray ตาม implementation ของ UUIDUtil

ทำงานยังไง

เรียกต่อ: getMostSignificantBits(), getLeastSignificantBits(), leastMostToIntArray(). คืนค่า: leastMostToIntArray(l, m).

Parameters

  • UUID uUID

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

UUID uUID = ...;
int[] result = UUIDUtil.uuidToIntArray(uUID);

Vec3i

  • Full name: net.minecraft.core.Vec3i
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/Vec3i.java
  • Type: class
  • Modifiers: public
  • Implements: Comparable<Vec3i>

net.minecraft.core.Vec3i#above()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:109
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ above ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.above(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.above();

net.minecraft.core.Vec3i#above(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:113
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ above ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.UP, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.above(0);

net.minecraft.core.Vec3i#below()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:117
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ below ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.below(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.below();

net.minecraft.core.Vec3i#below(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:121
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ below ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.DOWN, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.below(0);

net.minecraft.core.Vec3i#closerThan(Vec3i,double)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:184
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ closerThan ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: distSqr(), square(). คืนค่า: this.distSqr(vec3i) < Mth.square(d).

Parameters

  • Vec3i vec3i
  • double d

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

Vec3i instance = ...;
Vec3i vec3i = ...;
boolean result = instance.closerThan(vec3i, 0.0D);

net.minecraft.core.Vec3i#closerToCenterThan(Position,double)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:188
  • Modifiers: public
  • Return: boolean

คืออะไร

ดำเนินการ closerToCenterThan ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: distToCenterSqr(), square(). คืนค่า: this.distToCenterSqr(position) < Mth.square(d).

Parameters

  • Position position
  • double d

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

Vec3i instance = ...;
Position position = ...;
boolean result = instance.closerToCenterThan(position, 0.0D);

net.minecraft.core.Vec3i#compareTo(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:54
  • Modifiers: public
  • Return: int

คืออะไร

เปรียบเทียบ To

ทำงานยังไง

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

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
int result = instance.compareTo(vec3i);

net.minecraft.core.Vec3i#cross(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:176
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ cross ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getY(), getZ(), getX(). สร้างออบเจ็กต์: Vec3i.

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
Vec3i result = instance.cross(vec3i);

net.minecraft.core.Vec3i#distChessboard(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:221
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ distChessboard ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: abs(), getX(), getY(), getZ(), max(). คืนค่า: Math.max(Math.max(i, j), k).

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
int result = instance.distChessboard(vec3i);

net.minecraft.core.Vec3i#distManhattan(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:214
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ distManhattan ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: abs(), getX(), getY(), getZ(). คืนค่า: (int)(f + g + h).

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
int result = instance.distManhattan(vec3i);

net.minecraft.core.Vec3i#distSqr(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:192
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ distSqr ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: distToLowCornerSqr(), getX(), getY(), getZ(). คืนค่า: this.distToLowCornerSqr(vec3i.getX(), vec3i.getY(), vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
double result = instance.distSqr(vec3i);

net.minecraft.core.Vec3i#distToCenterSqr(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:200
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ distToCenterSqr ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: g * g + h * h + i * i.

Parameters

  • double d
  • double e
  • double f

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

Vec3i instance = ...;
double result = instance.distToCenterSqr(0.0D, 0.0D, 0.0D);

net.minecraft.core.Vec3i#distToCenterSqr(Position)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:196
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ distToCenterSqr ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: x(), y(), z(). คืนค่า: this.distToCenterSqr(position.x(), position.y(), position.z()).

Parameters

  • Position position

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

Vec3i instance = ...;
Position position = ...;
double result = instance.distToCenterSqr(position);

net.minecraft.core.Vec3i#distToLowCornerSqr(double,double,double)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:207
  • Modifiers: public
  • Return: double

คืออะไร

ดำเนินการ distToLowCornerSqr ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: g * g + h * h + i * i.

Parameters

  • double d
  • double e
  • double f

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

Vec3i instance = ...;
double result = instance.distToLowCornerSqr(0.0D, 0.0D, 0.0D);

net.minecraft.core.Vec3i#east()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:149
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ east ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.east(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.east();

net.minecraft.core.Vec3i#east(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:153
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ east ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.EAST, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.east(0);

net.minecraft.core.Vec3i#equals(Object)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:36
  • Modifiers: public
  • Return: boolean

คืออะไร

เปรียบเทียบความเท่ากัน equals

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(). มีจุด return อย่างน้อย 4 จุด.

Parameters

  • Object object

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

Vec3i instance = ...;
Object object = ...;
boolean result = instance.equals(object);

net.minecraft.core.Vec3i#get(Direction.Axis)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:228
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า get

ทำงานยังไง

เรียกต่อ: choose(). คืนค่า: axis.choose(this.x, this.y, this.z).

Parameters

  • Direction.Axis axis

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

Vec3i instance = ...;
Direction.Axis axis = ...;
int result = instance.get(axis);

net.minecraft.core.Vec3i#getX()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:62
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า X

ทำงานยังไง

คืนค่า: this.x.

Parameters

  • ไม่มี

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

Vec3i instance = ...;
int result = instance.getX();

net.minecraft.core.Vec3i#getY()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:66
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Y

ทำงานยังไง

คืนค่า: this.y.

Parameters

  • ไม่มี

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

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

net.minecraft.core.Vec3i#getZ()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:70
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Z

ทำงานยังไง

คืนค่า: this.z.

Parameters

  • ไม่มี

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

Vec3i instance = ...;
int result = instance.getZ();

net.minecraft.core.Vec3i#hashCode()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:49
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ hashCode ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getY(), getZ(), getX(). คืนค่า: (this.getY() + this.getZ() * 31) * 31 + this.getX().

Parameters

  • ไม่มี

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

Vec3i instance = ...;
int result = instance.hashCode();

net.minecraft.core.Vec3i#multiply(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:101
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ multiply ตาม implementation ของ Vec3i

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: Vec3i. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.multiply(0);

net.minecraft.core.Vec3i#north()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:125
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ north ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.north(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.north();

net.minecraft.core.Vec3i#north(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:129
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ north ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.NORTH, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.north(0);

net.minecraft.core.Vec3i#offset(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:89
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ offset ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: Vec3i. คืนค่า: i == 0 && j == 0 && k == 0 ? this : new Vec3i(this.getX() + i, this.getY() + j, this.getZ() + k).

Parameters

  • int i
  • int j
  • int k

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

Vec3i instance = ...;
Vec3i result = instance.offset(0, 0, 0);

net.minecraft.core.Vec3i#offset(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:93
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ offset ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.offset(vec3i.getX(), vec3i.getY(), vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
Vec3i result = instance.offset(vec3i);

net.minecraft.core.Vec3i#offsetCodec(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:22
  • Modifiers: public static
  • Return: Codec<Vec3i>

คืออะไร

ดำเนินการ offsetCodec ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: validate(), abs(), getX(), getY(), getZ(), success(), error().

Parameters

  • int i

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

Codec<Vec3i> result = Vec3i.offsetCodec(0);

net.minecraft.core.Vec3i#relative(Direction)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:157
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ relative ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.relative(direction, 1).

Parameters

  • Direction direction

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

Vec3i instance = ...;
Direction direction = ...;
Vec3i result = instance.relative(direction);

net.minecraft.core.Vec3i#relative(Direction,int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:161
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ relative ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getStepX(), getY(), getStepY(), getZ(), getStepZ(). สร้างออบเจ็กต์: Vec3i. คืนค่า: i == 0 ? this : new Vec3i(this.getX() + direction.getStepX() * i, this.getY() + direction.getStepY() * i, this.getZ() + direction.getStepZ() * i).

Parameters

  • Direction direction
  • int i

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

Vec3i instance = ...;
Direction direction = ...;
Vec3i result = instance.relative(direction, 0);

net.minecraft.core.Vec3i#relative(Direction.Axis,int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:165
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ relative ตาม implementation ของ Vec3i

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: getX(), getY(), getZ(). สร้างออบเจ็กต์: Vec3i. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • Direction.Axis axis
  • int i

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

Vec3i instance = ...;
Direction.Axis axis = ...;
Vec3i result = instance.relative(axis, 0);

net.minecraft.core.Vec3i#setX(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:74
  • Modifiers: protected
  • Return: Vec3i

คืออะไร

กำหนดค่า X

ทำงานยังไง

แก้ state: x. คืนค่า: this.

Parameters

  • int i

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

@Override
protected Vec3i setX(int i) {
    return super.setX(i);
}

net.minecraft.core.Vec3i#setY(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:79
  • Modifiers: protected
  • Return: Vec3i

คืออะไร

กำหนดค่า Y

ทำงานยังไง

แก้ state: y. คืนค่า: this.

Parameters

  • int i

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

@Override
protected Vec3i setY(int i) {
    return super.setY(i);
}

net.minecraft.core.Vec3i#setZ(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:84
  • Modifiers: protected
  • Return: Vec3i

คืออะไร

กำหนดค่า Z

ทำงานยังไง

แก้ state: z. คืนค่า: this.

Parameters

  • int i

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

@Override
protected Vec3i setZ(int i) {
    return super.setZ(i);
}

net.minecraft.core.Vec3i#south()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:133
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ south ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.south(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.south();

net.minecraft.core.Vec3i#south(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:137
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ south ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.SOUTH, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.south(0);

net.minecraft.core.Vec3i#subtract(Vec3i)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:97
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ subtract ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: offset(), getX(), getY(), getZ(). คืนค่า: this.offset(-vec3i.getX(), -vec3i.getY(), -vec3i.getZ()).

Parameters

  • Vec3i vec3i

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

Vec3i instance = ...;
Vec3i vec3i = ...;
Vec3i result = instance.subtract(vec3i);

net.minecraft.core.Vec3i#toShortString()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:237
  • Modifiers: public
  • Return: String

คืออะไร

ดำเนินการ toShortString ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: getX(), getY(), getZ(). คืนค่า: this.getX() + ", " + this.getY() + ", " + this.getZ().

Parameters

  • ไม่มี

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

Vec3i instance = ...;
String result = instance.toShortString();

net.minecraft.core.Vec3i#toString()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:232
  • Modifiers: public
  • Return: String

คืออะไร

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

ทำงานยังไง

เรียกต่อ: toStringHelper(), add(), getX(), getY(), getZ(). คืนค่า: MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString().

Parameters

  • ไม่มี

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

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

net.minecraft.core.Vec3i#Vec3i(int,int,int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:30
  • Modifiers: public
  • Kind: constructor

คืออะไร

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

ทำงานยังไง

แก้ state: x, y, z.

Parameters

  • int i
  • int j
  • int k

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

Vec3i instance = new Vec3i(0, 0, 0);

net.minecraft.core.Vec3i#west()

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:141
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ west ตาม implementation ของ Vec3i

ทำงานยังไง

คืนค่า: this.west(1).

Parameters

  • ไม่มี

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

Vec3i instance = ...;
Vec3i result = instance.west();

net.minecraft.core.Vec3i#west(int)

  • Origin: common
  • Source: net/minecraft/core/Vec3i.java:145
  • Modifiers: public
  • Return: Vec3i

คืออะไร

ดำเนินการ west ตาม implementation ของ Vec3i

ทำงานยังไง

เรียกต่อ: relative(). คืนค่า: this.relative(Direction.WEST, i).

Parameters

  • int i

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

Vec3i instance = ...;
Vec3i result = instance.west(0);

WritableRegistry

  • Full name: net.minecraft.core.WritableRegistry
  • Package: net.minecraft.core
  • Source: commonnet/minecraft/core/WritableRegistry.java
  • Type: interface
  • Modifiers: public
  • Implements: Registry<T>

net.minecraft.core.WritableRegistry#bindTag(TagKey<T>,List<Holder<T>>)

  • Origin: common
  • Source: net/minecraft/core/WritableRegistry.java:10
  • Modifiers: ``
  • Return: void

คืออะไร

ผูก Tag

ทำงานยังไง

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

Parameters

  • TagKey<T> tagKey
  • List<Holder<T>> list

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

WritableRegistry instance = ...;
TagKey<T> tagKey = ...;
List<Holder<T>> list = ...;
instance.bindTag(tagKey, list);

net.minecraft.core.WritableRegistry#createRegistrationLookup()

  • Origin: common
  • Source: net/minecraft/core/WritableRegistry.java:14
  • Modifiers: ``
  • Return: HolderGetter<T>

คืออะไร

สร้าง Registration Lookup

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WritableRegistry instance = ...;
HolderGetter<T> result = instance.createRegistrationLookup();

net.minecraft.core.WritableRegistry#isEmpty()

  • Origin: common
  • Source: net/minecraft/core/WritableRegistry.java:12
  • Modifiers: ``
  • Return: boolean

คืออะไร

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

ทำงานยังไง

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

Parameters

  • ไม่มี

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

WritableRegistry instance = ...;
boolean result = instance.isEmpty();

net.minecraft.core.WritableRegistry#register(ResourceKey<T>,T,RegistrationInfo)

  • Origin: common
  • Source: net/minecraft/core/WritableRegistry.java:8
  • Modifiers: ``
  • Return: Holder.Reference<T>

คืออะไร

ลงทะเบียน register

ทำงานยังไง

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

Parameters

  • ResourceKey<T> resourceKey
  • T object
  • RegistrationInfo registrationInfo

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

WritableRegistry instance = ...;
ResourceKey<T> resourceKey = ...;
T object = ...;
RegistrationInfo registrationInfo = ...;
Holder.Reference<T> result = instance.register(resourceKey, object, registrationInfo);