Search in sources :

Example 1 with PlaceholderRenderFactory

use of betterquesting.client.renderer.PlaceholderRenderFactory in project BetterQuesting by Funwayguy.

the class ClientProxy method registerHandlers.

@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
public void registerHandlers() {
    super.registerHandlers();
    // MinecraftForge.EVENT_BUS.register(new UpdateNotification());
    MinecraftForge.EVENT_BUS.register(PEventBroadcaster.INSTANCE);
    ExpansionLoader.INSTANCE.initClientAPIs();
    MinecraftForge.EVENT_BUS.register(new QuestNotification());
    BQ_Keybindings.RegisterKeys();
    try {
        ArrayList list = ObfuscationReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "defaultResourcePacks", "field_110449_ao");
        QuestResourcesFolder qRes1 = new QuestResourcesFolder();
        QuestResourcesFile qRes2 = new QuestResourcesFile();
        list.add(qRes1);
        list.add(qRes2);
        // Make sure the pack(s) are visible to everything
        ((SimpleReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).reloadResourcePack(qRes1);
        // Make sure the pack(s) are visible to everything
        ((SimpleReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).reloadResourcePack(qRes2);
    } catch (Exception e) {
        BetterQuesting.logger.log(Level.ERROR, "Unable to install questing resource loaders", e);
    }
    RenderingRegistry.registerEntityRenderingHandler(EntityPlaceholder.class, new PlaceholderRenderFactory());
    ToolboxRegistry.INSTANCE.registerToolbox(ToolboxTabMain.instance);
}
Also used : QuestResourcesFile(betterquesting.misc.QuestResourcesFile) PlaceholderRenderFactory(betterquesting.client.renderer.PlaceholderRenderFactory) ArrayList(java.util.ArrayList) QuestResourcesFolder(betterquesting.misc.QuestResourcesFolder) SimpleReloadableResourceManager(net.minecraft.client.resources.SimpleReloadableResourceManager) QuestNotification(betterquesting.client.QuestNotification)

Aggregations

QuestNotification (betterquesting.client.QuestNotification)1 PlaceholderRenderFactory (betterquesting.client.renderer.PlaceholderRenderFactory)1 QuestResourcesFile (betterquesting.misc.QuestResourcesFile)1 QuestResourcesFolder (betterquesting.misc.QuestResourcesFolder)1 ArrayList (java.util.ArrayList)1 SimpleReloadableResourceManager (net.minecraft.client.resources.SimpleReloadableResourceManager)1