/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.mojang.serialization.Codec * com.mojang.serialization.MapCodec */ package net.minecraft.client.renderer.item; import com.mojang.serialization.Codec; import com.mojang.serialization.MapCodec; import net.minecraft.client.renderer.item.BlockModelWrapper; import net.minecraft.client.renderer.item.BundleSelectedItemSpecialRenderer; import net.minecraft.client.renderer.item.CompositeModel; import net.minecraft.client.renderer.item.ConditionalItemModel; import net.minecraft.client.renderer.item.EmptyModel; import net.minecraft.client.renderer.item.ItemModel; import net.minecraft.client.renderer.item.RangeSelectItemModel; import net.minecraft.client.renderer.item.SelectItemModel; import net.minecraft.client.renderer.item.SpecialModelWrapper; import net.minecraft.resources.Identifier; import net.minecraft.util.ExtraCodecs; public class ItemModels { private static final ExtraCodecs.LateBoundIdMapper> ID_MAPPER = new ExtraCodecs.LateBoundIdMapper(); public static final Codec CODEC = ID_MAPPER.codec(Identifier.CODEC).dispatch(ItemModel.Unbaked::type, c -> c); public static void bootstrap() { ID_MAPPER.put(Identifier.withDefaultNamespace("empty"), EmptyModel.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("model"), BlockModelWrapper.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("range_dispatch"), RangeSelectItemModel.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("special"), SpecialModelWrapper.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("composite"), CompositeModel.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("bundle/selected_item"), BundleSelectedItemSpecialRenderer.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("select"), SelectItemModel.Unbaked.MAP_CODEC); ID_MAPPER.put(Identifier.withDefaultNamespace("condition"), ConditionalItemModel.Unbaked.MAP_CODEC); } }