![]() ![]() The sourceset to run, commonly set to sourceSets.test The run directory for this configuration, relative to the root project directory. This will be overridden if using a mod loader with a fabric_installer.json file. The default main class of the run configuration. By default this is determined from the base name. The full name of the run configuration, i.e. The environment (or side) to run, usually client or server. Used to configure existing or new run configurations Highly experimental, fabric-loader does not support this option yet. When set the minecraft jar will be split into common and clientonly. ![]() When set only server related features and jars will be setup. When enabled log4j will only be on the runtime classpath, forcing the use of SLF4j. When enabled transitive access wideners will be applied from dependencies. When enabled the -dev jars in the *Elements configurations will be replaced by the remapped jars When enabled the output archives will be automatically remapped. Minecraft 1.18 (1.19 recommended), Loader 0.14 and Loom 1.0 or later are required to split the client and common code.ĪccessWidenerPath = file("src/main/resources/modid.accesswidener") This is also useful for some other complex multi-project setups. This enables Fabric Loader to group your mods classpath together. As your mod will now be split across two sourcesets, you will need to use the new DSL to define your mods sourcesets. The following snippet from a adle file shows how you can enable this for your mod. A single jar file that works on both the client and server is still built from the two sourcesets. This is done to provide a compile-time guarantee against calling client only Minecraft code or client only API on the server. The latest loom and loader verions provide an option to require all client code to be moved into its own sourceset. While leaving this unchanged is not dangerous for testing, remember to change it if you intend to release your project.For years a common source of server crashes has been from mods accidentally calling client only code when installed on a server. In Fabric Wiki, we use tutorial as the mod ID. Some of the starter tutorials will use a placeholder mod ID and register items and blocks under a placeholder namespace, and you can think of it as a starter template. This mod would register items and blocks using this mod ID as a registry namespace. Conventionally, a project named “My Project–” could be called myproject, my_project, or in some cases, my-project also works, but dashes in modids can be a slight pain to deal with at times. Additionally, a mod ID must consist of at least two characters.Ī mod ID is often a compact version of the name of the mod which makes it short but recognizable and prevents naming conflicts. For example, Minecraft uses the minecraft namespace. Mod IDs can consist only of lowercase characters a-z, numbers 0-9, and the symbols _. Mod IDs are commonly associated with identifier namespaces of the same name, and as such, follow the same restrictions. Mod ID stands for “Mod Identifier,” and it is a string that should uniquely identify your mod. Throughout the documentation, we'll often refer to a Mod ID, or modid in code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |