Skip to content
Permalink
Browse files

Disable food tweaks when AppleCore is installed. TODO: Add mod compat

  • Loading branch information...
CplPibald committed Mar 18, 2019
1 parent 23dad71 commit 9a24c814c2aba6d97bdc4a24463beea3ea2562c5
@@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "1.12-1.1.0"
version = "1.12-1.1.1"
group = "us.bemrose.mc.pitweaks" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "PiTweaks"

@@ -9,6 +9,16 @@

@Override
public void init(net.minecraftforge.fml.common.event.FMLInitializationEvent event) {

// Disable this tweak if AppleCore is loaded, because it overloads foodstats
// TODO: Use AppleCore API when loaded.
if (net.minecraftforge.fml.common.Loader.isModLoaded("applecore")) {
if (TweakConfig.player.uncapFood || TweakConfig.player.uncapSaturation) {
PiTweaks.LOGGER.warn("AppleCore detected. Disabling food uncapper tweak.");
}
return;
}

// Register block place event
net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(this);
}
@@ -10,11 +10,15 @@
public static final String MODID = "pitweaks";
public static final String VERSION = "BUILD_VERSION";

static org.apache.logging.log4j.Logger LOGGER = null;

java.util.List<Tweak> loadedTweaks;

@net.minecraftforge.fml.common.Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {

LOGGER = event.getModLog();

Configuration config = new Configuration(event.getSuggestedConfigurationFile());
loadedTweaks = getTweakList(config);

0 comments on commit 9a24c81

Please sign in to comment.
You can’t perform that action at this time.