Skip to content

Commit

Permalink
Remove pointless (and incorrect) sponge presence check
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jan 20, 2017
1 parent 471b169 commit e0a76d7
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/main/java/nallar/tickprofiler/minecraft/CoreMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public class CoreMod implements IFMLLoadingPlugin {
ModPatcher.requireVersion("1.10.2.31");
}

private Boolean spongePresent;

@Override
public String[] getASMTransformerClass() {
return new String[0];
Expand All @@ -31,22 +29,9 @@ public String getSetupClass() {
return ModPatcher.getSetupClass();
}

private boolean isSpongePresent() {
if (spongePresent == null) {
try {
Class.forName("org.spongepowered.asm.mixin.MixinEnvironment", false, CoreMod.class.getClassLoader());
spongePresent = true;
} catch (ClassNotFoundException e) {
spongePresent = false;
}
}

return spongePresent;
}

@Override
public void injectData(Map<String, Object> data) {
Log.info("TickProfiler v@MOD_VERSION@ coremod loading. Sponge present: " + isSpongePresent());
Log.info("TickProfiler v@MOD_VERSION@ coremod injectData called, loading patches");

ModPatcher.loadPatches(CoreMod.class.getResourceAsStream("/entityhook.xml"));
// TODO: Not implemented
Expand Down

0 comments on commit e0a76d7

Please sign in to comment.