-
Notifications
You must be signed in to change notification settings - Fork 95
"improved" ordering of tags and pipe colors #1145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.21.x
Are you sure you want to change the base?
Conversation
| public class TagsToGenerate { | ||
|
|
||
| static final Map<TagKey<Item>, List<ItemLike>> tagToItemMap = new HashMap<>(); | ||
| static final Map<ItemLike, SortOrder> itemSortOrderMap = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The key should be Item not ItemLike, otherwise it might not be found in the map if queried with a different ItemLike that has the same Item.
| public static void generateTagNoTranslation(TagKey<Item> tag, ItemLike item, SortOrder sortOrder) { | ||
| tagToItemMap.computeIfAbsent(tag, t -> new ArrayList<>()).add(item); | ||
| if (sortOrder != null) { | ||
| itemSortOrderMap.put(item, sortOrder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item.asItem here
| generateTagNoTranslation(tag, item, null); | ||
| } | ||
|
|
||
| public static void generateTagNoTranslation(TagKey<Item> tag, ItemLike item, SortOrder sortOrder) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the param @nullable
results:

