ChunkSectionLayer.java
net.minecraft.client.renderer.chunk.ChunkSectionLayer
信息
- 全限定名:net.minecraft.client.renderer.chunk.ChunkSectionLayer
- 类型:public enum
- 包:net.minecraft.client.renderer.chunk
- 源码路径:src/main/java/net/minecraft/client/renderer/chunk/ChunkSectionLayer.java
- 起始行号:L12
- 职责:
TODO
字段/常量
-
false, false, true- 类型:
SOLID(RenderPipelines.SOLID_TERRAIN,, - 修饰符:
package-private - 源码定位:
L13 - 说明:
TODO
- 类型:
-
pipeline- 类型:
RenderPipeline - 修饰符:
private final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
bufferSize- 类型:
int - 修饰符:
private final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
translucent- 类型:
boolean - 修饰符:
private final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
label- 类型:
String - 修饰符:
private final - 源码定位:
L20 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
private ChunkSectionLayer(RenderPipeline pipeline, int bufferSize, boolean translucent) @ L22
- 构造器名:ChunkSectionLayer
- 源码定位:L22
- 修饰符:private
参数:
- pipeline: RenderPipeline
- bufferSize: int
- translucent: boolean
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static ChunkSectionLayer byTransparency(Transparency transparency) @ L29
- 方法名:byTransparency
- 源码定位:L29
- 返回类型:ChunkSectionLayer
- 修饰符:public static
参数:
- transparency: Transparency
说明:
TODO
public RenderPipeline pipeline() @ L37
- 方法名:pipeline
- 源码定位:L37
- 返回类型:RenderPipeline
- 修饰符:public
参数:
- 无
说明:
TODO
public int bufferSize() @ L41
- 方法名:bufferSize
- 源码定位:L41
- 返回类型:int
- 修饰符:public
参数:
- 无
说明:
TODO
public String label() @ L45
- 方法名:label
- 源码定位:L45
- 返回类型:String
- 修饰符:public
参数:
- 无
说明:
TODO
public boolean translucent() @ L49
- 方法名:translucent
- 源码定位:L49
- 返回类型:boolean
- 修饰符:public
参数:
- 无
说明:
TODO
public VertexFormat vertexFormat() @ L53
- 方法名:vertexFormat
- 源码定位:L53
- 返回类型:VertexFormat
- 修饰符:public
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public enum ChunkSectionLayer {
SOLID(RenderPipelines.SOLID_TERRAIN, 4194304, false),
CUTOUT(RenderPipelines.CUTOUT_TERRAIN, 4194304, false),
TRANSLUCENT(RenderPipelines.TRANSLUCENT_TERRAIN, 786432, true);
private final RenderPipeline pipeline;
private final int bufferSize;
private final boolean translucent;
private final String label;
private ChunkSectionLayer(RenderPipeline pipeline, int bufferSize, boolean translucent) {
this.pipeline = pipeline;
this.bufferSize = bufferSize;
this.translucent = translucent;
this.label = this.toString().toLowerCase(Locale.ROOT);
}
public static ChunkSectionLayer byTransparency(Transparency transparency) {
if (transparency.hasTranslucent()) {
return TRANSLUCENT;
} else {
return transparency.hasTransparent() ? CUTOUT : SOLID;
}
}
public RenderPipeline pipeline() {
return this.pipeline;
}
public int bufferSize() {
return this.bufferSize;
}
public String label() {
return this.label;
}
public boolean translucent() {
return this.translucent;
}
public VertexFormat vertexFormat() {
return this.pipeline.getVertexFormat();
}
}引用的其他类
-
- 引用位置:
参数/字段/返回值
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
字段
- 引用位置: