-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use ModelLoadingPlugin to fix additional model loading in Fabric
- Loading branch information
1 parent
bde2ecc
commit 539a798
Showing
2 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
fabric/src/main/java/net/blay09/mods/balm/fabric/client/FabricBalmClient.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,16 +1,21 @@ | ||
package net.blay09.mods.balm.fabric.client; | ||
|
||
import net.blay09.mods.balm.api.Balm; | ||
import net.blay09.mods.balm.api.client.BalmClient; | ||
import net.blay09.mods.balm.api.event.client.DisconnectedFromServerEvent; | ||
import net.blay09.mods.balm.fabric.client.rendering.FabricBalmModels; | ||
import net.blay09.mods.balm.fabric.network.FabricBalmNetworking; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents; | ||
import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin; | ||
|
||
public class FabricBalmClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
ClientLifecycleEvents.CLIENT_STARTED.register(client -> FabricBalmNetworking.initializeClientHandlers()); | ||
|
||
Balm.getEvents().onEvent(DisconnectedFromServerEvent.class, event -> Balm.getConfig().resetToBackingConfigs()); | ||
|
||
ModelLoadingPlugin.register((FabricBalmModels) BalmClient.getModels()); | ||
} | ||
} |
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