mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-18 11:39:07 +00:00
Smeltery fix and various others
This commit is contained in:
1 parent
570e4f8607
commit
25feee0162
101 files changed
+2292
-1019
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package modtweaker2.utils;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static modtweaker2.helpers.StackHelper.areEqual;
|
||||
|
||||
public class BaseCraftingRemoval extends BaseListRemoval {
|
||||
public BaseCraftingRemoval(String name, List list, ItemStack stack) {
|
||||
super(name, list, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
for (IRecipe r : (List<IRecipe>) list) {
|
||||
if (r.getRecipeOutput() != null && r.getRecipeOutput() instanceof ItemStack && areEqual(r.getRecipeOutput(), stack)) {
|
||||
recipe = r;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
list.remove(recipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeInfo() {
|
||||
return stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user