[Feature Request] Hide items in JEI until it has been held/ in inventory.
dreckz opened this issue ยท 1 comments
Description
I love the idea of using game stages to hide items as it is extremely helpful for larger packs. However, one 1 idea I was attempting to implement was try to make it where players start of with no shown items in their JEI until they actually pick the block up. So lets say I pick the block up, I would then be able to look at how to make the block, and how to use it.
I don't want to disable players from seeing what it's used for, rather this is more so rather both a softer way to introduce players to bigger packs as well as create almost a knowledge recepticle to collect items in the world and fill out JEI with items you've held/ seen.
Additional Context
Attempting to do this with every block using stages seems incredibly arduous and possibly not possible. You can certainly do chunks of items at a time (like making only minecraft items seen and then as you gain stages you unlock new mods to see in JEI) but this is not the scalability that affords the packdev to make all items only visible in jei when picked up. More of a meta-info blockade rather than a direct block of being able to go further beyond it.
This is already possible using ItemStages and CraftTweaker events. You would use a loop to stage every item with ItemStages using a stage name like this "jei_" + item.registryName.namespace + "_" + item.registryName.path
. Then create a CraftTweaker event for when an item is picked up that will grant a stage with that name.
I personally don't think ItemStages/GameStages is the right tool for this job though. ItemStages does a lot behind the scenes and there is a small but non-negligible performance impact for each unique restriction. In your case you would have a new restriction for every item in the game which is not ideal. I would personally consider alternatives.
One potential alternative would be convincing someone to make a JEI addon that offers this feature. This would be much more specialized to your needs and avoid a lot of the overhead from GameStages/ItemStages/CraftTweaker. Another potential alternative would be to look into syncing JEI up with the vanilla recipe book's recipe learning feature which while not identical is similar in functionality and purpose to the system you are trying to achieve.