Skip to content

Commit

Permalink
Fix crash with JEI.
Browse files Browse the repository at this point in the history
  • Loading branch information
gigaherz committed Nov 14, 2016
1 parent 1fe7cfd commit 3716ac9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ repositories {

apply plugin: 'net.minecraftforge.gradle.forge'

version = "1.7.1"
version = "1.7.2"
group= "gigaherz.survivalist" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Survivalist-1.10.2"

minecraft {
version = "1.10.2-12.18.2.2114"
version = "1.10.2-12.18.2.2125"
runDir = "run"

mappings = "snapshot_20161029"
mappings = "snapshot_20161112"

replace "@VERSION@", project.version
replaceIn "Survivalist.java"
Expand Down Expand Up @@ -68,10 +68,10 @@ artifacts {
}

dependencies {
deobfCompile "gigaherz.commons:Commons:1.10.2-0.4.1"
deobfCompile "gigaherz.commons:Commons:1.10.2-0.4.2"

deobfCompile "mezz.jei:jei_1.10.2:3.12.3.293:api"
runtime "mezz.jei:jei_1.10.2:3.12.3.293"
deobfCompile "mezz.jei:jei_1.10.2:3.13.3.372:api"
runtime "mezz.jei:jei_1.10.2:3.13.3.372"

compile fileTree(dir: 'libs', include: '*.jar')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeWrapper;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;

import java.util.Collections;

public abstract class MixedRecipeWrapper extends BlankRecipeWrapper
{
Expand All @@ -26,7 +29,7 @@ protected MixedRecipeWrapper(ItemStack input, ItemStack output)
public void getIngredients(IIngredients ingredients)
{
if (inputOredict != null)
ingredients.setInput(String.class, inputOredict);
ingredients.setInputLists(ItemStack.class, Collections.singletonList(OreDictionary.getOres(inputOredict)));
if (inputStack != null)
ingredients.setInput(ItemStack.class, inputStack);
ingredients.setOutput(ItemStack.class, output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
import mezz.jei.api.gui.IGuiItemStackGroup;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeCategory;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class ChoppingCategory implements IRecipeCategory<ChoppingRecipeWrapper>
public class ChoppingCategory extends BlankRecipeCategory<ChoppingRecipeWrapper>
{
private static final ResourceLocation GUI_TEXTURE_LOCATION = Survivalist.location("textures/gui/conversion.png");
public static final String UID = Survivalist.MODID + "_chopping";
Expand Down Expand Up @@ -50,11 +52,6 @@ public IDrawable getBackground()
return background;
}

@Override
public void drawExtras(@Nonnull Minecraft mc)
{
}

@Override
public void drawAnimations(@Nonnull Minecraft minecraft)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
import mezz.jei.api.gui.IGuiItemStackGroup;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeCategory;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;

import javax.annotation.Nonnull;

public class DryingCategory implements IRecipeCategory<DryingRecipeWrapper>
public class DryingCategory extends BlankRecipeCategory<DryingRecipeWrapper>
{
private static final ResourceLocation GUI_TEXTURE_LOCATION = Survivalist.location("textures/gui/conversion.png");
public static final String UID = Survivalist.MODID + "_drying";
Expand Down Expand Up @@ -50,11 +51,6 @@ public IDrawable getBackground()
return background;
}

@Override
public void drawExtras(@Nonnull Minecraft mc)
{
}

@Override
public void drawAnimations(@Nonnull Minecraft minecraft)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static List<DryingRecipeWrapper> getRecipes()
return list;
}

int time;
private int time;

private DryingRecipeWrapper(String input, ItemStack output, int time)
{
Expand Down

0 comments on commit 3716ac9

Please sign in to comment.