package net.minecraft.client.renderer.entity.layers; import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; 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.MultiBufferSource; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.state.SkeletonRenderState; import net.minecraft.resources.ResourceLocation; @Environment(EnvType.CLIENT) public class SkeletonClothingLayer> extends RenderLayer { private final SkeletonModel layerModel; private final ResourceLocation clothesLocation; public SkeletonClothingLayer(RenderLayerParent renderer, EntityModelSet models, ModelLayerLocation modelLayerLocation, ResourceLocation clothesLocation) { super(renderer); this.clothesLocation = clothesLocation; this.layerModel = new SkeletonModel<>(models.bakeLayer(modelLayerLocation)); } public void render(PoseStack poseStack, MultiBufferSource bufferSource, int packedLight, S renderState, float yRot, float xRot) { coloredCutoutModelCopyLayerRender(this.layerModel, this.clothesLocation, poseStack, bufferSource, packedLight, renderState, -1); } }