Botania (Fabric/Quilt)

Botania (Fabric/Quilt)

5M Downloads

Crafty Crate doesn't recognize GameStages Recipes

Xaikii opened this issue ยท 10 comments

commented

Forge version: 14.23.2.2615
Botania version: r1.10-352

Steps to reproduce:

  1. Add Stages Recipe
  2. Go to a test World
  3. Give yourself the needed Stage
  4. Check if it works (if yes -->5)
  5. Build up a Crafty Crate + Hopper on Top
  6. Add the Shape to the Crate
  7. 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.

commented

@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

commented

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 ๐Ÿ˜‰ ๐Ÿ˜‰

commented

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

commented

@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?

commented

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.

commented

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?

commented

Nope, no need, as I said, package whotelisting, use, `setPackageStage("vazkii.botania");

commented

Using "vazkii.botania" works but is there an effective way to get the container names?

commented

You could call:

mods.recipestages.setPrintContainers(true);

https://github.com/jaredlll08/RecipeStages/blob/37e8d085b2e87296d859f56bafc03bf509068cba/src/main/java/com/blamejared/recipestages/handlers/Recipes.java#L39-L42

which will make it print the current container a crafting is attempting to be made in to the console

commented

oh okay, thanks :)