AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Minecraft loom swat1/6/2024 ![]() Remap a mod from maven and apply to gradle's runtimeOnly configuration Remap a mod from maven and apply to gradle's compileOnlyApi configuration Remap a mod from maven and apply to gradle's compileOnly configuration Remap a mod from maven and apply to gradle's api configuration (Minor detail: it's not exactly applied *to* the configuration, but a clone of it intended for mod dependencies) Remap a mod from maven and apply to gradle's implementation configuration NOTE: Parchment maven must be manually added. Layered mappings using official mojang mappings and parchment. When enabled nested jars will be included with the output jar. Add a nested mod jar to this task, the include configuration should be used for maven libraries and mods. Add additional jar files to the remap classpath, also valid for remapSourcesJar Set the target namespace, also valid for remapSourcesJar Set the source namespace, also valid for remapSourcesJar ![]() Set the input jar for the task, also valid for remapSourcesJar Create modExampleImplementation and related configurations that remap mods.ĬreateRemapConfigurations(sourceSets.example) When using split sources you should add the main and client sourceset This mods block is used group mods that are made up of multiplue classpath entries. This provides compile time safety for accessing client only code. Splits the Minecraft jar and incoming dependencies across the main (common) and client only sourcesets. When enabled injected interfaces from dependecies will be applied.ĮnableDependencyInterfaceInjection = true Set the maximum number of threads that the decompiler can use. Set the amount of memory in meagabytes used when forking the JVM Pass additional options to the decompiler Configure a default decompiler, either cfr or fernflower See for options to add additional sourcesets When disabled tiny remapper will be used to remap Mixins instead of the AP. Used to configure mixin options or apply to additional source sets. Configure all run configs to generate ide run configurations. Example of removing the built-in server configuration Copies settings from another run configuration. Example of creating a basic run config for tests Configure run config with the default server options. Configure run config with the default client options. By default only set to true for the root project. When true a run configuration file will be generated for IDE's. 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. For years a common source of server crashes has been from mods accidentally calling client only code when installed on a server. ![]()
0 Comments
Read More
Leave a Reply. |