COWMODSКаталог модов

ISS

This Datapack adds an easy way Save and Load player inventories.

Автор: ThatCuteOne4231обновлён 25 мая 2025 г.
БиблиотекиУправлениеХранение

Описание

How to use

Valid IDs

The ID can generally be any character although using special characters is not recommended as this can lead to unpredictable behavior

Loading a Layout

This can be done by running iss:functions/load/ {id:<your id>} If the player doesn't have a saved Layout tied to the ID it will try to run the defined fallback function(see "Defining a fallback function") if there is no fallback function defined for that ID it will fail

You can also load the defined fallback function directly by running iss:functions/load/fallback {id:<your id>}

Saving

You can save a Layout by running iss:functions/save {id:<your id>}, this will save the Inventory of the player who is executing it to the specified id

Deleting Layouts

To delete a Layout of a spesific player run iss:functions/delete/ {id:<your id>} as the player. To delete All Layouts associated with a certain id run iss:functions/delete/all {id:<your id>}

Defining a fallback function

To add a fallback function to an id run data modify storage iss data.<your id>.fallback set value "<your function path>" I Would Highly Recommend that you put the command in your load function as deleting All Layouts will also remove the fallback function data(subject to change)

How to use [old pre 2.0.0]

Inventory Types

Global Inventories

Global inventories serve as a backup for personal inventories, operating independently from individual player data.

Personal Inventories

Personal inventories are linked to individual players. They were originally designed for those who wanted to customize their kits differently from the default options, but they can be used for any purpose. If a player attempts to load a personal inventory that hasn't been saved yet, the corresponding global inventory will be loaded instead.


Saving and Loading Inventories

Inventory Ids

To save or load an inventory, you must always provide the inventory's ID. Note that certain characters are not allowed in the inventory ID, including:

  • Spaces
  • Periods (.)
  • Square brackets ([])
  • Parentheses (())

Saving & Loading

These commands are designed to store and restore the inventory of the player who executes them.

Saving

  1. Global Inventory
    Use the save_default function to save a global inventory, including the desired ID as an argument.

    Example:

    /function iss:functions/save_default {id:"starter_kit"}
    
  2. Personal Inventory
    To save a personal inventory, use the save_custom_layout function with the ID argument.

    Example:

    /function iss:functions/save_custom_layout {id:"starter_kit"}
    

Loading

Loading commands replace the player's entire inventory.

  1. Global Inventory
    Use the load_default function to load a global inventory, specifying the ID.

    Example:

    /function iss:functions/load_default {id:"starter_kit"}
    
  2. Personal Inventory
    To load a personal inventory, use the load_custom_layout function with the ID argument.

    Example:

    /function iss:functions/load_custom_layout {id:"starter_kit"}
    

Resetting Personal Inventories

  • To reset a player's personal inventory, use the reset_custom_layout function. This will clear and reset the personal inventory of the executing player.

    Example:

    /function iss:functions/reset_custom_layout {id:"starter_kit"}
    

Последние версии

Все версии →
release

Code rewrite

2.0.0
25 мая 2025 г.96Minecraft: 1.21.5, 1.21.6, 1.21.7, 1.21.8datapack
Скачать
Что нового
# ISS v2.0.0 _This update moves the scope from a utility type of usage to a more library focused scope_ _for new usage instructions check the description or the readme_ - Code rewrite from scratch
release

actionbar messages for 1.21.5

1.3.5
9 апр. 2025 г.49Minecraft: 1.21.5datapack
Скачать
Что нового
# ISS v1.3.5 _this allows for actionbar display in 1.21.5_ - updated actionbar message to snbt
release

Critical bug fix

1.3.4
31 мар. 2025 г.31Minecraft: 1.21.4, 1.21.5datapack
Скачать
Что нового
# ISS v1.3.4 _I would HIGHLY recommend updating to this version as this bug is pretty critical_ ## Changelog - fixed a critacal bug where if there is no armor piece saved in the layout it gives the last item that was given before
release

Update to 1.21.5

1.3.3
26 мар. 2025 г.23Minecraft: 1.21.4, 1.21.5datapack
Скачать
Что нового
- added support for new equpment field - pre 1.21.5 layouts should still work
release

ISS[1.3.2]

1.3.2
4 мар. 2025 г.38Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
### New Features - made actionbar display an option(off by default) _can be toggled in the load.mcfunction_ ### Additions - code is now open source on github - license code under CC-BY-4.0 - add readme ### Fixes - encrease code readability - fix comment being in german
release

ISS Hotfix

1.3.1
6 нояб. 2024 г.56Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4datapack
Скачать
Что нового
fixed functions using old "player_id" scoreboard instead of the new one "iss.player_id"
release

code improvement

1.3.0
6 нояб. 2024 г.24Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3datapack
Скачать
Что нового
# reorgenized code added "functions" folder were all the features of this pack can be used: ### Saving - "save_default" saves a global layout with an id - "save_custom_layout" saves a personal layout for the player who is running the function ### Loading - "load_custom_layout" load the personal layout for the player who is running the function - "load_default" load a global layout with an id --- - "reset_custom_layout" replaces the personal layout with the equivalent global one
release

ISS[1.2.1]

1.2.1
20 июн. 2024 г.31Minecraft: 1.21datapack
Скачать
Что нового
- fixed ISS giving @a Speed and Strengh
release

ISS[1.2.0]

1.2.0
17 июн. 2024 г.28Minecraft: 1.21datapack
Скачать
Что нового
dasdas
release

ISS [1.0.0]

1.0.0
1 мар. 2024 г.47Minecraft: 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6datapack
Скачать