Conversation
So bad. But it will help back port works MrCrayfish/Catalogue@4f71627
📦 Added missing background when no texture provided 📦 Icon will now be used if no banner texture is available 🎨 Changed missing banner 📦 Improved design ✨ Last search is now remembered when returning to menu MrCrayfish/Catalogue@6260949 MrCrayfish/Catalogue@37db432 MrCrayfish/Catalogue@c22fd3d MrCrayfish/Catalogue@6b11e0f MrCrayfish/Catalogue@3fcc8ed Also make the test mod a dummy. It is not loaded at all.
✨ Added tooltip to show numbers of mods/libraries 📦 Show "no mods" label when mod list is empty
|
The dummy catalogue mod should be removed since it is not a real mod. However, I haven't decided what to put in the upper-left corner yet. It is a button with link to the original Catalogue mod now. |
|
Some features like sorting from A-Z or Z-A and favourite system are not backported yet. Just because they need to be configured through a button list, which depends on the new layout system in modern minecraft. |
|
I see some resources you added look like come from Mojang, are they? |
Only the minecraft title does |
Move all the resources and java files to a separate path Load the dummy Catalogue mod, remove links
语言文件是因为 Catalogue 有单独的版本,便于同步内容,不然每次还得一次次改资源路径,图片之类的也同理。(当然 PR 合并之后就不需要了) |
|
Also, what happens to long credits? |
Move mouse on them and there will be a tooltip. |
|
很精致的菜单 |
|
Any progress on this? |
|
If possible, after CleanMix's PR is pulled in, I'd like the mod list to show mixin configurations for each mod, it should be easy. |
All the changes have been synced and I do not have any new ideas now. |
|
Should we wait for CleanMix or open another PR for mixin config feature after CleanMix merged? |
I'm fine with either way. It's up to you. |
Rongmario
left a comment
There was a problem hiding this comment.
Few things of note:
- Is
NotificationModUpdateScreenneeded on bothGuiMainMenuandGuiIngameMenu? - Ideally the textures for the GUIs can be combined (especially icons/checkboxes).
- Use the
cleanroomnamespace rather thancatalogue- Merge lang/textures from
catalogueintocleanroomnamespace
- Merge lang/textures from
- Unsure if we can distribute the Minecraft logo like that
- The platform service I'm unsure if needed, but we can leave it for now.
- Write credits in Cleanroom's mod meta/info:
Thanks to MrCrayFish for his Catalogue mod for the backbone of our revamped mod list screen.
| import org.jetbrains.annotations.NotNull; | ||
|
|
||
| @Config(modid = CatalogueConstants.MOD_ID) | ||
| public class CatalogueConfig { |
There was a problem hiding this comment.
Allow this to be part of Cleanroom's configurations, we'll need a cleanroom directory in configs, and this could be modlist.cfg, name can be change in the @Config annotation.
| public static ResourceLocation resource(String name) { | ||
| return new ResourceLocation(CatalogueConstants.MOD_ID, name); | ||
| } | ||
|
|
||
| public static ResourceLocation withDefaultNamespace(String name) { | ||
| return resource("textures/gui/sprites/" + name + ".png"); | ||
| } |
| ITEM_ICON_CACHE.put(this.data.getModId(), new ItemStack(Blocks.GRASS)); | ||
|
|
||
| // Minecraft is a grass block | ||
| if (this.data.getModId().equals("minecraft")) return new ItemStack(Blocks.GRASS); | ||
|
|
||
| // Special case for Forge to set item icon to anvil | ||
| if (this.data.getModId().equals("forge")) { | ||
| ItemStack anvil = new ItemStack(Blocks.ANVIL); | ||
| ITEM_ICON_CACHE.put("forge", anvil); | ||
| return anvil; | ||
| } |
There was a problem hiding this comment.
Don't cache these, it'll be fine.
src/main/java/com/cleanroommc/catalogue/client/screen/CatalogueModListScreen.java
Show resolved
Hide resolved
| CatalogueConstants.LOG.debug("Failed to draw icon for mod '{}'", this.data.getModId(), e); | ||
| ITEM_ICON_CACHE.put(this.data.getModId(), new ItemStack(Blocks.GRASS)); | ||
| this.icon = new ItemStack(Blocks.GRASS); |
There was a problem hiding this comment.
Fallback to new ItemStack(Blocks.COBBLESTONE)
src/main/java/com/cleanroommc/catalogue/client/screen/CatalogueModListScreen.java
Show resolved
Hide resolved
There was a problem hiding this comment.
There will be no need for this to be another mod, it'll be part of Cleanroom.
There was a problem hiding this comment.
There will be no need for this to be another mod, it'll be part of Cleanroom.
I didn't find a final LOGGER named Cleanroom or String "cleanroom". Where should I put them?
|
I agree with @Desoroxxx, though #313 and #319 will probably be superseded, but #321 should be integrated |
Also update some old links and add some new keys, copied from 1.20.1 forge toml.
|
Probably my last question, but, isn't this a ton of abstraction and complexity for what feels like just a simple mod list. The UI isn't doing something crazy here yet it's 5k LoC |
The core |
This PR replaces the old Forge mod list menu with a new design from MrCrayfish's Catalogue mod, which follows MIT llicense.
The menu supports:
Mod developers only need to add new keys in JSON format in the mcmod.info file. The new keys are as follows:
The menu can limit the size of logos(banners) and icons, which is configured disabled by default. Also it has the ability to perfrom filters and search for a mod's dependencies and dependants. The two lists of libraries(will be hidden by default and be displayed grey in mod list) and ignored dependencies are configurable too. There is also a favourite system, allowing you to pin mods and put them in the top of the list.
The empty keys in mcmod.info will not be displayed in the info side.