-
Notifications
You must be signed in to change notification settings - Fork 150
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
Hide Tools in JEI - or not #1505
base: master
Are you sure you want to change the base?
Conversation
As usual here is a list of issues;
My original prototype for this, actually had the recipes loaders register what items to display in JEI as they create the recipes. |
By the way, do you know how the existing code knows not to create Coal pickaxes? |
The implementation is flawed by design, even the predicate itself shows that: you hard-coded flint tools there. |
I would love to be able to write
But that ore prefix doesn't exist and even if it did, it would probably still exclude flint?
And that is what will still happen. The default behaviour doesn't change anything. |
Personally, I also find clutter in JEI horrible. But in this case, it actually makes it more usable. Currently if you want to make a tool, you have to click on the darmstadtium version and scroll through 10+ pages of unordered recipes to find the one want. With the tools expanded in JEI it behaves like all other recipes, removing any learning curve. |
I like idea behind this PR. I also feel that scrolling through ton of tools to find one from material I want is tedious and hard to figure out for starting players. And when it is configurable then it is even better. I am bit concerned about mentioned issues so I will have to take a deeper look at this. |
To resolve point (2) above I went ahead and added a creative tab for tools. The original "darmstadtium" tools are still also displayed in the main GTCE creative tab. This new tab appears unconditionally, so it will be empty when hideToolsInJei=true. I did this for 2 reasons;
I chose a "hard hammer" as the icon of the creative tab. |
I believe the remaining issues now are:
|
This reverts commit fe74783.
As per the discussion on #1727 this visual glitch would be impossible to fix. So we are stuck with just showing one tool material for the ore dictionary. |
What:
Allow tools to behave like other items in JEI (and make GTCE's JEI look more like Tinker's :-)
How solved:
Introduced a new configuration option that by default keeps the existing behaviour:
When this flag is changed to false, a new predicate is checked on each ToolMetaItem.MetaToolValueItem (i.e. each tool type)
Any materials matching the predicate will be added as "subitems" to minecraft's creative tab, which is the default mechanism to have them appear in the JEI item grid.
In addition, the JEI subtype identification for those items is changed to be metadata;materialname so that JEI can correctly distinguish them
This end result is that you can search for a tool, e.g. "wrought iron wire cutters" click on it and go directly to just its recipe(s), rather than a list of every wire cutter recipe for every material.
Outcome:
Closes #1503
Additional info:
I have tried to make this as easy as possible to use, here are some examples from gregtech.common.items.MetaTool
Possible compatibility issue:
This mechanism allows tools that do support this feature, to live alongside those that don't.
Even with the flag set to false and the new behaviour active, tools from the addon projects will continue to behave in the old way until their definition has been updated to define a predicate for what materials to show in JEI.