Add Wild Cards for Item Names in Custom Rules.txt files
astridos2go opened this issue · 8 comments
Hi, I am using Inventory Profiles Next, and I have been trying to mess with the custom rules files.
My goal is to make shulker boxes sort in a rainbow order, as opposed to the default color order that Minecraft has. However, I think it would be preferable to just have a rule that sorts an item by its color in that order.
I have been messing around with my rules.txt file, and have been wondering if there exists a wildcard character at all. As I would like to prevent from defining the list as:
@default
red_shulker_box
orange_shulker_box
yellow_shulker_box
...
and so on and so forth.
I'd much rather prefer to have something like:
red_*
orange_*
yellow_*
...
This would be preferred also, because then I could use it as a sub_rule for sorting within other methods of sorting.
So far, I've tried both the *
and ~
characters, but neither seemed to work, so I would like to suggest that this be added if possible.
Otherwise, if there already exists a way to accomplish this, or there's something I'm missing, I'd be more than happy to hear the better way to do it!
Thank you so much!
I will check if this is even possible but I wouldn't count on it.
The rule processor it self can't be made to handle wildcards but may be it will be possible to expand them during loading.
我会检查这是否可能,但我不会指望它。规则处理器本身不能用于处理通配符,但可以在加载过程中扩展它们。
Have you considered giving up text editing and directly introducing GUI configuration editing.
How about letting the player open the box and manually place items in the game, then click save, and hand over the configuration to the computer?
@PeakXing,
Of course I have! However making rich GUI in minecraft requires lots of time that I don't have.
Also it might be doable for the Profiles config but not for the sorting rules. The level of abstraction required for them will make the GUI even more complex the writing a text file.
@PeakXing,我当然有!然而,在我的世界中制作丰富的GUI需要很多时间,而我没有。此外,它可能适用于配置文件配置,但不适用于排序规则。它们所需的抽象级别将使GUI在编写文本文件时更加复杂。
好吧,我以为可以通过GUI界面进行处理,排序规则,我只是想把潜影盒放在箱子里面物品的最下面一排,我并不知道配置文件要如何编写
I don't understand Mandarin
Well, I thought I could handle sorting rules and other operations through the GUI interface, I just want to put the shulker box in the bottom row of the items in the box, I don't know how to write the configuration file.
Well currently it's not possible to make the sorting put stuff separate from all the other
The best I can offer is the file below. It will put the shulkers first
@MySort
@all_boxes
::by_nbt(nbt_path = CustomModelData, not_found = last)
::has_custom_name
@default
@all_boxes
shulker_box
black_shulker_box
blue_shulker_box
brown_shulker_box
cyan_shulker_box
gray_shulker_box
green_shulker_box
light_blue_shulker_box
light_gray_shulker_box
lime_shulker_box
magenta_shulker_box
orange_shulker_box
pink_shulker_box
purple_shulker_box
red_shulker_box
white_shulker_box
yellow_shulker_box