/* * Decompiled with CFR 0.152. */ package net.minecraft.client.renderer; import com.mojang.blaze3d.vertex.PoseStack; import java.util.Map; import net.minecraft.client.renderer.SubmitNodeCollector; import net.minecraft.client.renderer.special.SpecialModelRenderer; import net.minecraft.client.renderer.special.SpecialModelRenderers; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.level.block.Block; public class SpecialBlockModelRenderer { public static final SpecialBlockModelRenderer EMPTY = new SpecialBlockModelRenderer(Map.of()); private final Map> renderers; public SpecialBlockModelRenderer(Map> renderers) { this.renderers = renderers; } public static SpecialBlockModelRenderer vanilla(SpecialModelRenderer.BakingContext context) { return new SpecialBlockModelRenderer(SpecialModelRenderers.createBlockRenderers(context)); } public void renderByBlock(Block block, ItemDisplayContext type, PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, int overlayCoords, int outlineColor) { SpecialModelRenderer specialRenderer = this.renderers.get(block); if (specialRenderer != null) { specialRenderer.submit(null, type, poseStack, submitNodeCollector, lightCoords, overlayCoords, false, outlineColor); } } }