Fixed scrapbox list of outputs. Closes #1317. I hope )

This commit is contained in:
drcrazy 2017-10-24 15:09:53 +03:00
parent 57151a6f67
commit 440c089b5f
2 changed files with 4 additions and 1 deletions

View file

@ -56,6 +56,7 @@ public class CTScrapbox {
@ZenMethod @ZenMethod
public static void removeRecipe(IItemStack output) { public static void removeRecipe(IItemStack output) {
ScrapboxList.stacks.remove(output);
CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName())); CraftTweakerAPI.apply(new Remove(CraftTweakerCompat.toStack(output), getMachineName()));
} }
@ -78,6 +79,7 @@ public class CTScrapbox {
@Override @Override
public void apply() { public void apply() {
ScrapboxList.stacks.clear();
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) { for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) {
removedRecipes.add((BaseRecipe) recipeType); removedRecipes.add((BaseRecipe) recipeType);
RecipeHandler.recipeList.remove(recipeType); RecipeHandler.recipeList.remove(recipeType);

View file

@ -126,7 +126,8 @@ public class TileScrapboxinator extends TilePowerAcceptor
} }
public boolean canOpen() { public boolean canOpen() {
return this.getStackInSlot(this.input1) != ItemStack.EMPTY && this.getStackInSlot(this.output) == ItemStack.EMPTY; return !this.getStackInSlot(this.input1).isEmpty() && this.getStackInSlot(this.output).isEmpty()
&& ScrapboxList.stacks.size() > 0;
} }
public boolean isBurning() { public boolean isBurning() {