RenderLayer.java

net.minecraft.client.renderer.entity.layers.RenderLayer

信息

  • 全限定名:net.minecraft.client.renderer.entity.layers.RenderLayer
  • 类型:public abstract class
  • 包:net.minecraft.client.renderer.entity.layers
  • 源码路径:src/main/java/net/minecraft/client/renderer/entity/layers/RenderLayer.java
  • 起始行号:L17
  • 职责:

    TODO

字段/常量

  • renderer
    • 类型: RenderLayerParent<S,M>
    • 修饰符: private final
    • 源码定位: L18
    • 说明:

      TODO

内部类/嵌套类型

构造器

public RenderLayer(RenderLayerParent<S,M> renderer) @ L20

  • 构造器名:RenderLayer
  • 源码定位:L20
  • 修饰符:public

参数:

  • renderer: RenderLayerParent<S,M>

说明:

TODO

方法

下面的方法块按源码顺序生成。

protected static <S extends LivingEntityRenderState> void coloredCutoutModelCopyLayerRender(Model<?super S> model, Identifier texture, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, S state, int color, int order) @ L24

  • 方法名:coloredCutoutModelCopyLayerRender
  • 源码定位:L24
  • 返回类型: void
  • 修饰符:protected static

参数:

  • model: Model<?super S>
  • texture: Identifier
  • poseStack: PoseStack
  • submitNodeCollector: SubmitNodeCollector
  • lightCoords: int
  • state: S
  • color: int
  • order: int

说明:

TODO

protected static <S extends LivingEntityRenderState> void renderColoredCutoutModel(Model<?super S> model, Identifier texture, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, S state, int color, int order) @ L39

  • 方法名:renderColoredCutoutModel
  • 源码定位:L39
  • 返回类型: void
  • 修饰符:protected static

参数:

  • model: Model<?super S>
  • texture: Identifier
  • poseStack: PoseStack
  • submitNodeCollector: SubmitNodeCollector
  • lightCoords: int
  • state: S
  • color: int
  • order: int

说明:

TODO

public M getParentModel() @ L64

  • 方法名:getParentModel
  • 源码定位:L64
  • 返回类型:M
  • 修饰符:public

参数:

说明:

TODO

public abstract void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, S state, float yRot, float xRot) @ L68

  • 方法名:submit
  • 源码定位:L68
  • 返回类型:void
  • 修饰符:public abstract

参数:

  • poseStack: PoseStack
  • submitNodeCollector: SubmitNodeCollector
  • lightCoords: int
  • state: S
  • yRot: float
  • xRot: float

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public abstract class RenderLayer<S extends EntityRenderState, M extends EntityModel<? super S>> {
    private final RenderLayerParent<S, M> renderer;
 
    public RenderLayer(RenderLayerParent<S, M> renderer) {
        this.renderer = renderer;
    }
 
    protected static <S extends LivingEntityRenderState> void coloredCutoutModelCopyLayerRender(
        Model<? super S> model,
        Identifier texture,
        PoseStack poseStack,
        SubmitNodeCollector submitNodeCollector,
        int lightCoords,
        S state,
        int color,
        int order
    ) {
        if (!state.isInvisible) {
            renderColoredCutoutModel(model, texture, poseStack, submitNodeCollector, lightCoords, state, color, order);
        }
    }
 
    protected static <S extends LivingEntityRenderState> void renderColoredCutoutModel(
        Model<? super S> model,
        Identifier texture,
        PoseStack poseStack,
        SubmitNodeCollector submitNodeCollector,
        int lightCoords,
        S state,
        int color,
        int order
    ) {
        submitNodeCollector.order(order)
            .submitModel(
                model,
                state,
                poseStack,
                RenderTypes.entityCutout(texture),
                lightCoords,
                LivingEntityRenderer.getOverlayCoords(state, 0.0F),
                color,
                null,
                state.outlineColor,
                null
            );
    }
 
    public M getParentModel() {
        return this.renderer.getModel();
    }
 
    public abstract void submit(
        final PoseStack poseStack, final SubmitNodeCollector submitNodeCollector, final int lightCoords, S state, float yRot, float xRot
    );
}

引用的其他类