Kxffie / CraftingPlus

Quick and Enhanced Crafting Recipes for Minecraft Java 1.20+
MIT License
0 stars 2 forks source link

Unnecessary Complexity and Possible Future Proofing in Some Recipes. #2

Open Palxz opened 11 months ago

Palxz commented 11 months ago

A bunch of recipes which contain things like Logs or Planks I saw in the code that list every single type of plank. While it may not be that bad it could be easier to instead do the following for example in the case of Logs in bulk_bowl.json . This is the current code

    "key": {
        "#": [
            {
                "item": "minecraft:oak_log"
            },
            (imagine here more listing but of Every Single type of wood in Log,Striped and Wood form)
        ]
    }

This code right now its inefficient and not future-proof since it would need updates for each time a new wood type its added. In its place we could use the tag "minecraft:logs" which removes the need of any maintanance and makes it not only more readable but also clean and fail-proof. The Finished thing should look similar to this

    "key": {
        "#": {
            "tag": "minecraft:logs"
        }
    }
Palxz commented 11 months ago

I should make it clear that there are a bunch of different tags and even some for planks and other stuff so it could be useful not only for this but for many recipes overall.

Kxffie commented 10 months ago

yea some recipes do this, but i made this awhile ago forgetting i could do this so some recipes are using the multiple log variants instead of the tag. there is just some recipes i skipped over when going back and fixing them. also, the code here is outdated so I believe I did get all of them. I will review and then post and update soon.