Skip to content

Commit

Permalink
Fix crash when NEI loads the recipes before the EC blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Oct 7, 2014
1 parent c9cd33e commit c97a8df
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/main/java/evilcraft/modcompat/nei/NEIBloodInfuserManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,18 @@ public void loadCraftingRecipes(ItemStack result) {

@Override
public void loadUsageRecipes(ItemStack ingredient) {
IRecipe<ItemAndFluidStackRecipeComponent, ItemStackRecipeComponent, DurationRecipeProperties> recipe = BloodInfuser
.getInstance().getRecipeRegistry().findRecipeByInput(
new ItemAndFluidStackRecipeComponent(
ingredient,
new FluidStack(TileBloodInfuser.ACCEPTED_FLUID, TileBloodInfuser.LIQUID_PER_SLOT))
);

if(recipe != null) {
arecipes.add(new CachedBloodInfuserRecipe(recipe));
}
if(TileBloodInfuser.ACCEPTED_FLUID != null) {
IRecipe<ItemAndFluidStackRecipeComponent, ItemStackRecipeComponent, DurationRecipeProperties> recipe = BloodInfuser
.getInstance().getRecipeRegistry().findRecipeByInput(
new ItemAndFluidStackRecipeComponent(
ingredient,
new FluidStack(TileBloodInfuser.ACCEPTED_FLUID, TileBloodInfuser.LIQUID_PER_SLOT))
);

if(recipe != null) {
arecipes.add(new CachedBloodInfuserRecipe(recipe));
}
}
}

@Override
Expand Down

0 comments on commit c97a8df

Please sign in to comment.