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

Recipes registered late in loading? (Can't remove with crafttweaker) #84

Open
hacatu opened this issue Oct 12, 2020 · 4 comments · Fixed by #133
Open

Recipes registered late in loading? (Can't remove with crafttweaker) #84

hacatu opened this issue Oct 12, 2020 · 4 comments · Fixed by #133
Labels
bug Something isn't working question Further information is requested

Comments

@hacatu
Copy link

hacatu commented Oct 12, 2020

Many sog recipes in gt machines can't be removed with crafttweaker:

  • if the option to add compressor recipes for all 3x3 block crafting recipes is enabled, they can't be removed. Iterating over the recipe list for the compressor reveals no such recipes have been registered when crafttweaker runs.
  • if bees are enabled, chemReactor.findRecipe(24, [<gtadditions:bee_comb:13>*9, <ore:crushedSpodumene>.firstItem], [<fluid:water>*1000]) is null since the recipe hasn't been registered yet.
  • fwiw, nuclearcraft does the same thing if "mirroring" nc machine recipes in gt machines is enabled
    I assume these recipes can't be removed and aren't registered because crafttweaker is running its recipe addition stage after sog and nc, which could be fixed by sog but could also be considered a ct bug since why isn't ct running last of all.
@Exaxxion Exaxxion added bug Something isn't working question Further information is requested labels Mar 24, 2021
@Exaxxion
Copy link
Collaborator

Are you still experiencing these issues? If so please let us know and we can investigate it further.

@ALongStringOfNumbers
Copy link
Collaborator

ALongStringOfNumbers commented Apr 7, 2021

Reproduce with this Script:

import mods.gregtech.recipe.RecipeMap;
import crafttweaker.item.IItemStack;


val compressor        as RecipeMap = RecipeMap.getByName("compressor");

compressor.findRecipe(2, [<minecraft:coal:1> * 9], [null]).remove();

And the option for compressor recipes for 3x3 blocks is enabled is enabled

java_2021-04-06_19-41-56

@Exaxxion
Copy link
Collaborator

Exaxxion commented Apr 7, 2021

This seems to suggest that we might be adding recipes too late in the Forge initialization lifecycle. Recipe registration is expected to occur in response to FMLInitializationEvent. If we're doing it after that, we might be stepping on CraftTweaker's toes.

@Exaxxion
Copy link
Collaborator

Exaxxion commented May 6, 2021

Following up on this issue, we have determined that it is not possible to fix this at this time. Forestry is registering its recipes after CraftTweaker processes scripts, and we have to run our modifications after their registrations happen.

We have done what we can about things on our end in #133 and also contacted Forestry's dev team about this issue (ForestryMC/ForestryMC#2599). If they make the necessary changes, then we can update things on our end as well to support customizations.

Exaxxion pushed a commit that referenced this issue May 6, 2021
@Exaxxion Exaxxion reopened this May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants