your current location:首页 > news>QD Res Loader MineCraft

QD Res Loader MineCraft

2024-12-15 02:43:05|Myriagame |source:minecraft skins

So, do you know that there is a very good, through hundreds of war, a fast resource loading system in QSL?It is used for each quilt module.If we can re -use this system instead of using a bloated, need Architectury API, over -processed, and very fragile systems, isn't it good?

This is the situation of this module -using the above functions to provide global resource loading.1.0 only includes the Java code of 10 lines, and also includes the beautification of the format!

 new file ("resources"). mkdirs (); for (var t: resourceType.Values ​​()) {resourceLoader.get (t) .getRegisterDefau ltresourcePackevent (). Register (CTX)-> {ctx.addresourcepack (New ModnioresourcePack ("QDRESLOADER Resources", mod.metadata (), null, resourcepackAtype.always_enabled, New file ("resources"). Topath (), t, null);});}

This is the power of using QSL resource loaders in the resource directory.You already know the format: the packet -related is placed in the data folder, and the resource packet -related is placed in the Assets folder.Maybe you have some compressed packs you don't want to extract, because you are using Packwiz to manage them to update the bags managed by others?It doesn't matter, just put them in the Packs folder.

The icon is provided by my (Unascripd) Gitea warehouse.

Note: "QD" in the title means "Quick and Dirty".

Minecraft images

The goal of MC Encyclopedia (MCMOD.CN) is to provide players with a better environment for MOD learning and research, and accept and cultivate more hardcore players.Provide Minecraft (Minecraft) MOD (module) item data introduction, tutorial strategy and MOD download, and is committed to improving the player's game experience.About the encyclopedia Encyclopedia help development log Donate Encyclopedia to follow the encyclopedia B station = "Fa Fa-Anagle-Right"> Opinions feedback Email © CopyRight Mc Encyclopedia 2013-2024 mcmod.cn |

Minecraft images

Minecraft images

In addition to other statements, MCMOD.CN, all open public editing content uses the BY-NC-SA 3.0 protocol.