Railcraft

Railcraft

34M Downloads

[1.12.2] Can't remove anything from Railcraft via Crafttweaker

Skaphegor opened this issue ยท 27 comments

commented

I tried to remove recipes from Railcraft but it don't work. It seems that Railcraft recipes can't be removed.
Here is a simple script. -> https://pastebin.com/WuEMQhp2

Both commands did not work. recipes.remove and recipes.removeByRecipeName.

Forge: 2796
Crafttweaker: 4.1.13
Railcraft: 12.0.0 Beta 2

See also: CraftTweaker/CraftTweaker#691

commented

Try removing by output item id instead.

commented

I tried recipes.remove(railcraft:boiler_firebox_solid);
recipes.remove(railcraft:circuit:*); which also failed. the second one seems to be the only working one. recipes.remove(railcraft:boiler_firebox_solid);

I will try to avoid :* for any meta.

commented

I'd be mighty surprised if any of the Craft Tweaker stuff works right now.

And I suggest they hold off on fixing it for the moment.

All the recipe stuff is very unstable right now.

commented

At least part of the problem here is that the recipe names are dynamically generated because it was to much work to go back and name every recipe.

commented

I'd also suggest that maybe if you want to disable the block, you use the block config instead of removing the recipe.

commented

At least part of the problem here is that the recipe names are dynamically generated because it was to much work to go back and name every recipe.

That should not be a problem if the names are always the same. And on the other hand it did't throw me an error that the name can't be resolved.

I'd also suggest that maybe if you want to disable the block, you use the block config instead of removing the recipe.

I don't want to remove the block. I just wanted to change it recipe. The blocks, I wanted out like the worldpikes, are disabled via config

commented

Can you see if you can remove recipe by id? JEI will display the recipe id as part of output tooltip if there is one, statically assigned or dynamically generated.

recipes.removeByRecipeName("railcraft:[a_randomly_generated_id]");

Edit: wait, the script has been using removeByRecipeName already...

I changed

recipes.remove(railcraft:circuit:*);

to

recipes.remove(railcraft:circuit:0);
recipes.remove(railcraft:circuit:1);
recipes.remove(railcraft:circuit:2);
recipes.remove(railcraft:circuit:3);

But that try also failed. The recipes are still present. But normally, if Crafttweaker couldn't get the meta it should crash.

commented

Can you see if you can remove recipe by id? JEI will display the recipe id as part of output tooltip if there is one, statically assigned or dynamically generated.

recipes.removeByRecipeName("railcraft:[a_randomly_generated_id]");

Edit: wait, the script has been using removeByRecipeName already...

I changed

recipes.remove(railcraft:circuit:*);

to

recipes.remove(railcraft:circuit:0);
recipes.remove(railcraft:circuit:1);
recipes.remove(railcraft:circuit:2);
recipes.remove(railcraft:circuit:3);

But that try also failed. The recipes are still present. But normally, if Crafttweaker couldn't get the meta it should crash.

Uh no, by "recipe id", I mean there is a thing called "recipe registry name", as mentioned in https://crafttweaker.readthedocs.io/en/latest/#Vanilla/Recipes/Crafting/Recipes_Crafting_Table/
image

Either way, I noticed that your initially provided scripts have already that...

commented

Can you see if you can remove recipe by id? JEI will display the recipe id as part of output tooltip if there is one, statically assigned or dynamically generated.

recipes.removeByRecipeName("railcraft:[a_randomly_generated_id]");

Edit: wait, the script has been using removeByRecipeName already...

commented

Could this be related to recipe registration time?
If RC registers its recipe after CT was run, such recipe removal will not work.

commented

hmm, when is ct ran9

commented

Could this be related to recipe registration time?
If RC registers its recipe after CT was run, such recipe removal will not work.

hmm, when is ct ran9

That might be. But remember that recipes.remove(railcraft:boiler_firebox_solid); worked. Is that recipe registered at a different stage of loading?

commented

All the recipes in railcraft are registered during the init stage, after the registry events are fired.

commented

The circuit output recipes it should noted in current versions register 6 variants per circuit. Might it only be removing one?

I changed them to use composite ingredients for beta-3.

Six? I have only three versions. One version contains Certus Quartz. Are the other also mod-depending?
I don't think that none is removed though.

commented

I think it might be a good idea to move all recipe to init and see what happens

commented

The circuit output recipes it should noted in current versions register 6 variants per circuit. Might it only be removing one?
I changed them to use composite ingredients for beta-3.

Six? I have only three versions. One version contains Certus Quartz. Are the other also mod-depending?
I don't think that none is removed though.

I checked. There are three variants per circuit.
2019-01-04_14 53 52
2019-01-04_14 53 36
2019-01-04_14 53 41
2019-01-04_14 53 49

commented

It was definitely six, (Ic2 sticky resin + slimeball) * (lapis + quartz + certes).

Most of the recipes registered in post are recipes that use ingredients from other mods. It might be safe to register them in init these day, but its hard to say for sure without testing all of them.

commented

Not all... some are in post.

commented

The circuit output recipes it should be noted in current versions register 6 variants per circuit. Might it only be removing one?

I changed them to use composite ingredients for beta-3.

commented

I'm going to be closing the issue on my side.

JEI caches it's recipes at postinit, we run recipe removal / addition at post init, and very rarely have issues like this as most modders use the Register for their recipes, or at the latest init.

And easy fix would probably be adding "before:crafttweaker", so your post init runs before mine.

commented

Yeah, guess rc will just move all recipes to init stage.

commented

All the recipes in railcraft are registered during the init stage, after the registry events are fired.

If this is the issue, a temporary workaround is to remove the recipes using UniDict. It has a separate recipe removal CraftTweaker function that takes place well after CraftTweaker does its thing.

commented

All the recipes in railcraft are registered during the init stage, after the registry events are fired.

If this is the issue, a temporary workaround is to remove the recipes using UniDict. It has a separate recipe removal CraftTweaker function that takes place well after CraftTweaker does its thing

As I remember, UniDict only removes kinds like gearPlate or ingotSteel.

commented

There shouldn't be anything wrong with moving the recipes, its just a hold over from the wild west days of Risu's ModLoader when you did whatever you wanted, whenever you wanted, and the only time you could count on other mods being ready was in post.

commented

Marking wip as we are going to replace postinit usages wherever possible.

commented

@jaredlll08 Should crafttweaker work fine if all railcraft recipes are registered in initialization stage?

commented

Yes.