mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +01:00
Fix crash during datagen
This commit is contained in:
parent
9870431db8
commit
5a621bbea4
@ -75,8 +75,12 @@ public class CreateClient {
|
|||||||
ZAPPER_RENDER_HANDLER.registerListeners(forgeEventBus);
|
ZAPPER_RENDER_HANDLER.registerListeners(forgeEventBus);
|
||||||
POTATO_CANNON_RENDER_HANDLER.registerListeners(forgeEventBus);
|
POTATO_CANNON_RENDER_HANDLER.registerListeners(forgeEventBus);
|
||||||
|
|
||||||
IResourceManager resourceManager = Minecraft.getInstance()
|
Minecraft mc = Minecraft.getInstance();
|
||||||
.getResourceManager();
|
|
||||||
|
// null during datagen
|
||||||
|
if (mc == null) return;
|
||||||
|
|
||||||
|
IResourceManager resourceManager = mc.getResourceManager();
|
||||||
if (resourceManager instanceof IReloadableResourceManager)
|
if (resourceManager instanceof IReloadableResourceManager)
|
||||||
((IReloadableResourceManager) resourceManager).registerReloadListener(RESOURCE_RELOAD_LISTENER);
|
((IReloadableResourceManager) resourceManager).registerReloadListener(RESOURCE_RELOAD_LISTENER);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user