CubeDefinition.java
net.minecraft.client.model.geom.builders.CubeDefinition
信息
- 全限定名:net.minecraft.client.model.geom.builders.CubeDefinition
- 类型:public final class
- 包:net.minecraft.client.model.geom.builders
- 源码路径:src/main/java/net/minecraft/client/model/geom/builders/CubeDefinition.java
- 起始行号:L13
- 职责:
TODO
字段/常量
-
comment- 类型:
String - 修饰符:
private final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
origin- 类型:
Vector3fc - 修饰符:
private final - 源码定位:
L15 - 说明:
TODO
- 类型:
-
dimensions- 类型:
Vector3fc - 修饰符:
private final - 源码定位:
L16 - 说明:
TODO
- 类型:
-
grow- 类型:
CubeDeformation - 修饰符:
private final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
mirror- 类型:
boolean - 修饰符:
private final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
texCoord- 类型:
UVPair - 修饰符:
private final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
texScale- 类型:
UVPair - 修饰符:
private final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
visibleFaces- 类型:
Set<Direction> - 修饰符:
private final - 源码定位:
L21 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
protected CubeDefinition(String comment, float xTexOffs, float yTexOffs, float minX, float minY, float minZ, float width, float height, float depth, CubeDeformation grow, boolean mirror, float xTexScale, float yTexScale, Set<Direction> visibleFaces) @ L23
- 构造器名:CubeDefinition
- 源码定位:L23
- 修饰符:protected
参数:
- comment: String
- xTexOffs: float
- yTexOffs: float
- minX: float
- minY: float
- minZ: float
- width: float
- height: float
- depth: float
- grow: CubeDeformation
- mirror: boolean
- xTexScale: float
- yTexScale: float
- visibleFaces: Set
说明:
TODO
方法
下面的方法块按源码顺序生成。
public ModelPart.Cube bake(int texScaleX, int texScaleY) @ L49
- 方法名:bake
- 源码定位:L49
- 返回类型:ModelPart.Cube
- 修饰符:public
参数:
- texScaleX: int
- texScaleY: int
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public final class CubeDefinition {
private final @Nullable String comment;
private final Vector3fc origin;
private final Vector3fc dimensions;
private final CubeDeformation grow;
private final boolean mirror;
private final UVPair texCoord;
private final UVPair texScale;
private final Set<Direction> visibleFaces;
protected CubeDefinition(
@Nullable String comment,
float xTexOffs,
float yTexOffs,
float minX,
float minY,
float minZ,
float width,
float height,
float depth,
CubeDeformation grow,
boolean mirror,
float xTexScale,
float yTexScale,
Set<Direction> visibleFaces
) {
this.comment = comment;
this.texCoord = new UVPair(xTexOffs, yTexOffs);
this.origin = new Vector3f(minX, minY, minZ);
this.dimensions = new Vector3f(width, height, depth);
this.grow = grow;
this.mirror = mirror;
this.texScale = new UVPair(xTexScale, yTexScale);
this.visibleFaces = visibleFaces;
}
public ModelPart.Cube bake(int texScaleX, int texScaleY) {
return new ModelPart.Cube(
(int)this.texCoord.u(),
(int)this.texCoord.v(),
this.origin.x(),
this.origin.y(),
this.origin.z(),
this.dimensions.x(),
this.dimensions.y(),
this.dimensions.z(),
this.grow.growX,
this.grow.growY,
this.grow.growZ,
this.mirror,
texScaleX * this.texScale.u(),
texScaleY * this.texScale.v(),
this.visibleFaces
);
}
}引用的其他类
-
- 引用位置:
方法调用/构造调用/返回值 - 关联成员:
Cube(), ModelPart.Cube()
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
字段/构造调用 - 关联成员:
UVPair()
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置: