Binnie's Mods

Binnie's Mods

23M Downloads

Can't disable Compartment's via CT

StoneLegion opened this issue ยท 3 comments

commented

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. 
commented

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

commented

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.

commented

This is indeed caused by the recipes being registered too late.

recipeUtil.addRecipe("compartment", Compartment.Compartment.get(1), "pcp", "cbc", "pcp", 'b', Items.BOOK, 'c', Blocks.CHEST, 'p', Blocks.STONE_BUTTON);

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.