Java Code Examples for net.minecraftforge.fml.DistExecutor#runForDist()

The following examples show how to use net.minecraftforge.fml.DistExecutor#runForDist() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CodeChickenLib.java    From CodeChickenLib with GNU Lesser General Public License v2.1 5 votes vote down vote up
public CodeChickenLib() {
    proxy = DistExecutor.runForDist(() -> ProxyClient::new, () -> Proxy::new);
    FMLJavaModLoadingContext.get().getModEventBus().register(this);
    DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
        FMLJavaModLoadingContext.get().getModEventBus().addListener(OpenGLUtils::onModelRegistryEvent);
    });
}
 
Example 2
Source File: EnderStorage.java    From EnderStorage with MIT License 4 votes vote down vote up
public EnderStorage() {
    proxy = DistExecutor.runForDist(() -> ProxyClient::new, () -> Proxy::new);
    FMLJavaModLoadingContext.get().getModEventBus().register(this);
    EnderStorageConfig.load();
}