ResolvedModel.java
net.minecraft.client.resources.model.ResolvedModel
信息
- 全限定名:net.minecraft.client.resources.model.ResolvedModel
- 类型:public interface
- 包:net.minecraft.client.resources.model
- 源码路径:src/main/java/net/minecraft/client/resources/model/ResolvedModel.java
- 起始行号:L16
- 继承:ModelDebugName
- 职责:
TODO
字段/常量
-
DEFAULT_AMBIENT_OCCLUSION- 类型:
boolean - 修饰符:
package-private - 源码定位:
L17 - 说明:
TODO
- 类型:
-
DEFAULT_GUI_LIGHT- 类型:
UnbakedModel.GuiLight - 修饰符:
package-private - 源码定位:
L18 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
- 无
方法
下面的方法块按源码顺序生成。
UnbakedModel wrapped() @ L20
- 方法名:wrapped
- 源码定位:L20
- 返回类型:UnbakedModel
- 修饰符:package-private
参数:
- 无
说明:
TODO
ResolvedModel parent() @ L22
- 方法名:parent
- 源码定位:L22
- 返回类型:ResolvedModel
- 修饰符:package-private
参数:
- 无
说明:
TODO
static TextureSlots findTopTextureSlots(ResolvedModel top) @ L24
- 方法名:findTopTextureSlots
- 源码定位:L24
- 返回类型:TextureSlots
- 修饰符:static
参数:
- top: ResolvedModel
说明:
TODO
default TextureSlots getTopTextureSlots() @ L35
- 方法名:getTopTextureSlots
- 源码定位:L35
- 返回类型:TextureSlots
- 修饰符:default
参数:
- 无
说明:
TODO
static boolean findTopAmbientOcclusion(ResolvedModel current) @ L39
- 方法名:findTopAmbientOcclusion
- 源码定位:L39
- 返回类型:boolean
- 修饰符:static
参数:
- current: ResolvedModel
说明:
TODO
default boolean getTopAmbientOcclusion() @ L52
- 方法名:getTopAmbientOcclusion
- 源码定位:L52
- 返回类型:boolean
- 修饰符:default
参数:
- 无
说明:
TODO
static UnbakedModel.GuiLight findTopGuiLight(ResolvedModel current) @ L56
- 方法名:findTopGuiLight
- 源码定位:L56
- 返回类型:UnbakedModel.GuiLight
- 修饰符:static
参数:
- current: ResolvedModel
说明:
TODO
default UnbakedModel.GuiLight getTopGuiLight() @ L69
- 方法名:getTopGuiLight
- 源码定位:L69
- 返回类型:UnbakedModel.GuiLight
- 修饰符:default
参数:
- 无
说明:
TODO
static UnbakedGeometry findTopGeometry(ResolvedModel current) @ L73
- 方法名:findTopGeometry
- 源码定位:L73
- 返回类型:UnbakedGeometry
- 修饰符:static
参数:
- current: ResolvedModel
说明:
TODO
default UnbakedGeometry getTopGeometry() @ L86
- 方法名:getTopGeometry
- 源码定位:L86
- 返回类型:UnbakedGeometry
- 修饰符:default
参数:
- 无
说明:
TODO
default QuadCollection bakeTopGeometry(TextureSlots textureSlots, ModelBaker baker, ModelState state) @ L90
- 方法名:bakeTopGeometry
- 源码定位:L90
- 返回类型:QuadCollection
- 修饰符:default
参数:
- textureSlots: TextureSlots
- baker: ModelBaker
- state: ModelState
说明:
TODO
static Material.Baked resolveParticleMaterial(TextureSlots textureSlots, ModelBaker baker, ModelDebugName resolvedModel) @ L94
- 方法名:resolveParticleMaterial
- 源码定位:L94
- 返回类型:Material.Baked
- 修饰符:static
参数:
- textureSlots: TextureSlots
- baker: ModelBaker
- resolvedModel: ModelDebugName
说明:
TODO
default Material.Baked resolveParticleMaterial(TextureSlots textureSlots, ModelBaker baker) @ L98
- 方法名:resolveParticleMaterial
- 源码定位:L98
- 返回类型:Material.Baked
- 修饰符:default
参数:
- textureSlots: TextureSlots
- baker: ModelBaker
说明:
TODO
static ItemTransform findTopTransform(ResolvedModel current, ItemDisplayContext type) @ L102
- 方法名:findTopTransform
- 源码定位:L102
- 返回类型:ItemTransform
- 修饰符:static
参数:
- current: ResolvedModel
- type: ItemDisplayContext
说明:
TODO
static ItemTransforms findTopTransforms(ResolvedModel top) @ L118
- 方法名:findTopTransforms
- 源码定位:L118
- 返回类型:ItemTransforms
- 修饰符:static
参数:
- top: ResolvedModel
说明:
TODO
default ItemTransforms getTopTransforms() @ L133
- 方法名:getTopTransforms
- 源码定位:L133
- 返回类型:ItemTransforms
- 修饰符:default
参数:
- 无
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public interface ResolvedModel extends ModelDebugName {
boolean DEFAULT_AMBIENT_OCCLUSION = true;
UnbakedModel.GuiLight DEFAULT_GUI_LIGHT = UnbakedModel.GuiLight.SIDE;
UnbakedModel wrapped();
@Nullable ResolvedModel parent();
static TextureSlots findTopTextureSlots(ResolvedModel top) {
ResolvedModel current = top;
TextureSlots.Resolver resolver;
for (resolver = new TextureSlots.Resolver(); current != null; current = current.parent()) {
resolver.addLast(current.wrapped().textureSlots());
}
return resolver.resolve(top);
}
default TextureSlots getTopTextureSlots() {
return findTopTextureSlots(this);
}
static boolean findTopAmbientOcclusion(ResolvedModel current) {
while (current != null) {
Boolean hasAmbientOcclusion = current.wrapped().ambientOcclusion();
if (hasAmbientOcclusion != null) {
return hasAmbientOcclusion;
}
current = current.parent();
}
return true;
}
default boolean getTopAmbientOcclusion() {
return findTopAmbientOcclusion(this);
}
static UnbakedModel.GuiLight findTopGuiLight(ResolvedModel current) {
while (current != null) {
UnbakedModel.GuiLight guiLight = current.wrapped().guiLight();
if (guiLight != null) {
return guiLight;
}
current = current.parent();
}
return DEFAULT_GUI_LIGHT;
}
default UnbakedModel.GuiLight getTopGuiLight() {
return findTopGuiLight(this);
}
static UnbakedGeometry findTopGeometry(ResolvedModel current) {
while (current != null) {
UnbakedGeometry geometry = current.wrapped().geometry();
if (geometry != null) {
return geometry;
}
current = current.parent();
}
return UnbakedGeometry.EMPTY;
}
default UnbakedGeometry getTopGeometry() {
return findTopGeometry(this);
}
default QuadCollection bakeTopGeometry(TextureSlots textureSlots, ModelBaker baker, ModelState state) {
return this.getTopGeometry().bake(textureSlots, baker, state, this);
}
static Material.Baked resolveParticleMaterial(TextureSlots textureSlots, ModelBaker baker, ModelDebugName resolvedModel) {
return baker.materials().resolveSlot(textureSlots, "particle", resolvedModel);
}
default Material.Baked resolveParticleMaterial(TextureSlots textureSlots, ModelBaker baker) {
return resolveParticleMaterial(textureSlots, baker, this);
}
static ItemTransform findTopTransform(ResolvedModel current, ItemDisplayContext type) {
while (current != null) {
ItemTransforms transforms = current.wrapped().transforms();
if (transforms != null) {
ItemTransform transform = transforms.getTransform(type);
if (transform != ItemTransform.NO_TRANSFORM) {
return transform;
}
}
current = current.parent();
}
return ItemTransform.NO_TRANSFORM;
}
static ItemTransforms findTopTransforms(ResolvedModel top) {
ItemTransform thirdPersonLeftHand = findTopTransform(top, ItemDisplayContext.THIRD_PERSON_LEFT_HAND);
ItemTransform thirdPersonRightHand = findTopTransform(top, ItemDisplayContext.THIRD_PERSON_RIGHT_HAND);
ItemTransform firstPersonLeftHand = findTopTransform(top, ItemDisplayContext.FIRST_PERSON_LEFT_HAND);
ItemTransform firstPersonRightHand = findTopTransform(top, ItemDisplayContext.FIRST_PERSON_RIGHT_HAND);
ItemTransform head = findTopTransform(top, ItemDisplayContext.HEAD);
ItemTransform gui = findTopTransform(top, ItemDisplayContext.GUI);
ItemTransform ground = findTopTransform(top, ItemDisplayContext.GROUND);
ItemTransform fixed = findTopTransform(top, ItemDisplayContext.FIXED);
ItemTransform fixedFromBottom = findTopTransform(top, ItemDisplayContext.ON_SHELF);
return new ItemTransforms(
thirdPersonLeftHand, thirdPersonRightHand, firstPersonLeftHand, firstPersonRightHand, head, gui, ground, fixed, fixedFromBottom
);
}
default ItemTransforms getTopTransforms() {
return findTopTransforms(this);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数/继承
- 引用位置:
-
- 引用位置:
字段/返回值
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
构造调用/返回值 - 关联成员:
ItemTransforms()
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
返回值
- 引用位置:
-
- 引用位置:
参数/方法调用/构造调用/返回值 - 关联成员:
Resolver(), TextureSlots.Resolver()
- 引用位置:
-
- 引用位置:
参数
- 引用位置: