RopesLayer.java
net.minecraft.client.renderer.entity.layers.RopesLayer
信息
- 全限定名:net.minecraft.client.renderer.entity.layers.RopesLayer
- 类型:public class
- 包:net.minecraft.client.renderer.entity.layers
- 源码路径:src/main/java/net/minecraft/client/renderer/entity/layers/RopesLayer.java
- 起始行号:L17
- 继承:RenderLayer<HappyGhastRenderState,M>
- 职责:
TODO
字段/常量
-
ropesTexture- 类型:
Identifier - 修饰符:
private final - 源码定位:
L18 - 说明:
TODO
- 类型:
-
adultModel- 类型:
HappyGhastModel - 修饰符:
private final - 源码定位:
L19 - 说明:
TODO
- 类型:
-
babyModel- 类型:
HappyGhastModel - 修饰符:
private final - 源码定位:
L20 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public RopesLayer(RenderLayerParent<HappyGhastRenderState,M> renderer, EntityModelSet modelSet, Identifier ropesTexture) @ L22
- 构造器名:RopesLayer
- 源码定位:L22
- 修饰符:public
参数:
- renderer: RenderLayerParent<HappyGhastRenderState,M>
- modelSet: EntityModelSet
- ropesTexture: Identifier
说明:
TODO
方法
下面的方法块按源码顺序生成。
public void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, HappyGhastRenderState state, float yRot, float xRot) @ L29
- 方法名:submit
- 源码定位:L29
- 返回类型:void
- 修饰符:public
参数:
- poseStack: PoseStack
- submitNodeCollector: SubmitNodeCollector
- lightCoords: int
- state: HappyGhastRenderState
- yRot: float
- xRot: float
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class RopesLayer<M extends HappyGhastModel> extends RenderLayer<HappyGhastRenderState, M> {
private final Identifier ropesTexture;
private final HappyGhastModel adultModel;
private final HappyGhastModel babyModel;
public RopesLayer(RenderLayerParent<HappyGhastRenderState, M> renderer, EntityModelSet modelSet, Identifier ropesTexture) {
super(renderer);
this.ropesTexture = ropesTexture;
this.adultModel = new HappyGhastModel(modelSet.bakeLayer(ModelLayers.HAPPY_GHAST_ROPES));
this.babyModel = new HappyGhastModel(modelSet.bakeLayer(ModelLayers.HAPPY_GHAST_BABY_ROPES));
}
public void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, HappyGhastRenderState state, float yRot, float xRot) {
if (state.isLeashHolder && state.bodyItem.is(ItemTags.HARNESSES)) {
HappyGhastModel model = state.isBaby ? this.babyModel : this.adultModel;
submitNodeCollector.submitModel(model, state, poseStack, this.ropesTexture, lightCoords, OverlayTexture.NO_OVERLAY, state.outlineColor, null);
}
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
字段/构造调用 - 关联成员:
HappyGhastModel()
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置: