Java 类net.minecraft.client.resources.IReloadableResourceManager 实例源码

项目:genera    文件:ModelHandle.java   
public static void init()
{
    if (initialized)
        return;

    initialized = true;

    IResourceManager rm = Minecraft.getMinecraft().getResourceManager();
    if (rm instanceof IReloadableResourceManager)
    {
        ((IReloadableResourceManager) rm).registerReloadListener(__ ->
        {
            loadedModels.clear();
            reloadCount++;
        });
    }
}
项目:CrystalMod    文件:ClientProxy.java   
@Override
public void preInit(FMLPreInitializationEvent e) {
    super.preInit(e);
    ModItems.initClient();
    ModelLoaderRegistry.registerLoader(new BakedModelLoader());
    ModelLoaderRegistry.registerLoader(ModelSeed.LoaderSeeds.INSTANCE);
    ModelLoaderRegistry.registerLoader(ModelWrappedFood.LoaderWrappedFood.INSTANCE);
    IResourceManager manager = FMLClientHandler.instance().getClient().getResourceManager();
    if(manager !=null && manager instanceof IReloadableResourceManager){
        ((IReloadableResourceManager)manager).registerReloadListener(new GuidePageLoader());
        ((IReloadableResourceManager)manager).registerReloadListener(this);
    }
    MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
    MinecraftForge.EVENT_BUS.register(new DisguiseClientHandler());
    ModBlocks.initClient();
    ModEntites.initClient();
    OBJLoader.INSTANCE.addDomain(CrystalMod.MODID);
}
项目:MineLittlePony    文件:MineLittlePony.java   
void init() {
    LiteLoader.getInput().registerKeyBinding(SETTINGS_GUI);

    this.config = new PonyConfig();
    this.ponyManager = new PonyManager(config);

    LiteLoader.getInstance().registerExposable(config, null);

    IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
    irrm.registerReloadListener(this.ponyManager);

    MetadataSerializer ms = Minecraft.getMinecraft().getResourcePackRepository().rprMetadataSerializer;
    ms.registerMetadataSectionType(new PonyDataSerialzier(), IPonyData.class);

    // This also makes it the default gateway server.
    SkinServer.defaultServers.add("legacy:http://minelpskins.voxelmodpack.com;http://minelpskinmanager.voxelmodpack.com");
}
项目:MineLittlePony    文件:LiteModHDSkinsMod.java   
@Override
public void init(File configPath) {

    // register config
    LiteLoader.getInstance().registerExposable(this, null);

    // try it initialize voxelmenu button
    try {
        Class<?> ex = Class.forName("com.thevoxelbox.voxelmenu.GuiMainMenuVoxelBox");
        Method mRegisterCustomScreen = ex.getDeclaredMethod("registerCustomScreen", Class.class, String.class);
        mRegisterCustomScreen.invoke(null, GuiSkins.class, "HD Skins Manager");
    } catch (ClassNotFoundException var4) {
        // voxelmenu's not here, man
    } catch (Exception var5) {
        var5.printStackTrace();
    }

    IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
    irrm.registerReloadListener(HDSkinManager.INSTANCE);
}
项目:TaleCraft    文件:ClientProxy.java   
@Override
public void preInit(FMLPreInitializationEvent event) {
    super.preInit(event);

    settings.init();

    MinecraftForge.EVENT_BUS.register(this);

    clientKeyboardHandler = new ClientKeyboardHandler(this);
    TaleCraftClientCommands.init();

    IReloadableResourceManager resManager = (IReloadableResourceManager) mc.getResourceManager();
    resManager.registerReloadListener(this);

    clientTickQeue = new ConcurrentLinkedDeque<Runnable>();
    clientRenderer = new ClientRenderer(this);
    clientRenderer.preInit();
}
项目:JABBA    文件:ClientProxy.java   
public void postInit()
{
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
        private boolean ranOnce = false;

        public void onResourceManagerReload(IResourceManager resourcemanager) {
            if (!this.ranOnce) {
                this.ranOnce = true;
                return;
            }
            StructuralLevelClientData.loadBaseTextureData();
            if (StructuralLevel.LEVELS != null) {
                for (StructuralLevel level : StructuralLevel.LEVELS) {
                    if (level.levelNum != 0) {
                        level.clientData.generateIcons();
                        StringTranslate.inject(new ByteArrayInputStream(("item.upgrade.structural." + String.valueOf(level.levelNum) + ".name=" + StatCollector.translateToLocal("item.upgrade.structural") + " " + Utils.romanNumeral(level.levelNum) + " (" + level.clientData.getMaterialName() + ")").getBytes()));
                    }
                }
            }
            StructuralLevelClientData.unloadBaseTextureData();
        }
    });
}
项目:vintagecraft    文件:ClientProxy.java   
@Override
public void registerTileEntities() {
    super.registerTileEntities();

    IReloadableResourceManager IRRM = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
    IRRM.registerReloadListener(this);

    RenderManager rm = Minecraft.getMinecraft().getRenderManager();

    RenderingRegistry.registerEntityRenderingHandler(EntityStone.class, new RenderEntityStone());
    RenderingRegistry.registerEntityRenderingHandler(EntityMobHorse.class, new RenderHorse(rm, new ModelHorse(), 0.75f));       
    RenderingRegistry.registerEntityRenderingHandler(EntityForestSpider.class, new RenderForestSpider(rm));
    RenderingRegistry.registerEntityRenderingHandler(EntityCoalPoweredMinecartVC.class, new RenderMinecart(rm));
    RenderingRegistry.registerEntityRenderingHandler(EntityEmptyMinecartVC.class, new RenderMinecart(rm));

    RenderingRegistry.registerEntityRenderingHandler(EntityCowVC.class, new RenderCow(rm, new ModelCowVC(), 0.7F));
    RenderingRegistry.registerEntityRenderingHandler(EntitySheepVC.class, new RenderSheep(rm, new ModelSheep2(), 0.7F));
}
项目:TabbyChat-2    文件:TabbyChat.java   
public void init() {

        // Set global settings
        settings = new TabbySettings();
        LiteLoader.getInstance().registerExposable(settings, null);

        spellcheck = new Spellcheck(getDataFolder());

        // Keeps the current language updated whenever it is changed.
        IReloadableResourceManager irrm = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
        irrm.registerReloadListener(spellcheck);

        bus.register(new ChatAddonAntiSpam());
        bus.register(new FilterAddon());
        bus.register(new ChatLogging(new File("logs/chat")));

    }
项目:harshencastle    文件:ClientProxy.java   
@Override
  public void postInit(FMLPostInitializationEvent event) 
  {
    super.postInit(event);
    ((IReloadableResourceManager)  Minecraft.getMinecraft().getResourceManager()).registerReloadListener(resourceManager -> {
    HarshenAPIHandler.register();
    CauldronBlock.registerModels();
    HarshenCastle.LOGGER.info("All recipes loaded");
});
  }
项目:Etheric    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent event) {
    super.init(event);

    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(ShaderHandler.instance);
    ShaderHandler.instance.init();
}
项目:FirstAid    文件:ClientProxy.java   
@Override
public void init() {
    FirstAid.logger.debug("Loading ClientProxy");
    MinecraftForge.EVENT_BUS.register(ClientEventHandler.class);
    ClientRegistry.registerKeyBinding(showWounds);
    GuiIngameForge.renderHealth = FirstAidConfig.overlay.showVanillaHealthBar;
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(manager -> HUDHandler.rebuildTranslationTable());
    EventCalendar.checkDate();
}
项目:Device-Mod-Apps    文件:Utils.java   
@SideOnly(Side.CLIENT)
public static void registerFontRenderer(Minecraft mc, FontRenderer renderer) throws Exception {
    if (mc.gameSettings.language != null) {
        renderer.setUnicodeFlag(mc.isUnicode());
        renderer.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
    }

    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(renderer);
}
项目:ExtraUtilities    文件:ExtraUtilsClient.java   
@Override
public void registerEventHandler() {
    MinecraftForge.EVENT_BUS.register((Object)new EventHandlerClient());
    FMLCommonHandler.instance().bus().register((Object)new EventHandlerClient());
    ((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener((IResourceManagerReloadListener)new LiquidColorRegistry());
    ((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener((IResourceManagerReloadListener)new ParticleHelperClient());
    ExtraUtils.handlesClientMethods = true;
    if (Loader.isModLoaded("ForgeMultipart")) {
        RenderBlockConnectedTextures.fakeRender = new FakeRenderBlocksMultiPart();
    }
    ClientCommandHandler.instance.registerCommand((ICommand)new CommandHologram());
    ClientCommandHandler.instance.registerCommand((ICommand)new CommandUUID());
    KeyHandler.INSTANCE.register();
    super.registerEventHandler();
}
项目:SAO-UI---1.8.8    文件:GLCore.java   
public static void setFont(Minecraft mc, boolean custom) {
    if (mc.fontRendererObj == null) return;
    ResourceLocation fontLocation = custom? new ResourceLocation(SAOCore.MODID, "textures/ascii.png"): new ResourceLocation("textures/font/ascii.png");
    GameSettings gs = mc.gameSettings;
    mc.fontRendererObj = new FontRenderer(gs, fontLocation, mc.getTextureManager(), false);
    if (gs.language != null) {
        mc.fontRendererObj.setUnicodeFlag(mc.isUnicode());
        mc.fontRendererObj.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
    }
    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(mc.fontRendererObj);
}
项目:TMT-Refraction    文件:ClientProxy.java   
@Override
public void postInit(FMLPostInitializationEvent event) {
    super.postInit(event);
    if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager)
        ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);

}
项目:SAO-UI---1.8    文件:GLCore.java   
public static void setFont(Minecraft mc, boolean custom) {
    if (mc.fontRendererObj == null) return;
    ResourceLocation fontLocation = custom? new ResourceLocation(SAOCore.MODID, "textures/ascii.png"): new ResourceLocation("textures/font/ascii.png");
    GameSettings gs = mc.gameSettings;
    mc.fontRendererObj = new FontRenderer(gs, fontLocation, mc.getTextureManager(), false);
    if (gs.language != null) {
        mc.fontRendererObj.setUnicodeFlag(mc.isUnicode());
        mc.fontRendererObj.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
    }
    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(mc.fontRendererObj);
}
项目:SAO-UI---1.8.8    文件:GLCore.java   
public static void setFont(Minecraft mc, boolean custom) {
    if (mc.fontRendererObj == null) return;
    ResourceLocation fontLocation = custom? new ResourceLocation(SAOCore.MODID, "textures/ascii.png"): new ResourceLocation("textures/font/ascii.png");
    GameSettings gs = mc.gameSettings;
    mc.fontRendererObj = new FontRenderer(gs, fontLocation, mc.getTextureManager(), false);
    if (gs.language != null) {
        mc.fontRendererObj.setUnicodeFlag(mc.isUnicode());
        mc.fontRendererObj.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
    }
    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(mc.fontRendererObj);
}
项目:enhancedportals    文件:ProxyClient.java   
public static boolean resourceExists(String file) {
    IReloadableResourceManager resourceManager = (IReloadableResourceManager) FMLClientHandler.instance().getClient().getResourceManager();

    try {
        resourceManager.getResource(new ResourceLocation(EPMod.ID, file));
        return true;
    } catch (Exception e) {
        return false;
    }
}
项目:SAO-UI---1.8    文件:GLCore.java   
public static void setFont(Minecraft mc, boolean custom) {
    if (mc.fontRendererObj == null) return;
    ResourceLocation fontLocation = custom? new ResourceLocation(SAOCore.MODID, "textures/ascii.png"): new ResourceLocation("textures/font/ascii.png");
    GameSettings gs = mc.gameSettings;
    mc.fontRendererObj = new FontRenderer(gs, fontLocation, mc.getTextureManager(), false);
    if (gs.language != null) {
        mc.fontRendererObj.setUnicodeFlag(mc.isUnicode());
        mc.fontRendererObj.setBidiFlag(mc.getLanguageManager().isCurrentLanguageBidirectional());
    }
    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(mc.fontRendererObj);
}
项目:MiscUtils    文件:LocalizationUpdater.java   
@SideOnly(Side.CLIENT)
public void registerListener() {
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
        @Override
        public void onResourceManagerReload(IResourceManager resourceManager) {
            LocalizationUpdater.this.loadLangFiles();
        }
    });
}
项目:lib-colladamodel    文件:ModColladaModel.java   
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
    AdvancedModelLoader.registerModelHandler(new ColladaModelLoader());
    if (event.getSide() == Side.CLIENT) {
        modelManager = new ModelManager();

        ((IReloadableResourceManager) Minecraft.getMinecraft()
                .getResourceManager()).registerReloadListener(modelManager);
    }
}
项目:D3Core    文件:LanguageHelper.java   
public static void run()
{
    //noinspection NullableProblems
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener()
    {
        @Override
        public void onResourceManagerReload(IResourceManager resourceManager)
        {
            D3LanguageInjectEvent event = new D3LanguageInjectEvent();
            MinecraftForge.EVENT_BUS.post(event);
            LanguageMap.replaceWith(event.map);
        }
    });
}
项目:Farrago    文件:ClientProxy.java   
@Override
public void init() {
    //new PaneVanityArmor().autoOverlay(GuiInventory.class);
    //new PaneToolsOverlay().autoOverlay(GuiMainMenu.class);
    new PaneOrbGlow().autoOverlay(GuiIngame.class);
    if (FarragoMod.showBrand && StringUtils.isNotBlank(FarragoMod.brand)) {
        new PaneBranding().autoOverlay(GuiMainMenu.class);
    }
    RenderingRegistry.registerEntityRenderingHandler(EntityBlunderbussProjectile.class, new RenderBlunderbussProjectile());
    RenderingRegistry.registerEntityRenderingHandler(EntityRifleProjectile.class, new RenderNull());
    MinecraftForgeClient.registerItemRenderer(FarragoMod.RIFLE, new RifleItemRenderer());
    MinecraftForgeClient.registerItemRenderer(FarragoMod.UNDEFINED, new UndefinedItemRenderer());
    prevHotbar = new KeyBinding("key.farrago.utility_belt.prev_hotbar", Keyboard.KEY_MINUS, "key.categories.farrago.utility_belt");
    nextHotbar = new KeyBinding("key.farrago.utility_belt.next_hotbar", Keyboard.KEY_EQUALS, "key.categories.farrago.utility_belt");
    renameHotbar = new KeyBinding("key.farrago.utility_belt.rename_hotbar", Keyboard.KEY_BACK, "key.categories.farrago.utility_belt");
    lockSlot = new KeyBinding("key.farrago.utility_belt.lock_slot", Keyboard.KEY_0, "key.categories.farrago.utility_belt");
    ClientRegistry.registerKeyBinding(prevHotbar);
    ClientRegistry.registerKeyBinding(nextHotbar);
    ClientRegistry.registerKeyBinding(renameHotbar);
    ClientRegistry.registerKeyBinding(lockSlot);
    FarragoMod.lightPipeRenderType = RenderingRegistry.getNextAvailableRenderId();
    FarragoMod.machineRenderType = RenderingRegistry.getNextAvailableRenderId();
    RenderingRegistry.registerBlockHandler(new LightPipeBlockRenderer());
    RenderingRegistry.registerBlockHandler(new MachineBlockRenderer());
    IResourceManager manager = Minecraft.getMinecraft().getResourceManager();
    if (manager instanceof IReloadableResourceManager) {
        ((IReloadableResourceManager)manager).registerReloadListener(new Encyclopedia());
    }
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(this);
    UtilityBeltRenderer.showSwapSpace = FarragoMod.config.getBoolean("debug.showSwapSpace");
}
项目:CosmeticArmor    文件:LocalizationUpdater.java   
@SideOnly(Side.CLIENT)
public void registerListener() {
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(new IResourceManagerReloadListener() {
        @Override
        public void onResourceManagerReload(IResourceManager resourceManager) {
            LocalizationUpdater.this.loadLangFiles();
        }
    });
}
项目:Dendrology    文件:ClientRenderProxy.java   
@Override
public void postInit()
{
    final IResourceManager resourceManager = Minecraft.getMinecraft().getResourceManager();
    if (resourceManager instanceof IReloadableResourceManager)
    {
        // These casts are bad, but we don't have another way to do this.
        ((IReloadableResourceManager) resourceManager).registerReloadListener(AcemusColorizer.INSTANCE);
        ((IReloadableResourceManager) resourceManager).registerReloadListener(CerasuColorizer.INSTANCE);
        ((IReloadableResourceManager) resourceManager).registerReloadListener(KulistColorizer.INSTANCE);
    }
}
项目:ShadowsOfPhysis    文件:ClientProxy.java   
@Override
public void init(FMLInitializationEvent event) {
    super.init(event);
    PhysisIntegration.initStart(event, true);
    ClientProxy.runeFontRenderer = new RuneFontRenderer();
    ClientProxy.bookFontRenderer = new BookFontRenderer();
    ClientProxy.bookRuneFontRenderer = new BookRuneFontRenderer();
    IResourceManager m = Minecraft.getMinecraft().getResourceManager();
    if (m instanceof IReloadableResourceManager) {
        ((IReloadableResourceManager)m).registerReloadListener(ClientProxy.runeFontRenderer);
        ((IReloadableResourceManager)m).registerReloadListener(ClientProxy.bookFontRenderer);
        ((IReloadableResourceManager)m).registerReloadListener(ClientProxy.bookRuneFontRenderer);
    }
    EncryptionSymbol.init();

    FMLCommonHandler.instance().bus().register(new ClientTickHandler());
    MinecraftForge.EVENT_BUS.register(new TextureMapHandler());
    MinecraftForge.EVENT_BUS.register(new TooltipHandler());
    //MinecraftForge.EVENT_BUS.register(new BlockHighlightHandler());

    RenderingRegistry.registerBlockHandler(new RenderDigSite(RenderingRegistry.getNextAvailableRenderId()));
    RenderingRegistry.registerBlockHandler(new RenderSocketTable(RenderingRegistry.getNextAvailableRenderId()));

    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDigSite.class, new RenderTileDigSite());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySocketTable.class, new RenderTileSocketTable());

    MinecraftForgeClient.registerItemRenderer(PhysisItems.socketable, new RenderSocketable());

    ShaderHelper.initShaders();
    PhysisArtifacts.clientInit();

    // make sure it doesn't come out null in that little while before loading.
    StoryEngine.reload(-1, true);

    PhysisIntegration.initEnd(event, true);
}
项目:Extra-Food    文件:OBJRender.java   
public static void init()
{
    IResourceManager rm = Minecraft.getMinecraft().getResourceManager();
    if (rm instanceof IReloadableResourceManager)
    {
        ((IReloadableResourceManager) rm).registerReloadListener(new IResourceManagerReloadListener()
        {
            @Override
            public void onResourceManagerReload(IResourceManager ignored)
            {
                loadedModels.clear();
            }
        });
    }
}
项目:Battlegear2    文件:BattlegearClientEvents.java   
private BattlegearClientEvents(){
    inGameGUI = new BattlegearInGameGUI();
    quiverModel = new QuiverModel();
    quiverDetails = new ResourceLocation("battlegear2", "textures/armours/quiver/quiver_details.png");
    quiverBase = new ResourceLocation("battlegear2", "textures/armours/quiver/quiver_base.png");
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
}
项目:OpenModsLib    文件:OpenClientProxy.java   
@Override
public void preInit() {
    ClientCommandHandler.instance.registerCommand(new CommandConfig("om_config_c", false));
    ClientCommandHandler.instance.registerCommand(new CommandSource("om_source_c", false, OpenMods.instance.getCollector()));
    ClientCommandHandler.instance.registerCommand(new CommandGlDebug());

    if (LibConfig.enableCalculatorCommands) {
        final ICommandComponent commandRoot = new CommandCalcFactory(new File(getMinecraftDir(), "scripts")).getRoot();
        ClientCommandHandler.instance.registerCommand(new CommandCalc(commandRoot, "config"));
        ClientCommandHandler.instance.registerCommand(new CommandCalc(commandRoot, "eval", "="));
        ClientCommandHandler.instance.registerCommand(new CommandCalc(commandRoot, "fun"));
        ClientCommandHandler.instance.registerCommand(new CommandCalc(commandRoot, "let"));
        ClientCommandHandler.instance.registerCommand(new CommandCalc(commandRoot, "execute"));
    }

    RenderUtils.registerFogUpdater();

    MinecraftForge.EVENT_BUS.register(new BlockSelectionHandler());

    ModelLoaderRegistry.registerLoader(MappedModelLoader.builder()
            .put("with-dependencies", ModelWithDependencies.EMPTY)
            .put("multi-layer", MultiLayerModel.EMPTY)
            .put("variantmodel", VariantModel.EMPTY_MODEL)
            .put("textureditem", TexturedItemModel.INSTANCE)
            .put("stateitem", ItemStateModel.EMPTY)
            .put("eval", EvalModel.EMPTY)
            .put("eval-expand", EvalExpandModel.EMPTY)
            .put("perspective-aware", PerspectiveAwareModel.EMPTY)
            .build(OpenMods.MODID));

    ((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener(hitboxManager);

    FramebufferBlitter.setup();
}
项目:Solar    文件:ClientProxy.java   
public static void registerResourceReloadListener(IResourceManagerReloadListener listener) {
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager())
            .registerReloadListener(listener);
}
项目:Adventurers-Toolbox    文件:ExtraBlockBreakHandler.java   
private ExtraBlockBreakHandler(Minecraft mcIn) {
    this.mc = mcIn;
    this.renderEngine = mcIn.getTextureManager();
    ((IReloadableResourceManager) mc.getResourceManager()).registerReloadListener(this);
}
项目:CustomWorldGen    文件:ModelLoaderRegistry.java   
public static void registerLoader(ICustomModelLoader loader)
{
    loaders.add(loader);
    ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(loader);
}
项目:ExtraUtilities    文件:TConTextureResourcePackBase.java   
public void register() {
    final List<IResourcePack> packs = this.getiResourcePacks();
    packs.add((IResourcePack)this);
    ((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener((IResourceManagerReloadListener)this);
    LogHelper.info("Registered TCon Resource Pack (" + this.name + ") - " + this.getClass().getSimpleName(), new Object[0]);
}
项目:Wizardry    文件:ClientProxy.java   
@Override
public void postInit(FMLPostInitializationEvent event) {
    super.postInit(event);
    if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager)
        ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
}
项目:Controller-Support    文件:TextureHelper.java   
private static TextureHelper loadFromJSON(IResourceManager manager, ResourceLocation location) throws IOException{
    TextureHelper helper = loadInternal(manager, location);
    ((IReloadableResourceManager) manager).registerReloadListener(helper);
    return helper;
}
项目:vintagetg    文件:ClientProxy.java   
@Override
public void registerRenderInformation() {

    IReloadableResourceManager IRRM = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
    IRRM.registerReloadListener(this);  
}
项目:Ingens    文件:IngensFontRenderer.java   
public IngensFontRenderer() {
    super(Minecraft.getMinecraft().gameSettings, new ResourceLocation(ModRef.MOD_ID + ":textures/font/item_font.png"), Minecraft.getMinecraft().renderEngine, false);
    IReloadableResourceManager resourceManager = (IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager();
    resourceManager.registerReloadListener(this);
}
项目:EnderCore    文件:RenderUtil.java   
public static void registerReloadListener(IResourceManagerReloadListener obj) {
  ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(obj);
}
项目:FatCatMOD    文件:CatSkinLoader.java   
public CatSkinLoader() {
    skinMap = new HashMap<String, String>();
    skinTypes = new ArrayList<String>();
    ((IReloadableResourceManager)Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
}
项目:ISBRH    文件:ISBRH.java   
@EventHandler
public void init(FMLInitializationEvent event)
{
    if (exempleEnabled)
    {
        logger.info("Registering ISBRH Block Exemple...");
        testId = RenderRegistry.getNextAvailableRenderId();
        GameRegistry.registerBlock(test, "test");
        RenderRegistry.registerBlockHandler(new RenderExample());
        RenderRegistry.registerTextureHandler((ITextureHandler) test);
    }

    Minecraft mc = Minecraft.getMinecraft();

    // Prerequisite
    ModelManager modelManager = ObfuscationReflectionHelper
            .getPrivateValue(Minecraft.class, mc, "aL", "field_175617_aL",
                    "modelManager");
    RenderManager renderManager = mc.getRenderManager();
    IReloadableResourceManager resourceManager = ((IReloadableResourceManager) mc
            .getResourceManager());

    // Render Item Hook
    RenderItem item = new RenderItemISBRH(mc.getTextureManager(),
            modelManager, mc.getRenderItem());
    ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc, item,
            "X", "field_175621_X", "renderItem");
    ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc,
            new ItemRenderer(mc), "Y", "field_175620_Y", "itemRenderer");
    renderManager.entityRenderMap.remove(EntityItem.class);
    renderManager.entityRenderMap.put(EntityItem.class,
            new RenderEntityItem(renderManager, item));
    renderManager.entityRenderMap.remove(EntityItemFrame.class);
    renderManager.entityRenderMap.put(EntityItemFrame.class,
            new RenderItemFrame(renderManager, item));
    mc.entityRenderer = new EntityRenderer(mc, resourceManager);

    // Render Block Dispatcher Hook
    BlockRendererDispatcher rendererDispatcher = new ISBRHDispatcher(
            mc.getBlockRendererDispatcher(), modelManager.getBlockModelShapes(), mc.gameSettings);
    ObfuscationReflectionHelper.setPrivateValue(Minecraft.class, mc,
            rendererDispatcher, "aM", "field_175618_aM",
            "blockRenderDispatcher");

    // Register Reload Listeners
    resourceManager.registerReloadListener(rendererDispatcher);
    resourceManager.registerReloadListener(item);
    resourceManager.registerReloadListener(mc.entityRenderer);

}