SkeletonClothingLayer .java

net.minecraft.client.renderer.entity.layers.SkeletonClothingLayer (class, 34 lines): members: clothesLocation, layerLocation, layerModel, yRot, submit.

net.minecraft.client.renderer.entity.layersclass34 linesclientextends SkeletonRenderState1.5 KB

API Surface (1)

void submit(final PoseStack poseStack, final SubmitNodeCollector submitNodeCollector, final int lightCoords, final S state, final float yRot, final float xRot)

Fields & Constants (4)

layerModel
clothesLocation
layerLocation
yRot

Full Source

SkeletonClothingLayer.java34 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.entity.layers;
2
3
import com.mojang.blaze3d.vertex.PoseStack;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
import net.minecraft.client.model.EntityModel;
7
import net.minecraft.client.model.geom.EntityModelSet;
8
import net.minecraft.client.model.geom.ModelLayerLocation;
9
import net.minecraft.client.model.monster.skeleton.SkeletonModel;
10
import net.minecraft.client.renderer.SubmitNodeCollector;
11
import net.minecraft.client.renderer.entity.RenderLayerParent;
12
import net.minecraft.client.renderer.entity.state.SkeletonRenderState;
13
import net.minecraft.resources.Identifier;
14
15
@Environment(EnvType.CLIENT)
16
public class SkeletonClothingLayer<S extends SkeletonRenderState, M extends EntityModel<S>> extends RenderLayer<S, M> {
17
	private final SkeletonModel<S> layerModel;
18
	private final Identifier clothesLocation;
19
20
	public SkeletonClothingLayer(
21
		final RenderLayerParent<S, M> renderer, final EntityModelSet models, final ModelLayerLocation layerLocation, final Identifier clothesLocation
22
	) {
23
		super(renderer);
24
		this.clothesLocation = clothesLocation;
25
		this.layerModel = new SkeletonModel<>(models.bakeLayer(layerLocation));
26
	}
27
28
	public void submit(
29
		final PoseStack poseStack, final SubmitNodeCollector submitNodeCollector, final int lightCoords, final S state, final float yRot, final float xRot
30
	) {
31
		coloredCutoutModelCopyLayerRender(this.layerModel, this.clothesLocation, poseStack, submitNodeCollector, lightCoords, state, -1, 1);
32
	}
33
}
34

Decompiled Minecraft 26.3 source of SkeletonClothingLayer (net/minecraft/client/renderer/entity/layers/SkeletonClothingLayer.java) with Mojang official mappings, stored verbatim on the site.