ForestryMC / Binnie

Minecraft addons for the Forestry mod. Extra Bees, Extra Trees, Genetics, and more.
https://minecraft.curseforge.com/projects/binnies-mods
Other
69 stars 77 forks source link

Can't disable Compartment's via CT #576

Closed KaneHart closed 5 years ago

KaneHart commented 5 years ago

Some odd reason no matter what I do I can't seem to disable Compartment's via CT.

Example:


recipes.remove(<binniecore:storage>);
recipes.remove(<binniecore:storage:1>);
recipes.removeShaped(<binniecore:storage>);
recipes.removeShaped(<binniecore:storage:*>);
recipes.removeShaped(<binniecore:storage:1>);```

Either way nothing removes them I even tried labeling the file z just in case but nothing else is editing the binnie mods. 
KaneHart commented 5 years ago

I also tried this method: recipes.removeByRecipeName("binniecore:compartment");

KaneHart commented 5 years ago

recipes.removeAll();

So talking to the devs of CT they are saying the recipes are being registered too late. I mean I used the above and still the containers exist but I can't even create a bench anymore to give you an idea what it does.

Either way thanks for your time.

justinrusso commented 5 years ago

This is indeed caused by the recipes being registered too late. https://github.com/ForestryMC/Binnie/blob/4136ae8e6a166d7c9db4afed20a8225d9dfde297/core/src/main/java/binnie/core/machines/storage/ModuleStorage.java#L33

There is a recipe registration event that would probably be the most ideal. Quote source: https://mcforge.readthedocs.io/en/latest/concepts/registries/

RegistryEvents are currently supported for the following types: Block, Item, Potion, Biome, SoundEvent, PotionType, Enchantment, IRecipe, VillagerProfession, EntityEntry

CraftTweaker runs during that event on the lowest priority.