Item Stages

Item Stages

20M Downloads

1.18 Version's lack of documentation

neos0 opened this issue ยท 1 comments

commented

I'd like to disable the feature that drops unfamiliar items from the inventory. In older version this could be done in the config file, but the 1.18 version doesn't even generate a config file anymore. Is there a way to disable it from scripts?

commented

You can find the full documentation for this mod in the example scripts. You're looking for this part.

// By default items are restricted to the greatest degree possible however you
// may want to ease certain parts of the restriction. For example you may want
// to prevent a player from using an item but allow them to keep it in their 
// inventory. This can be done by setting preventInventory to false.
val two = ItemStages.restrict(<item:minecraft:diamond>, "adv_two");
two.preventInventory(false);   // Allows item to be kept in inventories.
two.preventAttacking(false);   // Allows item to be used as a weapon.
two.preventPickup(false);      // Allows item to be picked up.
two.preventUsing(false);       // Allows item to be used (left/right click).
two.setHiddenInJEI(false);     // Allows item to be visible in JEI.