
Modrinth · Minecraft mod
Conditional Proxy Mod Initializers
A simple library for running a proxy Fabric initializer if a required mod exists
Quick answer
Which Conditional Proxy Mod Initializers release matches 1.19.4 Fabric?
Conditional Proxy Mod Initializers 1.0 targets 1.14, 1.14.1, 1.14.2 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.
Where it goes
Is Conditional Proxy Mod Initializers required on the client, server, or both?
Installation on the client is optional. Installation on the dedicated server is optional.
The source marks this as usable on both the client and server.
What else does Conditional Proxy Mod Initializers 1.0 need?
1.0 on 1.19.4 Fabric. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Conditional Proxy Mod Initializers without breaking your instance.
Built for Conditional Proxy Mod Initializers 1.0 on 1.19.4 Fabric. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.0. It targets 1.14, 1.14.1, 1.14.2 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
Installation on the client is optional. Installation on the dedicated server is optional.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.0. It opens that exact file at the source.
About this project
What does Conditional Proxy Mod Initializers add?
A simple 5-class mod which adds support for initializing code depending on if a specific mod exists.
This mod will always load last, so there is no need to worry about race conditions due to mod load order.
Code and variables must be available before or during any mod initialization stages
(ie cannot be done on datapack reload for example)
Usage:
// Inside main ModInitializer, ClientModInitializer, or any class that gets called at some point during Fabric init
// For running an instance of a ModInitializer:
ConditionalModInitializer myConditionalModInitializer = new ConditionalModInitializer.Builder().mods("some-mod").initializer(SomeOtherInitializer.class).build();
// For running any unspecified code:
ConditionalModInitializer myConditionalRunner = new ConditionalModInitializer.Builder().mods("some-other-mod").found(() -> {
// Code goes here
}).build();
public void onInitialize() {
ConditionalModInitializer.create().mods("some_mod").required_mods("some_other_dependency_mod").initializer(AnotherInitializer.class).build();
}
- NOTE: new ConditionalModInitializer.Builder() MUST be assigned to a variable, or be called inside a function to work! Static declaration (
static{}will NOT work!)
Docs:
ConditionalModInitializer
create()-> Returns a new Builder() instance. (Same as runningnew ConditionalModInitializer.Builder())mods()-> List : Returns the list of any mod that is required for this initializerrequired_mods()-> List : Returns list of all required mods for this initializercan_run-> Boolean : Whether or not the initializer has ran yetenvironment()-> ExtendedEnvType : Returns the environment (initializer type) for this initializerExtendedEnvType.CLIENT: ClientModInitializerExtendedEnvType.SERVER: ModInitializerExtendedEnvType.DEDICATED_SERVER: DedicatedServerModInitializer
on_found()-> Runnable : Returns the function to call when a required mod is found
ConditionalModInitializer.Builder
mods(String...): Appends to the list of mods that will allow this initializer to runrequired_mods(String...): Appends to the list of required mods for this initializerenvironment(ExtendedEnvType): Sets the environment of the initializer (Default:ExtendedEnvType.SERVER: ModInitializer)found(Runnable): Code to execute if the mod is foundinitializer(Class<ModInitializer>): Initializer to run if the mod is foundmainInitializer(Class<ModInitializer>): Initializer to run if the mod is foundclientInitializer(Class<ClientModInitializer>): Initializer to run if the mod is foundserverInitializer(Class<DedicatedServerModInitializer>): Initializer to run if the mod is foundbuild(): Returns the finalized ConditionalModInitializer
Project description from Modrinth.
Pick your setup
Conditional Proxy Mod Initializers by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.20.6
1 loader build1.20.5
1 loader build1.20.4
1 loader build1.20.3
1 loader build1.20.2
1 loader build1.20.1
1 loader build1.20
1 loader build1.19.4
1 loader build1.19.3
1 loader build1.19.2
1 loader build1.19.1
1 loader buildShowing the newest 12 of 32 game versions. Older files are in the list below.
Check the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Conditional Proxy Mod Initializers versions and loaders
1.0
mod-proxy-initializers-1.0.jar
10 Jul 2024
Looking for an older file? The official Modrinth project page is in Resources.