2025-11-24 22:52:51 +03:00

43 lines
1.7 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.model.LeashKnotModel;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.SubmitNodeCollector;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.state.EntityRenderState;
import net.minecraft.client.renderer.state.CameraRenderState;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.decoration.LeashFenceKnotEntity;
public class LeashKnotRenderer
extends EntityRenderer<LeashFenceKnotEntity, EntityRenderState> {
private static final Identifier KNOT_LOCATION = Identifier.withDefaultNamespace("textures/entity/lead_knot.png");
private final LeashKnotModel model;
public LeashKnotRenderer(EntityRendererProvider.Context context) {
super(context);
this.model = new LeashKnotModel(context.bakeLayer(ModelLayers.LEASH_KNOT));
}
@Override
public void submit(EntityRenderState state, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, CameraRenderState camera) {
poseStack.pushPose();
poseStack.scale(-1.0f, -1.0f, 1.0f);
submitNodeCollector.submitModel(this.model, state, poseStack, this.model.renderType(KNOT_LOCATION), state.lightCoords, OverlayTexture.NO_OVERLAY, state.outlineColor, null);
poseStack.popPose();
super.submit(state, poseStack, submitNodeCollector, camera);
}
@Override
public EntityRenderState createRenderState() {
return new EntityRenderState();
}
}