One thing that I feel behind on for commands is controlling items in inventories with commands. While I find other players doing well impressive scripting and/or commands that interact in interesting ways, creating simple ways for the rest of us to do the same would be great. So I introduce you the /modifyInventory command.
This command would contain subsection lines to move, un/equip, change item names, or possibly enchant or disenchant them. One of the best uses I would love is adding info to the item, such as a modifier that writable books use. Using similar dialect to the replaceItem command, it would use similar features like the slot and location syntax.
Now one problem I do see is items getting deleted or lost, but the keywords “swap”, “keep”, replace” could easily fix that, with “swap” being the default option if skipped. Swap is simple, it would switch places with where the item you were moving came from. Keep would cancel the command if an item was in the way of 2nd location. Last but not least, Replace would cause an item if located at the move point to get deleted. Adding a filter subset would be left optional but I will not demonstrate that.
An example below demonstrates an item being moved from the first hotbar index, to the last index of the inventory, swapping with whatever item is there:
/modifyInventory *insert target* slot.hotbar 0 swap slot.inventory 26
Enchant syntax:
/modifyInventory *insert target* slot.inventory 8 enchant *enchantment* *power level*
Please sign in to leave a comment.
1 Comments