/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.google.common.collect.ImmutableMap */ package net.minecraft.client.model.geom; import com.google.common.collect.ImmutableMap; import java.util.Map; import net.minecraft.client.model.geom.LayerDefinitions; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.model.geom.ModelPart; import net.minecraft.client.model.geom.builders.LayerDefinition; public class EntityModelSet { public static final EntityModelSet EMPTY = new EntityModelSet(Map.of()); private final Map roots; public EntityModelSet(Map roots) { this.roots = roots; } public ModelPart bakeLayer(ModelLayerLocation id) { LayerDefinition result = this.roots.get(id); if (result == null) { throw new IllegalArgumentException("No model for layer " + String.valueOf(id)); } return result.bakeRoot(); } public static EntityModelSet vanilla() { return new EntityModelSet((Map)ImmutableMap.copyOf(LayerDefinitions.createRoots())); } }