Remove StorageDrawer compat.

The 1.11 implementation is not necessary for 1.12 as recipes have been refactored
This commit is contained in:
Tom Elfring committed 2017-07-26 19:41:36 +02:00
1 parent 69e163abd9
commit 0838f1121c
4 files changed
-73

No files matched your search

@@ -16,7 +16,6 @@ import mekanism.common.Resource;
import mekanism.common.block.states.BlockStateTransmitter.TransmitterType;
import mekanism.common.integration.computer.CCPeripheral;
import mekanism.common.integration.computer.OCDriver;
import mekanism.common.integration.storagedrawer.StorageDrawerRecipeHandler;
import mekanism.common.recipe.RecipeHandler;
import mekanism.common.util.MekanismUtils;
import net.minecraft.init.Items;
@@ -81,11 +80,6 @@ public final class MekanismHooks
{
//loadMettallurgy();
}
if(Loader.isModLoaded("storagedrawers"))
{
StorageDrawerRecipeHandler.register();
}
}
@Method(modid = "IC2")
@@ -1,55 +0,0 @@
package mekanism.common.integration.storagedrawer;
import com.jaquadro.minecraft.storagedrawers.api.IStorageDrawersApi;
import com.jaquadro.minecraft.storagedrawers.api.StorageDrawersApi;
import com.jaquadro.minecraft.storagedrawers.api.registry.IRecipeHandler;
import com.jaquadro.minecraft.storagedrawers.api.registry.IRecipeHandlerRegistry;
import mekanism.common.recipe.ShapedMekanismRecipe;
import mekanism.common.recipe.ShapelessMekanismRecipe;
import net.minecraft.item.crafting.IRecipe;
import java.util.List;
public class StorageDrawerRecipeHandler
{
private StorageDrawerRecipeHandler(){}
public static void register()
{
IStorageDrawersApi api = StorageDrawersApi.instance();
if(api == null)
{
return;
}
IRecipeHandlerRegistry recipeHandlerRegistry = api.recipeHandlerRegistry();
recipeHandlerRegistry.registerRecipeHandler(ShapedMekanismRecipe.class, new ShapedMekanismRecipeHandler());
recipeHandlerRegistry.registerRecipeHandler(ShapelessMekanismRecipe.class, new ShapelessMekanismRecipeHandler());
}
private static class ShapedMekanismRecipeHandler implements IRecipeHandler
{
@Override
public Object[] getInputAsArray (IRecipe recipe) {
return ((ShapedMekanismRecipe) recipe).getInput();
}
@Override
public List getInputAsList (IRecipe recipe) {
return null;
}
}
private static class ShapelessMekanismRecipeHandler implements IRecipeHandler
{
@Override
public Object[] getInputAsArray (IRecipe recipe) {
return null;
}
@Override
public List getInputAsList (IRecipe recipe) {
return ((ShapelessMekanismRecipe) recipe).getInput();
}
}
}