mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-26 15:13:05 +00:00
Reworked BaseListRemoval
- Fixed various crashes if no recipes are removed and the undo method is called (e.g. on /mt reload), adding a null object. - Added option to remove more than 1 recipe with BaseListRemoval - Cleanup of some classes which are extending BaseListRemoval
This commit is contained in:
1 parent
8efaa6c92c
commit
de099e4798
40 files changed
+197
-265
No files matched your search
@@ -63,15 +63,12 @@ public class Inscriber {
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
ArrayList<IInscriberRecipe> recipesToRemove = new ArrayList<IInscriberRecipe>();
|
||||
for (IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes()) {
|
||||
if (recipe != null && recipe.getOutput() != null && recipe.getOutput().isItemEqual(stack)) {
|
||||
recipesToRemove.add(recipe);
|
||||
recipes.add(recipe);
|
||||
}
|
||||
}
|
||||
for (IInscriberRecipe recipe : recipesToRemove) {
|
||||
AEApi.instance().registries().inscriber().removeRecipe(recipe);
|
||||
}
|
||||
super.apply();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user