Natural Progression

Natural Progression

229k Downloads

Only remove plank recipe if the ingredients are logs

sargunv opened this issue · 8 comments

commented

You should be able to do this by checking the #minecraft:logs tag.

This should fix the issue where things like Quark's and other mods' Vertical Planks, Buzzier Bees's Hive Planks, and Quark's dyed planks lose their recipes even though they're not the standard logs-to-planks recipe replaced by the mod.

commented

I have an idea then. How about we redesign the to recipe overlap with the original recipe so that it inherently disables the old recipe only if the new recipe works, instead of disabling every way to get planks?

commented

I can also do something like this:

    private static void removePlankRecipes(final RecipeManager recipeManager)
    {
        final int recipesRemoved = removeRecipes(recipeManager, recipe -> {
            final ItemStack recipeOutput = recipe.getRecipeOutput();

            for (Ingredient ingredient : recipe.getIngredients())
            {
                for (ItemStack stack : ingredient.getMatchingStacks())
                {
                    if (ItemTags.LOGS.contains(stack.getItem()))
                    {
                        return !recipeOutput.isEmpty() && recipeOutput.getItem().isIn(ItemTags.PLANKS)
                                && !(recipe.getSerializer() instanceof DamageItemRecipe.Serializer);
                    }
                }
            }

            return false;
        });

        NaturalProgression.getInstance().LOGGER.info("Removed {} recipe(s) for planks", recipesRemoved);
  }
commented

Overlapping the old recipe is a fantastic idea. That way the mod can simply remove the recipe removal code and allow the data pack to do all the work on its own. I can go through the mod conpat recipes and update their paths to match too.

commented

Sounds wonderful, thank you so much for all your help and support!!!

commented

Thanks to someone who has been great help contributing to compatibility data packs, I think this may be a non-issue. I'll test this though to be certain.

commented

It's still an issue even with the data packs I contributed. Those add the custom log->plank flow but they can't replace the other plank stuff like dying planks or creating vertical planks.

Filtering recipe removal for only loglike ingredients will ensure only the log->plank progression is replaced while other plank recipes remain.

Unrelated: Yesterday I realized that compatibility data pack used the wrong tool tag for stripping logs; I'll PR a fix for that tonight.

commented

I've really neglected this PR and I apologize - life has been a bit crazy. I have dedicated myself some time to work on this mod and I've finally looked over and implemented @sargunv's delightful recipe implementation so that this is no longer an issue.

commented

This issue is making the mod unusable for me. All log->planks have been removed, including those for machinery like Create's saw. I tried adding custom recipes using kubejs for other mods logs, but those get removed too. I'm left with a) no way to get 90% of the planks in my modpack and b) no easy way to automate planks, because I have to use the saw items every time.