Crafty Crate doesn't recognize GameStages Recipes
Xaikii opened this issue ยท 10 comments
Forge version: 14.23.2.2615
Botania version: r1.10-352
Steps to reproduce:
- Add Stages Recipe
- Go to a test World
- Give yourself the needed Stage
- Check if it works (if yes -->5)
- Build up a Crafty Crate + Hopper on Top
- Add the Shape to the Crate
- Put the required items into the Hopper
What I expected to happen:
Getting Items out of the Crate
What happened instead:
It took all of the Materials but didn't give an item back.
@Darkhax any insight? I'm not familiar with how gamestages restricts crafting recipes.
Relevant crafty crate code is here: https://github.com/Vazkii/Botania/blob/c58ae21173ff63da2f107e328f19a31e0d609778/src/main/java/vazkii/botania/common/block/tile/TileCraftCrate.java#L121
It looks like gamestages are all per-player, at least going by the curseforge description. At the very least, you'll have to save who placed the crafty crate.
P.S. saving the owner of the crate will also help with supporting doLimitedCrafting
๐ ๐
GameStages doesn't handle anything related to recipes. The mod you are looking for is RecipeStages. They change recipes by wrapping the object in the registry. @jaredlll08
@williewillus RecipeStages has "container / package whitelisting", which will let you whitelist a container/package for stages
https://github.com/jaredlll08/RecipeStages/blob/37e8d085b2e87296d859f56bafc03bf509068cba/src/main/java/com/blamejared/recipestages/handlers/Recipes.java#L44-L52
It's implemented here:
https://github.com/jaredlll08/RecipeStages/blob/37e8d085b2e87296d859f56bafc03bf509068cba/src/main/java/com/blamejared/recipestages/recipes/RecipeStage.java#L95-L115
I don't think you need to do anything specifically, if @Xaikii whitelisted the botania package, then it should work fine?
Sorry for late reply, I don't check Github that often and I didnt get noticed by mail...
If it is done with container whitelisting ok, it actually worked before that update came, anyway when I try to get the names it doesn't work.
If I check the wiki "mods.recipestages.Recipes.setPrintContainers(true);" should give me the names but it doesn't print anything, I can't find any information what I have to type into ContainerRequirement. I then tried to use setPackageStage where I assumed the package Name was botania and that didn't work either.
as you can see above, we currently use an anonymous subclass of Container at the moment. Do you think it would help if I changed it to use a real named class?
Nope, no need, as I said, package whotelisting, use, `setPackageStage("vazkii.botania");
Using "vazkii.botania" works but is there an effective way to get the container names?
You could call:
mods.recipestages.setPrintContainers(true);
which will make it print the current container a crafting is attempting to be made in to the console