diff --git a/src/main/java/io/github/null2264/cobblegen/CobbleGen.java b/src/main/java/io/github/null2264/cobblegen/CobbleGen.java index 5dca1d87..8073d52c 100644 --- a/src/main/java/io/github/null2264/cobblegen/CobbleGen.java +++ b/src/main/java/io/github/null2264/cobblegen/CobbleGen.java @@ -32,7 +32,6 @@ public class CobbleGen implements net.fabricmc.api.ModInitializer private static final Path configPath = LoaderCompat.getConfigDir(); private static final File configFile = new File(configPath + File.separator + MOD_ID + "-meta.json5"); @ApiStatus.Internal - @Nullable public static ConfigMetaData META_CONFIG = loadConfig(false, configFile, null, new ConfigMetaData(), ConfigMetaData.class); //#if FABRIC>=1 @@ -44,4 +43,4 @@ public enum Channel { PING, SYNC, } -} +} \ No newline at end of file diff --git a/src/main/java/io/github/null2264/cobblegen/integration/viewer/emi/CGEMIPlugin.java b/src/main/java/io/github/null2264/cobblegen/integration/viewer/emi/CGEMIPlugin.java index dfbddcde..908cde3d 100644 --- a/src/main/java/io/github/null2264/cobblegen/integration/viewer/emi/CGEMIPlugin.java +++ b/src/main/java/io/github/null2264/cobblegen/integration/viewer/emi/CGEMIPlugin.java @@ -60,7 +60,10 @@ public class CGEMIPlugin implements EmiPlugin @Override public void register(EmiRegistry registry) { - if (Util.optional(CobbleGen.META_CONFIG).orElse(new ConfigMetaData()).mergeEMIRecipeCategory) { + if (!CobbleGen.META_CONFIG.enableRecipeViewer) + return; + + if (CobbleGen.META_CONFIG.mergeEMIRecipeCategory) { FLUID_INTERACTION_CATEGORIES.forEach((ignored, category) -> registry.addCategory(category)); FLUID_INTERACTION.getGenerators().forEach((fluid, generators) -> generators.forEach(generator -> generator.getOutput().forEach( (modifierId, blocks) -> { @@ -120,6 +123,8 @@ public void register(EmiRegistry registry) { recipe.output(EmiStack.of(Util.getBlock(resultId)), s -> { + if (!CobbleGen.META_CONFIG.emi.addTooltip) return s; + var minY = block.minY; if (minY == null) minY = minecraft.level != null ? minecraft.level.getMinBuildHeight() : 0;