Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Recipes from JEI #212

Draft
wants to merge 47 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6c9a697
extract ReloadKey to separate file
WaitingIdly Jul 25, 2024
801c881
add some jei accessors
WaitingIdly Jul 25, 2024
f50fc56
add IJEIRemoval interface
WaitingIdly Jul 25, 2024
1eca5cb
add class to remove target
WaitingIdly Jul 25, 2024
e375d0b
add keybind to target
WaitingIdly Jul 25, 2024
492d5f9
allow multiple categories
WaitingIdly Jul 25, 2024
689a189
note a failure to find a recipe
WaitingIdly Jul 25, 2024
7ec0c81
use cached loaded
WaitingIdly Jul 25, 2024
3576436
add asGroovyCode resource location
WaitingIdly Jul 27, 2024
6518f2c
improve base removal operations
WaitingIdly Jul 27, 2024
b022314
set keybind interval to static final
WaitingIdly Jul 30, 2024
856f424
only check on keyboard downpress
WaitingIdly Jul 30, 2024
31470e4
add new GSCC methods to get fluid/item without size
WaitingIdly Jul 30, 2024
8b36383
add nbt tag option to single stack
WaitingIdly Aug 1, 2024
f9c605c
move jei removal to subfolder, rework, and document
WaitingIdly Aug 1, 2024
58d9580
add BetterWithMods jei removal
WaitingIdly Aug 1, 2024
f86429b
add Mekanism jei removal
WaitingIdly Aug 1, 2024
213cbed
add Thaumcraft jei removal
WaitingIdly Aug 1, 2024
bde4a66
implement basics
WaitingIdly Aug 1, 2024
94e142f
implement some more advanced compat
WaitingIdly Aug 1, 2024
2fc26fc
addStygianIronAnvil compat
WaitingIdly Aug 1, 2024
6e873bc
add Inspirations Cauldron compat with note about commented code
WaitingIdly Aug 1, 2024
545d4f7
fix keybind lang keys
WaitingIdly Aug 1, 2024
af0aa79
handle keybind combos and format better
WaitingIdly Aug 1, 2024
afb8e06
remove commented out code
WaitingIdly Aug 1, 2024
ae161c1
world of color
WaitingIdly Aug 1, 2024
e6596d3
increase trim length, store indicator to static final
WaitingIdly Aug 1, 2024
78afd8f
move thaumic jei dep to deobf
WaitingIdly Aug 1, 2024
19c53f6
remove unused accessor method
WaitingIdly Aug 1, 2024
37e0950
make thaumic jei not required
WaitingIdly Aug 1, 2024
85ba657
color gas, infusion, and aspects
WaitingIdly Aug 1, 2024
a4ff5ad
add comment indicating thaumic jei
WaitingIdly Aug 1, 2024
79f2b72
use optional for Immersive Petroleum's Distillation
WaitingIdly Aug 1, 2024
1889921
add format string
WaitingIdly Aug 1, 2024
dfd9b70
add chisel carving compat
WaitingIdly Aug 1, 2024
e0762cc
disable exact method
WaitingIdly Aug 1, 2024
37bb177
add inputItemOperation for ignoring all outputs
WaitingIdly Aug 2, 2024
caffbf9
add include to pair with exclude
WaitingIdly Aug 2, 2024
37cc64c
extract slot focused ingredient logic
WaitingIdly Aug 2, 2024
6a0c3da
go through an ensure methods exist
WaitingIdly Aug 2, 2024
6f47a8a
disable more invalid operations
WaitingIdly Aug 2, 2024
7dbc834
comment out incorrect Fusion and Miniaturization methods
WaitingIdly Aug 2, 2024
b2a909c
remove the default input and output item operations
WaitingIdly Aug 2, 2024
339dd2b
extract remove combo and text logic from keybind
WaitingIdly Aug 2, 2024
d2804a9
add first-operation disclaimer with github link
WaitingIdly Aug 2, 2024
1c16a97
comment todo jei for mekanism methods
WaitingIdly Aug 2, 2024
0762660
move to API, break up file, and reorganize
WaitingIdly Aug 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
disable more invalid operations
  • Loading branch information
WaitingIdly committed Aug 2, 2024
commit 6f47a8a9b56fb912c38fbd168105a0f4d058b043
Original file line number Diff line number Diff line change
@@ -5,10 +5,12 @@
import com.cleanroommc.groovyscript.api.IIngredient;
import com.cleanroommc.groovyscript.compat.inworldcrafting.jei.BurningRecipeCategory;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.compat.vanilla.VanillaModule;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.cleanroommc.groovyscript.sandbox.ClosureHelper;
import com.google.common.collect.ImmutableList;
import groovy.lang.Closure;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import net.minecraft.entity.item.EntityItem;
@@ -66,6 +68,11 @@ public RecipeBuilder recipeBuilder() {
return Collections.singletonList(BurningRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei this
}

public static class BurningRecipe {

private final IIngredient input;
Original file line number Diff line number Diff line change
@@ -6,10 +6,12 @@
import com.cleanroommc.groovyscript.api.IIngredient;
import com.cleanroommc.groovyscript.compat.inworldcrafting.jei.ExplosionRecipeCategory;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.compat.vanilla.VanillaModule;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.cleanroommc.groovyscript.sandbox.ClosureHelper;
import com.google.common.collect.ImmutableList;
import groovy.lang.Closure;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
@@ -62,6 +64,11 @@ public RecipeBuilder recipeBuilder() {
return Collections.singletonList(ExplosionRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei this
}

public static class ExplosionRecipe {

private final IIngredient input;
Original file line number Diff line number Diff line change
@@ -5,10 +5,12 @@
import com.cleanroommc.groovyscript.api.IIngredient;
import com.cleanroommc.groovyscript.compat.inworldcrafting.jei.PistonPushRecipeCategory;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.compat.vanilla.VanillaModule;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.cleanroommc.groovyscript.sandbox.ClosureHelper;
import com.google.common.collect.ImmutableList;
import groovy.lang.Closure;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.item.EntityItem;
@@ -63,6 +65,11 @@ public RecipeBuilder recipeBuilder() {
return Collections.singletonList(PistonPushRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei this
}

public static class PistonPushRecipe {

private final IIngredient input;
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ public static List<EnumMortarType> getTypes(RecipeMortar recipe) {
}
@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO add removal methods to this compat
return ImmutableList.of(); // TODO jei
}

@Property(property = "input", valid = {@Comp(type = Comp.Type.GTE, value = "0"), @Comp(type = Comp.Type.LTE, value = "8")})
Original file line number Diff line number Diff line change
@@ -5,10 +5,12 @@
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.core.mixin.astralsorcery.LightOreTransmutationsAccessor;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import hellfirepvp.astralsorcery.common.base.LightOreTransmutations;
import hellfirepvp.astralsorcery.common.constellation.IWeakConstellation;
import hellfirepvp.astralsorcery.common.integrations.ModIntegrationJEI;
@@ -111,6 +113,11 @@ public SimpleObjectStream<LightOreTransmutations.Transmutation> streamRecipes()
.setRemover(this::remove);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei
}

@MethodDescription(priority = 2000, example = @Example(commented = true))
public void removeAll() {
getRegistry().forEach(this::addBackup);
Original file line number Diff line number Diff line change
@@ -7,12 +7,14 @@
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.enderio.recipe.CustomEnchanterRecipe;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.core.mixin.enderio.SimpleRecipeGroupHolderAccessor;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.ingredient.IngredientHelper;
import com.cleanroommc.groovyscript.helper.ingredient.OreDictIngredient;
import com.cleanroommc.groovyscript.helper.recipe.IRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import crazypants.enderio.base.recipe.IMachineRecipe;
import crazypants.enderio.base.recipe.MachineRecipeRegistry;
import crazypants.enderio.base.recipe.enchanter.EnchanterRecipe;
@@ -105,6 +107,11 @@ public void removeAll() {
return Collections.singletonList(EnchanterRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei enchantment handler
}

public static class RecipeBuilder implements IRecipeBuilder<EnchanterRecipe> {

@Property(valid = @Comp(type = Comp.Type.NOT, value = "null"))
Original file line number Diff line number Diff line change
@@ -8,13 +8,15 @@
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.enderio.recipe.RecipeUtils;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.core.mixin.enderio.SimpleRecipeGroupHolderAccessor;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.ingredient.IngredientHelper;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.helper.recipe.RecipeName;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.enderio.core.common.util.stackable.Things;
import com.google.common.collect.ImmutableList;
import crazypants.enderio.base.recipe.IMachineRecipe;
import crazypants.enderio.base.recipe.MachineRecipeRegistry;
import crazypants.enderio.base.recipe.RecipeLevel;
@@ -209,6 +211,11 @@ public void removeAll() {
return Collections.singletonList(TankRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei tank
}

@Property(property = "input", valid = @Comp("1"))
@Property(property = "fluidInput", valid = {@Comp(type = Comp.Type.GTE, value = "0"), @Comp(type = Comp.Type.LTE, value = "1")})
@Property(property = "output", valid = {@Comp(type = Comp.Type.GTE, value = "0"), @Comp(type = Comp.Type.LTE, value = "1")})
Original file line number Diff line number Diff line change
@@ -4,10 +4,12 @@
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.core.mixin.extrautils2.MachineInitAccessor;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import com.rwtema.extrautils2.api.machine.IMachineRecipe;
import com.rwtema.extrautils2.api.machine.Machine;
import com.rwtema.extrautils2.api.machine.MachineRegistry;
@@ -201,6 +203,11 @@ public void removeAll() {
return Arrays.stream(Generators.values()).map(Generators::toString).map(MachineRegistry::getMachine).filter(Objects::nonNull).map(machine -> "xu2_machine_" + machine.name).collect(Collectors.toList());
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO JEI
}

public enum Generators {

FURNACE("extrautils2:generator"),
Original file line number Diff line number Diff line change
@@ -8,12 +8,14 @@
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.helper.Alias;
import com.cleanroommc.groovyscript.helper.ArrayUtils;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.ingredient.IngredientHelper;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -174,6 +176,11 @@ public void removeAll() {
return Collections.singletonList("ie.workbench");
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO JEI
}

@Property(property = "input", valid = {@Comp(value = "1", type = Comp.Type.GTE), @Comp(value = "Integer.MAX_VALUE", type = Comp.Type.LTE)})
@Property(property = "output", valid = @Comp("1"))
public static class RecipeBuilder extends AbstractRecipeBuilder<BlueprintCraftingRecipe> {
Original file line number Diff line number Diff line change
@@ -4,11 +4,13 @@
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.core.mixin.inspirations.InspirationsRegistryAccessor;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.AbstractReloadableStorage;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import knightminer.inspirations.library.InspirationsRegistry;
import knightminer.inspirations.plugins.jei.smashing.SmashingRecipeCategory;
import net.minecraft.block.Block;
@@ -20,6 +22,7 @@

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@@ -139,6 +142,11 @@ public SimpleObjectStream<Map.Entry<IBlockState, IBlockState>> streamRecipes() {
return Collections.singletonList(SmashingRecipeCategory.CATEGORY);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei
}

public static class RecipeBuilder extends AbstractRecipeBuilder<Object> {

@Property(requirement = "groovyscript.wiki.inspirations.anvil_smashing.input.required")
Original file line number Diff line number Diff line change
@@ -5,9 +5,11 @@
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.ModSupport;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.OperationHandler;
import com.cleanroommc.groovyscript.helper.SimpleObjectStream;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import com.google.common.collect.ImmutableList;
import moze_intel.projecte.integration.jei.world_transmute.WorldTransmuteRecipeCategory;
import moze_intel.projecte.utils.WorldTransmutations;
import net.minecraft.block.Block;
@@ -18,6 +20,7 @@

import java.util.Collection;
import java.util.Collections;
import java.util.List;

@RegistryDescription
public class Transmutation extends VirtualizedRegistry<WorldTransmutations.Entry> implements IJEIRemoval.Default {
@@ -89,6 +92,11 @@ public void removeAll() {
return Collections.singletonList(WorldTransmuteRecipeCategory.UID);
}

@Override
public @NotNull List<OperationHandler.IOperation> getJEIOperations() {
return ImmutableList.of(); // TODO jei
}

public static class RecipeBuilder extends AbstractRecipeBuilder<WorldTransmutations.Entry> {

@Property(valid = @Comp(value = "null", type = Comp.Type.NOT), ignoresInheritedMethods = true)
Original file line number Diff line number Diff line change
@@ -3,26 +3,22 @@
import com.cleanroommc.groovyscript.api.GroovyLog;
import com.cleanroommc.groovyscript.api.IIngredient;
import com.cleanroommc.groovyscript.api.documentation.annotations.*;
import com.cleanroommc.groovyscript.compat.mods.jei.removal.IJEIRemoval;
import com.cleanroommc.groovyscript.core.mixin.roots.RitualBaseAccessor;
import com.cleanroommc.groovyscript.helper.recipe.AbstractRecipeBuilder;
import com.cleanroommc.groovyscript.registry.VirtualizedRegistry;
import epicsquid.roots.integration.jei.JEIRootsPlugin;
import epicsquid.roots.properties.Property;
import epicsquid.roots.properties.PropertyTable;
import epicsquid.roots.ritual.RitualBase;
import epicsquid.roots.ritual.RitualRegistry;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.Collections;

@RegistryDescription(
reloadability = RegistryDescription.Reloadability.FLAWED,
isFullyDocumented = false // TODO fully document Roots Rituals
)
public class Rituals extends VirtualizedRegistry<RitualBase> implements IJEIRemoval.Default {
public class Rituals extends VirtualizedRegistry<RitualBase> {

public static RitualWrapper ritual(String ritual) {
return ritual(RitualRegistry.getRitual(ritual));
@@ -49,11 +45,6 @@ public void disableAll() {
});
}

@Override
public @NotNull Collection<String> getCategories() {
return Collections.singletonList(JEIRootsPlugin.RITUAL);
}

public static class RitualWrapper {

private final RitualBase ritual;