34 lines
1.5 KiB
Java
34 lines
1.5 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.client.renderer.entity.layers;
|
|
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
import net.minecraft.client.model.EntityModel;
|
|
import net.minecraft.client.model.SkeletonModel;
|
|
import net.minecraft.client.model.geom.EntityModelSet;
|
|
import net.minecraft.client.model.geom.ModelLayerLocation;
|
|
import net.minecraft.client.renderer.SubmitNodeCollector;
|
|
import net.minecraft.client.renderer.entity.RenderLayerParent;
|
|
import net.minecraft.client.renderer.entity.layers.RenderLayer;
|
|
import net.minecraft.client.renderer.entity.state.SkeletonRenderState;
|
|
import net.minecraft.resources.Identifier;
|
|
|
|
public class SkeletonClothingLayer<S extends SkeletonRenderState, M extends EntityModel<S>>
|
|
extends RenderLayer<S, M> {
|
|
private final SkeletonModel<S> layerModel;
|
|
private final Identifier clothesLocation;
|
|
|
|
public SkeletonClothingLayer(RenderLayerParent<S, M> renderer, EntityModelSet models, ModelLayerLocation layerLocation, Identifier clothesLocation) {
|
|
super(renderer);
|
|
this.clothesLocation = clothesLocation;
|
|
this.layerModel = new SkeletonModel(models.bakeLayer(layerLocation));
|
|
}
|
|
|
|
@Override
|
|
public void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, S state, float yRot, float xRot) {
|
|
SkeletonClothingLayer.coloredCutoutModelCopyLayerRender(this.layerModel, this.clothesLocation, poseStack, submitNodeCollector, lightCoords, state, -1, 1);
|
|
}
|
|
}
|
|
|