From 0063532e037937a2d385dfc96de6923c213480f8 Mon Sep 17 00:00:00 2001 From: Meredith Espinosa Date: Wed, 19 Jun 2019 23:40:56 -0700 Subject: [PATCH] oh right check fabric.mod.json for environments too --- build.gradle | 2 +- src/main/java/io/github/cottonmc/templates/Templates.java | 3 --- .../java/io/github/cottonmc/templates/TemplatesClient.java | 6 ++++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 59c7231..e53fb14 100755 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/src/main/java/io/github/cottonmc/templates/Templates.java b/src/main/java/io/github/cottonmc/templates/Templates.java index e3343cb..fa613ee 100644 --- a/src/main/java/io/github/cottonmc/templates/Templates.java +++ b/src/main/java/io/github/cottonmc/templates/Templates.java @@ -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") diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java index 5d5edeb..70e26f5 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java +++ b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java @@ -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); } }