close #348
This commit is contained in:
parent
b548e77eac
commit
4ebb12efe6
3 changed files with 31 additions and 9 deletions
|
@ -25,7 +25,7 @@ public abstract class ForestryListAddition<T extends IForestryRecipe, C extends
|
||||||
protected abstract String getRecipeInfo(T recipe);
|
protected abstract String getRecipeInfo(T recipe);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void apply() {
|
public void apply() {
|
||||||
for (T recipe : recipes) {
|
for (T recipe : recipes) {
|
||||||
if (recipe != null) {
|
if (recipe != null) {
|
||||||
if (craftingProvider.addRecipe(recipe)) {
|
if (craftingProvider.addRecipe(recipe)) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public abstract class ForestryListRemoval<T extends IForestryRecipe, C extends I
|
||||||
protected abstract String getRecipeInfo(T recipe);
|
protected abstract String getRecipeInfo(T recipe);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void apply() {
|
public void apply() {
|
||||||
for (T recipe : recipes) {
|
for (T recipe : recipes) {
|
||||||
if (recipe != null) {
|
if (recipe != null) {
|
||||||
if (craftingProvider.removeRecipe(recipe)) {
|
if (craftingProvider.removeRecipe(recipe)) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import forestry.api.recipes.ICarpenterManager;
|
||||||
import forestry.api.recipes.ICarpenterRecipe;
|
import forestry.api.recipes.ICarpenterRecipe;
|
||||||
import forestry.api.recipes.IDescriptiveRecipe;
|
import forestry.api.recipes.IDescriptiveRecipe;
|
||||||
import forestry.api.recipes.RecipeManagers;
|
import forestry.api.recipes.RecipeManagers;
|
||||||
|
import forestry.factory.recipes.CarpenterRecipeManager;
|
||||||
import minetweaker.MineTweakerAPI;
|
import minetweaker.MineTweakerAPI;
|
||||||
import minetweaker.api.item.IIngredient;
|
import minetweaker.api.item.IIngredient;
|
||||||
import minetweaker.api.item.IItemStack;
|
import minetweaker.api.item.IItemStack;
|
||||||
|
@ -69,6 +70,17 @@ public class Carpenter {
|
||||||
recipes.add(recipe);
|
recipes.add(recipe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void apply() {
|
||||||
|
super.apply();
|
||||||
|
successful.forEach(ent -> {
|
||||||
|
if (!CarpenterRecipeManager.getRecipeFluids().contains(ent.getFluidResource().getFluid())) {
|
||||||
|
CarpenterRecipeManager.getRecipeFluids().add(ent.getFluidResource().getFluid());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getRecipeInfo(ICarpenterRecipe recipe) {
|
protected String getRecipeInfo(ICarpenterRecipe recipe) {
|
||||||
return LogHelper.getStackDescription(recipe.getCraftingGridRecipe().getRecipeOutput());
|
return LogHelper.getStackDescription(recipe.getCraftingGridRecipe().getRecipeOutput());
|
||||||
|
@ -126,6 +138,16 @@ public class Carpenter {
|
||||||
super(Carpenter.name, RecipeManagers.carpenterManager, recipes);
|
super(Carpenter.name, RecipeManagers.carpenterManager, recipes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void apply() {
|
||||||
|
super.apply();
|
||||||
|
successful.forEach(ent -> {
|
||||||
|
if (CarpenterRecipeManager.getRecipeFluids().contains(ent.getFluidResource().getFluid())) {
|
||||||
|
CarpenterRecipeManager.getRecipeFluids().remove(ent.getFluidResource().getFluid());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getRecipeInfo(ICarpenterRecipe recipe) {
|
protected String getRecipeInfo(ICarpenterRecipe recipe) {
|
||||||
return LogHelper.getStackDescription(recipe.getCraftingGridRecipe().getRecipeOutput());
|
return LogHelper.getStackDescription(recipe.getCraftingGridRecipe().getRecipeOutput());
|
||||||
|
|
Loading…
Reference in a new issue