QuartPos.java
net.minecraft.core.QuartPos
信息
- 全限定名:net.minecraft.core.QuartPos
- 类型:public final class
- 包:net.minecraft.core
- 源码路径:src/main/java/net/minecraft/core/QuartPos.java
- 起始行号:L3
- 职责:
TODO
字段/常量
-
BITS- 类型:
int - 修饰符:
public static final - 源码定位:
L4 - 说明:
TODO
- 类型:
-
SIZE- 类型:
int - 修饰符:
public static final - 源码定位:
L5 - 说明:
TODO
- 类型:
-
MASK- 类型:
int - 修饰符:
public static final - 源码定位:
L6 - 说明:
TODO
- 类型:
-
SECTION_TO_QUARTS_BITS- 类型:
int - 修饰符:
private static final - 源码定位:
L7 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
private QuartPos() @ L9
- 构造器名:QuartPos
- 源码定位:L9
- 修饰符:private
参数:
- 无
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static int fromBlock(int blockCoord) @ L12
- 方法名:fromBlock
- 源码定位:L12
- 返回类型:int
- 修饰符:public static
参数:
- blockCoord: int
说明:
TODO
public static int quartLocal(int blockCoord) @ L16
- 方法名:quartLocal
- 源码定位:L16
- 返回类型:int
- 修饰符:public static
参数:
- blockCoord: int
说明:
TODO
public static int toBlock(int quart) @ L20
- 方法名:toBlock
- 源码定位:L20
- 返回类型:int
- 修饰符:public static
参数:
- quart: int
说明:
TODO
public static int fromSection(int section) @ L24
- 方法名:fromSection
- 源码定位:L24
- 返回类型:int
- 修饰符:public static
参数:
- section: int
说明:
TODO
public static int toSection(int quart) @ L28
- 方法名:toSection
- 源码定位:L28
- 返回类型:int
- 修饰符:public static
参数:
- quart: int
说明:
TODO
代码
public final class QuartPos {
public static final int BITS = 2;
public static final int SIZE = 4;
public static final int MASK = 3;
private static final int SECTION_TO_QUARTS_BITS = 2;
private QuartPos() {
}
public static int fromBlock(int blockCoord) {
return blockCoord >> 2;
}
public static int quartLocal(int blockCoord) {
return blockCoord & 3;
}
public static int toBlock(int quart) {
return quart << 2;
}
public static int fromSection(int section) {
return section << 2;
}
public static int toSection(int quart) {
return quart >> 2;
}
}引用的其他类
- 无