minecraft-src/net/minecraft/client/resources/model/SpecialModels.java
2025-07-04 02:49:36 +03:00

27 lines
1.2 KiB
Java

package net.minecraft.client.resources.model;
import java.util.List;
import java.util.Map;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.renderer.block.model.BlockModel;
import net.minecraft.client.renderer.block.model.ItemTransforms;
import net.minecraft.resources.ResourceLocation;
@Environment(EnvType.CLIENT)
public class SpecialModels {
public static final ResourceLocation BUILTIN_GENERATED = builtinModelId("generated");
public static final ResourceLocation BUILTIN_BLOCK_ENTITY = builtinModelId("entity");
public static final UnbakedModel GENERATED_MARKER = createMarker("generation marker", BlockModel.GuiLight.FRONT);
public static final UnbakedModel BLOCK_ENTITY_MARKER = createMarker("block entity marker", BlockModel.GuiLight.SIDE);
public static ResourceLocation builtinModelId(String name) {
return ResourceLocation.withDefaultNamespace("builtin/" + name);
}
private static UnbakedModel createMarker(String name, BlockModel.GuiLight guiLight) {
BlockModel blockModel = new BlockModel(null, List.of(), Map.of(), null, guiLight, ItemTransforms.NO_TRANSFORMS, List.of());
blockModel.name = name;
return blockModel;
}
}