How can I clear the player's crafting slots and item on cursor to prevent them from having specific items in places they shouldn't?
In the example below I use a common hack called 'Inventory Tweaks' (sometimes known as extra carry or inventory) which allows you to store items in your crafting slots/cursor and have them persist through closing your inventory. This is a huge issue as it is simple to create a mod with this feature and it would allow players to use items from multiple kits, unbalancing gameplay.
I have looked into replacing the inventory slots but I can't seem to find a method of achieving this as the crafting slots have IDs 1-4, the same as the player's regular inventory. player.inventory.clear() doesn't seem to clear the crafting slots or cursor, only the main inventory and armor slots.
In the example below I use a common hack called 'Inventory Tweaks' (sometimes known as extra carry or inventory) which allows you to store items in your crafting slots/cursor and have them persist through closing your inventory. This is a huge issue as it is simple to create a mod with this feature and it would allow players to use items from multiple kits, unbalancing gameplay.
I have looked into replacing the inventory slots but I can't seem to find a method of achieving this as the crafting slots have IDs 1-4, the same as the player's regular inventory. player.inventory.clear() doesn't seem to clear the crafting slots or cursor, only the main inventory and armor slots.