Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static recipe materials are hardcoded. #1755

Open
Patbox opened this issue Mar 21, 2024 · 1 comment
Open

Static recipe materials are hardcoded. #1755

Patbox opened this issue Mar 21, 2024 · 1 comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature.

Comments

@Patbox
Copy link
Member

Patbox commented Mar 21, 2024

Recipes for disks and printout contain hardcoded static items, that can't be replaced. In case of modpacks/servers wanting to tweak their recipes to be more inline with other mods it prevents from doing so (only having the impostor recipes, which changing is useless).

Solution:

  • Unhardcode things such as redstone/paper/string/leather from recipes and move them to custom serializer json.
  • Use custom cc-specific tags with default values pointing to current requirements
@Patbox Patbox added the enhancement An extension of a feature or a new feature. label Mar 21, 2024
@SquidDev SquidDev added the area-Minecraft This affects CC's Minecraft-specific content. label Mar 21, 2024
@SquidDev SquidDev added this to the Minecraft 1.20.6 milestone Apr 29, 2024
SquidDev added a commit that referenced this issue May 9, 2024
Rather than having one single hard-coded recipe, we now have separate
recipes for printed pages and printed books. These recipes are defined
in terms of

 - A list of ingredients (like shapeless recipes).
 - A result item.
 - An ingredient defining the acceptable page items (so printed page(s),
   but not books). This cannot overlap with any of the main ingredients.
 - The minimum number of printouts required.

We then override the shapeless recipe crafting logic to allow for
multiple printouts to appear.

It feels like it'd be nice to generalise this to a way of defining
shapeless recipes with variable-count ingredients (for instance, the
disk recipe could also be defined this way), but I don't think it's
worth it right now.

This solves some of the issues in #1755. Disk recipes have not been
changed yet.
@SquidDev
Copy link
Member

SquidDev commented May 9, 2024

I have changed printed pages in ad70e2a.

I want to have a bit more of a think about disk drives. Ideally we'd just be able to expose these as a shapeless recipe, but I'm not sure what to do about the impostor recipes. I don't want to design a system where the impostor recipes are out-of-sync with the "actual" crafting recipe, but the only options I can see are generating the impostor recipes at runtime (a lot of extra code for something quite niche), or just removing them (loathe to do, as they're important for recipe book support).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants