-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
232 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 13 additions & 6 deletions
19
src/main/java/io/github/ennuil/boring_default_game_rules/events/LoadConfigEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
package io.github.ennuil.boring_default_game_rules.events; | ||
|
||
import org.quiltmc.loader.api.ModContainer; | ||
import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer; | ||
import org.quiltmc.qsl.base.api.entrypoint.server.DedicatedServerModInitializer; | ||
import io.github.ennuil.boring_default_game_rules.config.JsonSerializer; | ||
import io.github.ennuil.boring_default_game_rules.wrench_wrapper.WrenchWrapper; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.api.DedicatedServerModInitializer; | ||
|
||
import io.github.ennuil.boring_default_game_rules.config.ModConfigManager; | ||
import net.fabricmc.api.ModInitializer; | ||
|
||
public class LoadConfigEvent implements ClientModInitializer, DedicatedServerModInitializer { | ||
public class LoadConfigEvent implements ModInitializer, ClientModInitializer, DedicatedServerModInitializer { | ||
@Override | ||
public void onInitializeClient(ModContainer mod) { | ||
public void onInitialize() { | ||
WrenchWrapper.getConfigEnvironment().registerSerializer(JsonSerializer.INSTANCE); | ||
} | ||
|
||
@Override | ||
public void onInitializeClient() { | ||
ModConfigManager.init(true); | ||
} | ||
|
||
@Override | ||
public void onInitializeServer(ModContainer mod) { | ||
public void onInitializeServer() { | ||
ModConfigManager.init(false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.