The bag’s size and color are stored as NBT in itemstacks of the bag. The size is stored with the “radius” key; the color is stored in the same manner as leather armor.
Players and ops with command access can spawn a bag with size x with this command:
/give PlayerName bagofyurting:bag_of_yurting{radius:x}
<br />A bag with radius x will have an area of effect with diameter (2*x) + 1, so a bag of radius 5 will have an 11x11x11 area of effect.
The upgrade recipe json uses a special recipe type. It parses like a regular shaped recipe json, so this recipe can be adjusted as needed, with the caveats that A) it must be a shaped recipe, and B) at least one of the ingredients must be a Bag of Yurting. The output bag will have a radius value equal to X+1, where X is the smallest radius of any bag used as an ingredient.
There are three block tags added by the mod: bagofyurting:blacklist, bagofyurting:whitelist, and bagofyurting:replaceable.
The blacklist and whitelist tags define which blocks can be stored into the bag. A block is storeable if it is whitelisted and not blacklisted. If the whitelist tag is empty, all blocks are considered to be whitelisted. Blocks that cannot be stored by the player will be ignored when blocks are loaded into the bag.
The replaceable tag defines which blocks in the world are allowed to be overwritten when unloading the bag. Any block with a replaceable material (such as tall grass) is always replaceable. If, when unloading the bag, any blocks that would be replaced are unable to be replaced by the contents of the bag, the unloading will fail and the bag’s contents will remain in the bag.
Players who are in creative mode or have sufficient permission level ignore these tags; this permission level defaults to 2 and can be configured in the server config.
The storing or unloading of a block can also be prevented by other mods by cancelling the BlockEvent.BreakEvent or the BlockEvent.EntityMultiPlaceEvent forge events, respectively.