/* * Decompiled with CFR 0.152. * * Could not load the following classes: * org.jspecify.annotations.Nullable */ package net.minecraft.client.renderer.block.model; import java.util.List; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BlockModelPart; import net.minecraft.client.renderer.block.model.TextureSlots; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.resources.model.ModelBaker; import net.minecraft.client.resources.model.ModelState; import net.minecraft.client.resources.model.QuadCollection; import net.minecraft.client.resources.model.ResolvedModel; import net.minecraft.core.Direction; import net.minecraft.resources.Identifier; import org.jspecify.annotations.Nullable; public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) implements BlockModelPart { public static SimpleModelWrapper bake(ModelBaker modelBakery, Identifier location, ModelState state) { ResolvedModel model = modelBakery.getModel(location); TextureSlots textureSlots = model.getTopTextureSlots(); boolean hasAmbientOcclusion = model.getTopAmbientOcclusion(); TextureAtlasSprite particleSprite = model.resolveParticleSprite(textureSlots, modelBakery); QuadCollection geometry = model.bakeTopGeometry(textureSlots, modelBakery, state); return new SimpleModelWrapper(geometry, hasAmbientOcclusion, particleSprite); } @Override public List getQuads(@Nullable Direction direction) { return this.quads.getQuads(direction); } }