Skip to content

Commit

Permalink
Fixed classloading issue that caused the game to not find BiomeVoid
Browse files Browse the repository at this point in the history
(My fault. My bad.)
  • Loading branch information
ZombieHDGaming committed Apr 25, 2019
1 parent 0d3bb68 commit c87fb63
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/main/java/org/dimdev/jeid/JEID.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.registries.IForgeRegistry;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dimdev.jeid.network.MessageManager;

import java.util.Random;
Expand All @@ -37,7 +35,6 @@ public class JEID {
public static final Biome errorBiome = new BiomeVoid(new Biome.BiomeProperties("A mod doesn't support extended biome IDs -- report to JEID"))
.setRegistryName("jeid:error_biome");

public static Logger LOGGER = LogManager.getLogger("JustEnoughIDs");

@Mod.EventHandler
public void onPreInit(FMLPreInitializationEvent event) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/dimdev/jeid/JEIDLoadingPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

@IFMLLoadingPlugin.MCVersion(ForgeVersion.mcVersion)
@IFMLLoadingPlugin.SortingIndex(-7500)
@IFMLLoadingPlugin.Name("JustEnoughIDs Extension Plugin")
//@IFMLLoadingPlugin.TransformerExclusions("org.dimdev.jeid.")
public class JEIDLoadingPlugin implements IFMLLoadingPlugin {

public JEIDLoadingPlugin() {
MixinBootstrap.init();
JEID.LOGGER.info("Initializing JustEnoughIDs core mixins");
Utils.LOGGER.info("Initializing JustEnoughIDs core mixins");
Mixins.addConfiguration("mixins.jeid.core.json");
JEID.LOGGER.info("Initializing JustEnoughIDs initialization mixins");
Utils.LOGGER.info("Initializing JustEnoughIDs initialization mixins");
Mixins.addConfiguration("mixins.jeid.init.json");
}

Expand Down
13 changes: 13 additions & 0 deletions src/main/java/org/dimdev/jeid/Utils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.dimdev.jeid;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Utils {
/**
* I Know this looks stupid and it's a single class for a logger, but deal with
* it you nerds.
* - Zombie
*/
public static Logger LOGGER = LogManager.getLogger("JustEnoughIDs");
}
2 changes: 0 additions & 2 deletions src/main/java/org/dimdev/jeid/mixin/init/MixinLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModClassLoader;
import net.minecraftforge.fml.common.ModContainer;
import org.dimdev.jeid.JEID;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.MixinEnvironment;
import org.spongepowered.asm.mixin.Mixins;
Expand Down Expand Up @@ -41,7 +40,6 @@ private void beforeConstructingMods(List<String> injectedModContainers, Callback
}

// Add and reload mixin configs
JEID.LOGGER.info("Initializing JustEnoughIDs modsupport mixins");
Mixins.addConfiguration("mixins.jeid.modsupport.json");
Mixins.addConfiguration("mixins.jeid.twilightforest.json");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
import org.dimdev.jeid.JEID;
import org.dimdev.jeid.Utils;
import org.spongepowered.asm.lib.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
Expand All @@ -11,6 +11,7 @@
import java.util.Set;

public class TwilightMixinPlugin implements IMixinConfigPlugin {

@Override
public void onLoad(String s) {}

Expand All @@ -23,14 +24,14 @@ public boolean shouldApplyMixin(String s, String s1) {
if (mod.getModId().equals("twilightforest")) {
if (s1.equals("org.dimdev.jeid.mixin.modsupport.twilightforest.MixinBlockTFMagicLogSpecial_Old")) {
if (Integer.parseInt(mod.getVersion().split("[.]")[2]) < 689) {
JEID.LOGGER.info("Older TwilightForest version (<689). Using mixin: " + s1);
Utils.LOGGER.info("Older TwilightForest version (<689). Using mixin: " + s1);
return true;
} else {
return false;
}
} else if (s1.equals("org.dimdev.jeid.mixin.modsupport.twilightforest.MixinBlockTFMagicLogSpecial")) {
if (Integer.parseInt(mod.getVersion().split("[.]")[2]) > 689) {
JEID.LOGGER.info("Newer TwilightForest version (>689). Using mixin: " + s1);
Utils.LOGGER.info("Newer TwilightForest version (>689). Using mixin: " + s1);
return true;
} else {
return false;
Expand Down

0 comments on commit c87fb63

Please sign in to comment.