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

37 lines
1.2 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.EntityModel;
import net.minecraft.client.model.RaftModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.renderer.entity.AbstractBoatRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.state.BoatRenderState;
import net.minecraft.client.renderer.rendertype.RenderType;
import net.minecraft.resources.Identifier;
public class RaftRenderer
extends AbstractBoatRenderer {
private final EntityModel<BoatRenderState> model;
private final Identifier texture;
public RaftRenderer(EntityRendererProvider.Context context, ModelLayerLocation modelId) {
super(context);
this.texture = modelId.model().withPath(p -> "textures/entity/" + p + ".png");
this.model = new RaftModel(context.bakeLayer(modelId));
}
@Override
protected EntityModel<BoatRenderState> model() {
return this.model;
}
@Override
protected RenderType renderType() {
return this.model.renderType(this.texture);
}
}