LevelTargetBundle.java
net.minecraft.client.renderer.LevelTargetBundle
信息
- 全限定名:net.minecraft.client.renderer.LevelTargetBundle
- 类型:public class
- 包:net.minecraft.client.renderer
- 源码路径:src/main/java/net/minecraft/client/renderer/LevelTargetBundle.java
- 起始行号:L12
- 实现:PostChain.TargetBundle
- 职责:
TODO
字段/常量
-
MAIN_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L13 - 说明:
TODO
- 类型:
-
TRANSLUCENT_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L14 - 说明:
TODO
- 类型:
-
ITEM_ENTITY_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L15 - 说明:
TODO
- 类型:
-
PARTICLES_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L16 - 说明:
TODO
- 类型:
-
WEATHER_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L17 - 说明:
TODO
- 类型:
-
CLOUDS_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
ENTITY_OUTLINE_TARGET_ID- 类型:
Identifier - 修饰符:
public static final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
MAIN_TARGETS- 类型:
Set<Identifier> - 修饰符:
public static final - 源码定位:
L20 - 说明:
TODO
- 类型:
-
OUTLINE_TARGETS- 类型:
Set<Identifier> - 修饰符:
public static final - 源码定位:
L21 - 说明:
TODO
- 类型:
-
SORTING_TARGETS- 类型:
Set<Identifier> - 修饰符:
public static final - 源码定位:
L22 - 说明:
TODO
- 类型:
-
main- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L25 - 说明:
TODO
- 类型:
-
translucent- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L26 - 说明:
TODO
- 类型:
-
itemEntity- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L27 - 说明:
TODO
- 类型:
-
particles- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L28 - 说明:
TODO
- 类型:
-
weather- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L29 - 说明:
TODO
- 类型:
-
clouds- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L30 - 说明:
TODO
- 类型:
-
entityOutline- 类型:
ResourceHandle<RenderTarget> - 修饰符:
public - 源码定位:
L31 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
public void replace(Identifier id, ResourceHandle<RenderTarget> handle) @ L33
- 方法名:replace
- 源码定位:L33
- 返回类型:void
- 修饰符:public
参数:
- id: Identifier
- handle: ResourceHandle
说明:
TODO
public ResourceHandle<RenderTarget> get(Identifier id) @ L56
- 方法名:get
- 源码定位:L56
- 返回类型:ResourceHandle
- 修饰符:public
参数:
- id: Identifier
说明:
TODO
public void clear() @ L75
- 方法名:clear
- 源码定位:L75
- 返回类型:void
- 修饰符:public
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class LevelTargetBundle implements PostChain.TargetBundle {
public static final Identifier MAIN_TARGET_ID = PostChain.MAIN_TARGET_ID;
public static final Identifier TRANSLUCENT_TARGET_ID = Identifier.withDefaultNamespace("translucent");
public static final Identifier ITEM_ENTITY_TARGET_ID = Identifier.withDefaultNamespace("item_entity");
public static final Identifier PARTICLES_TARGET_ID = Identifier.withDefaultNamespace("particles");
public static final Identifier WEATHER_TARGET_ID = Identifier.withDefaultNamespace("weather");
public static final Identifier CLOUDS_TARGET_ID = Identifier.withDefaultNamespace("clouds");
public static final Identifier ENTITY_OUTLINE_TARGET_ID = Identifier.withDefaultNamespace("entity_outline");
public static final Set<Identifier> MAIN_TARGETS = Set.of(MAIN_TARGET_ID);
public static final Set<Identifier> OUTLINE_TARGETS = Set.of(MAIN_TARGET_ID, ENTITY_OUTLINE_TARGET_ID);
public static final Set<Identifier> SORTING_TARGETS = Set.of(
MAIN_TARGET_ID, TRANSLUCENT_TARGET_ID, ITEM_ENTITY_TARGET_ID, PARTICLES_TARGET_ID, WEATHER_TARGET_ID, CLOUDS_TARGET_ID
);
public ResourceHandle<RenderTarget> main = ResourceHandle.invalid();
public @Nullable ResourceHandle<RenderTarget> translucent;
public @Nullable ResourceHandle<RenderTarget> itemEntity;
public @Nullable ResourceHandle<RenderTarget> particles;
public @Nullable ResourceHandle<RenderTarget> weather;
public @Nullable ResourceHandle<RenderTarget> clouds;
public @Nullable ResourceHandle<RenderTarget> entityOutline;
@Override
public void replace(Identifier id, ResourceHandle<RenderTarget> handle) {
if (id.equals(MAIN_TARGET_ID)) {
this.main = handle;
} else if (id.equals(TRANSLUCENT_TARGET_ID)) {
this.translucent = handle;
} else if (id.equals(ITEM_ENTITY_TARGET_ID)) {
this.itemEntity = handle;
} else if (id.equals(PARTICLES_TARGET_ID)) {
this.particles = handle;
} else if (id.equals(WEATHER_TARGET_ID)) {
this.weather = handle;
} else if (id.equals(CLOUDS_TARGET_ID)) {
this.clouds = handle;
} else {
if (!id.equals(ENTITY_OUTLINE_TARGET_ID)) {
throw new IllegalArgumentException("No target with id " + id);
}
this.entityOutline = handle;
}
}
@Override
public @Nullable ResourceHandle<RenderTarget> get(Identifier id) {
if (id.equals(MAIN_TARGET_ID)) {
return this.main;
} else if (id.equals(TRANSLUCENT_TARGET_ID)) {
return this.translucent;
} else if (id.equals(ITEM_ENTITY_TARGET_ID)) {
return this.itemEntity;
} else if (id.equals(PARTICLES_TARGET_ID)) {
return this.particles;
} else if (id.equals(WEATHER_TARGET_ID)) {
return this.weather;
} else if (id.equals(CLOUDS_TARGET_ID)) {
return this.clouds;
} else {
return id.equals(ENTITY_OUTLINE_TARGET_ID) ? this.entityOutline : null;
}
}
public void clear() {
this.main = ResourceHandle.invalid();
this.translucent = null;
this.itemEntity = null;
this.particles = null;
this.weather = null;
this.clouds = null;
this.entityOutline = null;
}
}引用的其他类
-
- 引用位置:
参数/字段/返回值
- 引用位置:
-
- 引用位置:
参数/字段/方法调用/返回值 - 关联成员:
ResourceHandle.invalid()
- 引用位置:
-
- 引用位置:
实现
- 引用位置:
-
- 引用位置:
参数/字段/方法调用 - 关联成员:
Identifier.withDefaultNamespace()
- 引用位置: