Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #3145 JEI fails to load on Forge server
- Loading branch information
Showing
2 changed files
with
28 additions
and
2 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
26 changes: 26 additions & 0 deletions
26
Forge/src/main/java/mezz/jei/forge/JustEnoughItemsClientSafeRunner.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package mezz.jei.forge; | ||
|
||
import mezz.jei.common.config.IServerConfig; | ||
import mezz.jei.forge.events.PermanentEventSubscriptions; | ||
import mezz.jei.forge.network.NetworkHandler; | ||
|
||
public class JustEnoughItemsClientSafeRunner { | ||
private final NetworkHandler networkHandler; | ||
private final PermanentEventSubscriptions subscriptions; | ||
private final IServerConfig serverConfig; | ||
|
||
public JustEnoughItemsClientSafeRunner( | ||
NetworkHandler networkHandler, | ||
PermanentEventSubscriptions subscriptions, | ||
IServerConfig serverConfig | ||
) { | ||
this.networkHandler = networkHandler; | ||
this.subscriptions = subscriptions; | ||
this.serverConfig = serverConfig; | ||
} | ||
|
||
public void registerClient() { | ||
JustEnoughItemsClient jeiClient = new JustEnoughItemsClient(networkHandler, subscriptions, serverConfig); | ||
jeiClient.register(); | ||
} | ||
} |