Darkhax-Minecraft / ItemStages

Allows items to be put into stages.
GNU Lesser General Public License v2.1
7 stars 18 forks source link

Mod restricting #65

Closed Umbreona closed 3 years ago

Umbreona commented 3 years ago

im trying to restrict all the items from a given mod so i can add a select few back in. on the curse forge page it states theres a way to do this however the code listed doesnt work. over here the code is different but there is no option for restricting a mod. any idea how to fix this?

Darkhax commented 3 years ago

The 1.16.5 versions of this mod are provisional preview releases. The mod works entirely differently now and the old documentation is not applicable. The only documentation for 1.16.5 for now are the example scripts included with the mod.

In 1.16.5 you can still stage an entire mod however the syntax is different and there is no way to undo the restriction for individual items. This is because the restriction tests items on demand rather than keeping a list of specific items to restrict. This change was to improve the performance and compatibility of the mod.

The recommended way to do what you want is to create a new item tag and then use a loop to populate it with the items you actually want to stage. Then create a restriction for that tag.