Closed OpenBagTwo closed 1 year ago
Implementation idea:
place
creates a dictionary of links to their targetsinventory
operation then just queries the dictionaryOptional:
place
caches the dictionary in a hidden file (set to not be synced) in the EnderChest rootinventory
just queries the cacheThis would be less for performance reasons as to enable inventory
to give the information on the last place (to meet the use case of "I just updated my mods through PrismLauncher, and that deleted a bunch of symlinks, and now I'm trying to figure out where to put the new mod files"
Bonus:
--path
should support glob-style wildcards
GIVEN Steve has EnderChest set up on his system, linking multiple instances to multiple shulker boxes AND he wants to find which shulker box is providing a particular resource pack, world save or config file,
WHEN he opens a terminal, navigates to his minecraft root and runs the command:
(see notes for variations)
THEN he gets back a message:
regardless of whether the copy of "cool_resource_pack.zip" inside the "pretty resource packs" shulker box is itself a symlink,
BUT ONLY if the symlink into his instance isn't overwritten by a shulker box with a higher priority
SO that he doesn't have to go digging through the entire list of shulker boxes returned by
enderchest inventory shulker_box
to find the one providing that file when he wants to delete, replace or modify that fileGIVEN Narrator is wanting to replace a given mod, config or resource pack
AND wants to make sure that the change only propagates to the instances he wants
WHEN he opens a terminal, navigates to his minecraft root and runs the command:
(see notes for variations)
THEN he gets back a message:
where the list of instances only includes the instances where the symlink isn't overwritten by links to other higher priority boxes
SO that he knows whether he can safely replace the file in that box or whether he should do it in a box with higher (or lower) priority
Notes
This isn't quite as simple as reading each link's target, mostly because of the abspathing / full-link-resolving that EnderChest does by default.
Supported syntaxes
-p
should be accepted in place of--path
(I don't think it's being used for anything else)minecraft instance_name
andshulker_box box_name
were optional (or ignored with a warning) when an absolute/relative-to-minecraft-root-p
is given, but we'll see how gnarly that is