Converted NEI support to scala

This commit is contained in:
Robert S 2014-09-29 15:52:42 -04:00
parent dafe713123
commit 0e0a08629a
12 changed files with 121 additions and 154 deletions

View file

@ -1,54 +0,0 @@
package resonantinduction.compatibility.nei;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import resonant.engine.ResonantEngine;
import resonantinduction.core.CoreContent;
import resonantinduction.core.ResonantInduction;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
public class NEIResonantInductionConfig implements IConfigureNEI
{
@Override
public void loadConfig()
{
API.registerRecipeHandler(new RIGrinderRecipeHandler());
API.registerUsageHandler(new RIGrinderRecipeHandler());
API.registerRecipeHandler(new RICrusherRecipeHandler());
API.registerUsageHandler(new RICrusherRecipeHandler());
API.registerRecipeHandler(new RIMixerRecipeHandler());
API.registerUsageHandler(new RIMixerRecipeHandler());
API.registerRecipeHandler(new RISawmillRecipeHandler());
API.registerUsageHandler(new RISawmillRecipeHandler());
API.registerRecipeHandler(new RISmelterRecipeHandler());
API.registerUsageHandler(new RISmelterRecipeHandler());
for (Block block : ResonantEngine.resourceFactory.mixtureFactory.blockMixtureFluids.values())
API.hideItem(new ItemStack(block));
for (Block block : ResonantEngine.resourceFactory.moltenFactory.blockMoltenFluids.values())
API.hideItem(new ItemStack(block));
//API.hideItem(new ItemStack(CoreContent.blockDust()));
//API.hideItem(new ItemStack(CoreContent.blockRefinedDust()));
}
@Override
public String getName()
{
return "Resonant Induction Plugin";
}
@Override
public String getVersion()
{
return "1.0";
}
}

View file

@ -0,0 +1,36 @@
package resonantinduction.compatibility.nei
import codechicken.nei.api.{API, IConfigureNEI}
import net.minecraft.item.ItemStack
import resonant.engine.ResonantEngine
class NEIResonantInductionConfig extends IConfigureNEI
{
def loadConfig
{
API.registerRecipeHandler(new RIGrinderRecipeHandler)
API.registerUsageHandler(new RIGrinderRecipeHandler)
API.registerRecipeHandler(new RICrusherRecipeHandler)
API.registerUsageHandler(new RICrusherRecipeHandler)
API.registerRecipeHandler(new RIMixerRecipeHandler)
API.registerUsageHandler(new RIMixerRecipeHandler)
API.registerRecipeHandler(new RISawmillRecipeHandler)
API.registerUsageHandler(new RISawmillRecipeHandler)
API.registerRecipeHandler(new RISmelterRecipeHandler)
API.registerUsageHandler(new RISmelterRecipeHandler)
import scala.collection.JavaConversions._
for (block <- ResonantEngine.resourceFactory.mixtureFactory.blockMixtureFluids.values) API.hideItem(new ItemStack(block))
import scala.collection.JavaConversions._
for (block <- ResonantEngine.resourceFactory.moltenFactory.blockMoltenFluids.values) API.hideItem(new ItemStack(block))
}
def getName: String =
{
return "Resonant Induction Plugin"
}
def getVersion: String =
{
return "1.0"
}
}

View file

@ -1,20 +0,0 @@
package resonantinduction.compatibility.nei;
import resonant.lib.utility.LanguageUtility;
import resonant.content.factory.resources.RecipeType;
public class RICrusherRecipeHandler extends RITemplateRecipeHandler
{
@Override
public String getRecipeName()
{
return LanguageUtility.getLocal("resonantinduction.machine.crusher");
}
@Override
public RecipeType getMachine()
{
return RecipeType.CRUSHER;
}
}

View file

@ -0,0 +1,17 @@
package resonantinduction.compatibility.nei
import resonant.lib.utility.LanguageUtility
import resonant.content.factory.resources.RecipeType
class RICrusherRecipeHandler extends RITemplateRecipeHandler
{
def getRecipeName: String =
{
return LanguageUtility.getLocal("resonantinduction.machine.crusher")
}
def getMachine: RecipeType =
{
return RecipeType.CRUSHER
}
}

View file

@ -1,20 +0,0 @@
package resonantinduction.compatibility.nei;
import resonant.lib.utility.LanguageUtility;
import resonant.content.factory.resources.RecipeType;
public class RIGrinderRecipeHandler extends RITemplateRecipeHandler
{
@Override
public String getRecipeName()
{
return LanguageUtility.getLocal("resonantinduction.machine.grinder");
}
@Override
public RecipeType getMachine()
{
return RecipeType.GRINDER;
}
}

View file

@ -0,0 +1,17 @@
package resonantinduction.compatibility.nei
import resonant.lib.utility.LanguageUtility
import resonant.content.factory.resources.RecipeType
class RIGrinderRecipeHandler extends RITemplateRecipeHandler
{
def getRecipeName: String =
{
return LanguageUtility.getLocal("resonantinduction.machine.grinder")
}
def getMachine: RecipeType =
{
return RecipeType.GRINDER
}
}

View file

@ -1,20 +0,0 @@
package resonantinduction.compatibility.nei;
import resonant.lib.utility.LanguageUtility;
import resonant.content.factory.resources.RecipeType;
public class RIMixerRecipeHandler extends RITemplateRecipeHandler
{
@Override
public String getRecipeName()
{
return LanguageUtility.getLocal("resonantinduction.machine.mixer");
}
@Override
public RecipeType getMachine()
{
return RecipeType.MIXER;
}
}

View file

@ -0,0 +1,17 @@
package resonantinduction.compatibility.nei
import resonant.lib.utility.LanguageUtility
import resonant.content.factory.resources.RecipeType
class RIMixerRecipeHandler extends RITemplateRecipeHandler
{
def getRecipeName: String =
{
return LanguageUtility.getLocal("resonantinduction.machine.mixer")
}
def getMachine: RecipeType =
{
return RecipeType.MIXER
}
}

View file

@ -1,20 +0,0 @@
package resonantinduction.compatibility.nei;
import resonant.lib.utility.LanguageUtility;
import resonant.content.factory.resources.RecipeType;
public class RISawmillRecipeHandler extends RITemplateRecipeHandler
{
@Override
public String getRecipeName()
{
return LanguageUtility.getLocal("resonantinduction.machine.sawmill");
}
@Override
public RecipeType getMachine()
{
return RecipeType.SAWMILL;
}
}

View file

@ -0,0 +1,17 @@
package resonantinduction.compatibility.nei
import resonant.lib.utility.LanguageUtility
import resonant.content.factory.resources.RecipeType
class RISawmillRecipeHandler extends RITemplateRecipeHandler
{
def getRecipeName: String =
{
return LanguageUtility.getLocal("resonantinduction.machine.sawmill")
}
def getMachine: RecipeType =
{
return RecipeType.SAWMILL
}
}

View file

@ -1,20 +0,0 @@
package resonantinduction.compatibility.nei;
import resonant.lib.utility.LanguageUtility;
import resonant.content.factory.resources.RecipeType;
public class RISmelterRecipeHandler extends RITemplateRecipeHandler
{
@Override
public String getRecipeName()
{
return LanguageUtility.getLocal("resonantinduction.machine.smelter");
}
@Override
public RecipeType getMachine()
{
return RecipeType.SMELTER;
}
}

View file

@ -0,0 +1,17 @@
package resonantinduction.compatibility.nei
import resonant.lib.utility.LanguageUtility
import resonant.content.factory.resources.RecipeType
class RISmelterRecipeHandler extends RITemplateRecipeHandler
{
def getRecipeName: String =
{
return LanguageUtility.getLocal("resonantinduction.machine.smelter")
}
def getMachine: RecipeType =
{
return RecipeType.SMELTER
}
}