ReFramed/src/main/java/io/github/cottonmc/templates/TemplatesClient.java

23 lines
1021 B
Java
Raw Normal View History

2019-06-20 00:29:15 +02:00
package io.github.cottonmc.templates;
import io.github.cottonmc.templates.block.SlopeBlock;
2023-06-15 10:24:11 +02:00
import io.github.cottonmc.templates.model.SlopeUnbakedModel;
import io.github.cottonmc.templates.model.TemplateModelVariantProvider;
2019-06-20 00:29:15 +02:00
import net.fabricmc.api.ClientModInitializer;
2023-06-15 10:24:11 +02:00
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
2019-06-20 00:29:15 +02:00
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
2023-06-15 10:24:11 +02:00
import net.minecraft.client.render.RenderLayer;
2019-06-20 00:29:15 +02:00
import net.minecraft.util.math.Direction;
public class TemplatesClient implements ClientModInitializer {
public static TemplateModelVariantProvider provider = new TemplateModelVariantProvider();
2023-06-15 07:59:48 +02:00
2019-06-20 00:29:15 +02:00
@Override
public void onInitializeClient() {
2023-06-15 07:59:48 +02:00
ModelLoadingRegistry.INSTANCE.registerVariantProvider(rm -> provider);
2023-06-15 10:24:11 +02:00
provider.registerTemplateModels2(Templates.SLOPE, Templates.SLOPE.getDefaultState().with(SlopeBlock.FACING, Direction.SOUTH), SlopeUnbakedModel::new);
BlockRenderLayerMap.INSTANCE.putBlock(Templates.SLOPE, RenderLayer.getCutout());
2019-06-20 00:29:15 +02:00
}
}