/* * 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.SheepFurModel; import net.minecraft.client.model.SheepModel; import net.minecraft.client.model.geom.EntityModelSet; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.renderer.SubmitNodeCollector; import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.layers.RenderLayer; import net.minecraft.client.renderer.entity.state.SheepRenderState; import net.minecraft.client.renderer.rendertype.RenderTypes; import net.minecraft.resources.Identifier; public class SheepWoolLayer extends RenderLayer { private static final Identifier SHEEP_WOOL_LOCATION = Identifier.withDefaultNamespace("textures/entity/sheep/sheep_wool.png"); private final EntityModel adultModel; private final EntityModel babyModel; public SheepWoolLayer(RenderLayerParent renderer, EntityModelSet modelSet) { super(renderer); this.adultModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_WOOL)); this.babyModel = new SheepFurModel(modelSet.bakeLayer(ModelLayers.SHEEP_BABY_WOOL)); } @Override public void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, SheepRenderState state, float yRot, float xRot) { EntityModel model; if (state.isSheared) { return; } EntityModel entityModel = model = state.isBaby ? this.babyModel : this.adultModel; if (state.isInvisible) { if (state.appearsGlowing()) { submitNodeCollector.submitModel(model, state, poseStack, RenderTypes.outline(SHEEP_WOOL_LOCATION), lightCoords, LivingEntityRenderer.getOverlayCoords(state, 0.0f), -16777216, null, state.outlineColor, null); } return; } SheepWoolLayer.coloredCutoutModelCopyLayerRender(model, SHEEP_WOOL_LOCATION, poseStack, submitNodeCollector, lightCoords, state, state.getWoolColor(), 0); } }