Skip to content

Commit

Permalink
idiot protection
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed May 15, 2024
1 parent 1dccc0d commit e0d50fc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/falsepattern/falsetweaks/FalseTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
package com.falsepattern.falsetweaks;

import com.falsepattern.falsetweaks.proxy.CommonProxy;
import lombok.val;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLConstructionEvent;
Expand Down Expand Up @@ -54,9 +56,23 @@ public void construct(FMLConstructionEvent e) {
proxy.construct(e);
}

private static Error idiot(String modname) {
val loudWarning = new StringBuilder();
for (int i = 0; i < 100; i++) {
loudWarning.append("REMOVE ").append(modname).append(" FROM YOUR MODS DIRECTORY, IT HAS BEEN MERGED INTO FALSETWEAKS\n");
}
return new Error(loudWarning.toString());
}

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent e) {
proxy.preInit(e);
if (Loader.isModLoaded("animfix")) {
throw idiot("animfix");
}
if (Loader.isModLoaded("triangulator")) {
throw idiot("triangulator");
}
}

@Mod.EventHandler
Expand Down

1 comment on commit e0d50fc

@FalsePattern
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.