oh right check fabric.mod.json for environments too

This commit is contained in:
Meredith Espinosa 2019-06-19 23:40:56 -07:00
parent b53bf856e6
commit 0063532e03
3 changed files with 5 additions and 6 deletions

View File

@ -30,7 +30,7 @@ if(rootProject.file('private.gradle').exists()) { //Publishing details
archivesBaseName = "templates"
group = "io.github.cottonmc"
version = "1.0.1+1.14.2"
version = "1.0.2+1.14.2"
minecraft {
refmapName = 'mixins.templates.refmap.json'

View File

@ -2,7 +2,6 @@ package io.github.cottonmc.templates;
import io.github.cottonmc.templates.block.SlopeBlock;
import io.github.cottonmc.templates.block.entity.SlopeEntity;
import io.github.cottonmc.templates.model.TemplateModelVariantProvider;
import net.fabricmc.api.ModInitializer;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntity;
@ -14,8 +13,6 @@ import java.util.function.Supplier;
public class Templates implements ModInitializer {
public static final String MODID = "templates";
//define/create here so that it always exists when called in a client initializer, regardless of load order
public static TemplateModelVariantProvider provider = new TemplateModelVariantProvider();
public static final Block SLOPE = register("slope", new SlopeBlock(), ItemGroup.DECORATIONS);
@SuppressWarnings("unchecked")

View File

@ -2,14 +2,16 @@ package io.github.cottonmc.templates;
import io.github.cottonmc.templates.block.SlopeBlock;
import io.github.cottonmc.templates.model.SlopeModel;
import io.github.cottonmc.templates.model.TemplateModelVariantProvider;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry;
import net.minecraft.util.math.Direction;
public class TemplatesClient implements ClientModInitializer {
public static TemplateModelVariantProvider provider = new TemplateModelVariantProvider();
@Override
public void onInitializeClient() {
ModelLoadingRegistry.INSTANCE.registerVariantProvider(rm -> Templates.provider);
Templates.provider.registerTemplateModels(Templates.SLOPE, Templates.SLOPE.getDefaultState().with(SlopeBlock.FACING, Direction.SOUTH), SlopeModel::new);
ModelLoadingRegistry.INSTANCE.registerVariantProvider(rm -> provider);
provider.registerTemplateModels(Templates.SLOPE, Templates.SLOPE.getDefaultState().with(SlopeBlock.FACING, Direction.SOUTH), SlopeModel::new);
}
}