package net.minecraft.client.model; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; import java.util.function.Function; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.renderer.RenderType; import net.minecraft.resources.ResourceLocation; @Environment(EnvType.CLIENT) public abstract class Model { protected final Function renderType; public Model(Function renderType) { this.renderType = renderType; } public final RenderType renderType(ResourceLocation location) { return (RenderType)this.renderType.apply(location); } public abstract void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, int color); public final void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay) { this.renderToBuffer(poseStack, vertexConsumer, packedLight, packedOverlay, -1); } }