Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Adds "NC" text to items not consumed during Shaped Arcane Workbench crafts#34

Closed
dagger8243 wants to merge 7 commits into
GTNH-Museum:masterfrom
dagger8243:master
Closed

Adds "NC" text to items not consumed during Shaped Arcane Workbench crafts#34
dagger8243 wants to merge 7 commits into
GTNH-Museum:masterfrom
dagger8243:master

Conversation

@dagger8243

Copy link
Copy Markdown

Known affected recipes:

image image image image image

@UltraProdigy

UltraProdigy commented Nov 1, 2025

Copy link
Copy Markdown

Also, cosmetically, maybe a slightly deeper yellow? Might just be my screen but I struggle to see it

@slprime

slprime commented Nov 1, 2025

Copy link
Copy Markdown

For bookmarks to work properly, NC items need to have a stack size of zero. It’s more efficient to assign a stack size of zero when creating the recipe in the handler and display the NC for all ingredients that have a stack size of zero.

@UltraProdigy UltraProdigy dismissed their stale review November 1, 2025 18:06

My changes have been addressed. I'll let SL finish this off & approve when ready since they are the NEI expert.

@UltraProdigy UltraProdigy added the Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Nov 1, 2025
@slprime

slprime commented Nov 2, 2025

Copy link
Copy Markdown

Details:

  1. move your checks into a separate function
            if (ingredient.getItem().equals(NC_Blacklist[0])) continue;
            if (ingredient.getItem().hasContainerItem(ingredient)
                    || ingredient.getItem() instanceof ItemEldritchObject) {
                if (ingredient.getItem() instanceof ItemEldritchObject && ingredient.getItemDamage() == 3) {
                    // Uses primordial pearl
                    if ((resultItem.equals(NC_Whitelist[0])) && (resultStack.getItemDamage() != 3)) {
                        break;
                    } else if (!resultItem.equals(NC_Whitelist[1]) && !resultItem.equals(NC_Whitelist[0])) {
                        break;
                    }

                } else if (ingredient.getItem().getContainerItem(ingredient) == null
                        || !ingredient.getItem().getContainerItem(ingredient).getItem().equals(ingredient.getItem())) {
                            continue;
                        }
  1. use it in setIngredients methods where stack.setMaxSize(1); is set (for NC item set to 0)
  2. in drawExtras instead of a complex check, use stackSize==0

@Dream-Master Dream-Master added the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta (experimental build) label Nov 14, 2025
@boubou19

Copy link
Copy Markdown

@dagger8243 any news here?

@slprime slprime left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For NEI bookmarks to work correctly, ingredients containing NC must have stackSize = 0.

I would move the NC check into ArcaneShapedCachedRecipe and ArcaneWandCachedRecipe, specifically into setIngredients(), so it is computed once when the handler is created instead of on every render. Then, during rendering, it would be enough to check whether stackSize == 0

final float scale = 0.75f;
final boolean shadow = false;

FontRenderer fontRenderer = net.minecraft.client.Minecraft.getMinecraft().fontRenderer;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove net.minecraft.client

break;
}

} else if (ingredient.getItem().getContainerItem(ingredient) == null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't call getContainerItem two times. use a variable

|| ingredient.getItem() instanceof ItemEldritchObject) {
if (ingredient.getItem() instanceof ItemEldritchObject && ingredient.getItemDamage() == 3) {
// Uses primordial pearl
if ((resultItem.equals(NC_Whitelist[0])) && (resultStack.getItemDamage() != 3)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are explicitly accessing array variables, it is better to use 2 properties and name them correctly

@Dream-Master Dream-Master removed the 🚧 Testing on Zeta Do not merge yet, testing this PR on Zeta (experimental build) label Mar 19, 2026
@Dream-Master

Copy link
Copy Markdown

Pr is not longer needed because we use this mod https://github.com/GTNewHorizons/AspectRecipeIndex

@koolkrafter5

Copy link
Copy Markdown

I would still like to port this feature since it seems useful. You're also free to PR it yourself if I don't get around to it.

@Dream-Master

Copy link
Copy Markdown

@dagger8243

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants