Adds "NC" text to items not consumed during Shaped Arcane Workbench crafts#34
Adds "NC" text to items not consumed during Shaped Arcane Workbench crafts#34dagger8243 wants to merge 7 commits into
Conversation
|
Also, cosmetically, maybe a slightly deeper yellow? Might just be my screen but I struggle to see it |
…ble, also no more random print.
|
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. |
My changes have been addressed. I'll let SL finish this off & approve when ready since they are the NEI expert.
|
Details:
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;
}
|
|
@dagger8243 any news here? |
slprime
left a comment
There was a problem hiding this comment.
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; |
| break; | ||
| } | ||
|
|
||
| } else if (ingredient.getItem().getContainerItem(ingredient) == null |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
If you are explicitly accessing array variables, it is better to use 2 properties and name them correctly
|
Pr is not longer needed because we use this mod https://github.com/GTNewHorizons/AspectRecipeIndex |
|
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. |
Known affected recipes: