net.fabricmc.fabric.api.resource.ResourceManagerHelper Java Examples

The following examples show how to use net.fabricmc.fabric.api.resource.ResourceManagerHelper. 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: MineLittlePony.java    From MineLittlePony with MIT License 6 votes vote down vote up
@Override
public void onInitializeClient() {
    hasHdSkins = FabricLoader.getInstance().isModLoaded("hdskins");
    hasModMenu = FabricLoader.getInstance().isModLoaded("modmenu");

    config = new ClientPonyConfig(GamePaths.getConfigDirectory().resolve("minelp.json"));
    ponyManager = new PonyManager(config);

    KeyBindingHelper.registerKeyBinding(keyBinding);

    ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(ponyManager);

    // convert legacy pony skins
    SkinFilterCallback.EVENT.register(new LegacySkinConverter());

    // general events
    ClientReadyCallback.Handler.register();
    ClientTickCallback.EVENT.register(this::onTick);
    ClientReadyCallback.EVENT.register(this::onClientReady);
    ScreenInitCallback.EVENT.register(this::onScreenInit);
    config.ponyskulls.onChanged(PonySkullRenderer::resolve);

    config.load();

    ModelType.bootstrap();
}
 
Example #2
Source File: TheHallowClient.java    From the-hallow with MIT License 5 votes vote down vote up
@Override
public void onInitializeClient() {
	HallowedEntityRenderers.init();
	HallowedBlockEntityRenderers.init();
	HallowedRenderLayers.init();
	HallowedClientNetworking.init();
	HallowedColors.init();

	ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(new FluidResourceLoader());
}
 
Example #3
Source File: LibGuiClient.java    From LibGui with MIT License 4 votes vote down vote up
@Override
public void onInitializeClient() {
	config = loadConfig();

	ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(NinePatch.MetadataLoader.INSTANCE);
}