當前位置: 首頁>>代碼示例>>Java>>正文


Java IReloadableResourceManager類代碼示例

本文整理匯總了Java中net.minecraft.client.resources.IReloadableResourceManager的典型用法代碼示例。如果您正苦於以下問題:Java IReloadableResourceManager類的具體用法?Java IReloadableResourceManager怎麽用?Java IReloadableResourceManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IReloadableResourceManager類屬於net.minecraft.client.resources包,在下文中一共展示了IReloadableResourceManager類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
public static void init()
{
    if (initialized)
        return;

    initialized = true;

    IResourceManager rm = Minecraft.getMinecraft().getResourceManager();
    if (rm instanceof IReloadableResourceManager)
    {
        ((IReloadableResourceManager) rm).registerReloadListener(__ ->
        {
            loadedModels.clear();
            reloadCount++;
        });
    }
}
 
開發者ID:BenjaminSutter,項目名稱:genera,代碼行數:18,代碼來源:ModelHandle.java

示例2: preInit

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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);
}
 
開發者ID:Alec-WAM,項目名稱:CrystalMod,代碼行數:19,代碼來源:ClientProxy.java

示例3: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
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");
}
 
開發者ID:MineLittlePony,項目名稱:MineLittlePony,代碼行數:18,代碼來源:MineLittlePony.java

示例4: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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);
}
 
開發者ID:MineLittlePony,項目名稱:MineLittlePony,代碼行數:21,代碼來源:LiteModHDSkinsMod.java

示例5: preInit

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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();
}
 
開發者ID:tiffit,項目名稱:TaleCraft,代碼行數:19,代碼來源:ClientProxy.java

示例6: postInit

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
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();
        }
    });
}
 
開發者ID:Dennisbonke,項目名稱:JABBA,代碼行數:24,代碼來源:ClientProxy.java

示例7: registerTileEntities

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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));
}
 
開發者ID:tyronx,項目名稱:vintagecraft,代碼行數:19,代碼來源:ClientProxy.java

示例8: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
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")));

    }
 
開發者ID:killjoy1221,項目名稱:TabbyChat-2,代碼行數:18,代碼來源:TabbyChat.java

示例9: postInit

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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");
});
  }
 
開發者ID:kenijey,項目名稱:harshencastle,代碼行數:11,代碼來源:ClientProxy.java

示例10: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void init(FMLInitializationEvent event) {
	super.init(event);
	
	((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(ShaderHandler.instance);
	ShaderHandler.instance.init();
}
 
開發者ID:the-realest-stu,項目名稱:Etheric,代碼行數:8,代碼來源:ClientProxy.java

示例11: init

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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();
}
 
開發者ID:ichttt,項目名稱:FirstAid,代碼行數:10,代碼來源:ClientProxy.java

示例12: registerFontRenderer

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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);
}
 
開發者ID:lukas2005,項目名稱:Device-Mod-Apps,代碼行數:10,代碼來源:Utils.java

示例13: registerEventHandler

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@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();
}
 
開發者ID:sameer,項目名稱:ExtraUtilities,代碼行數:16,代碼來源:ExtraUtilsClient.java

示例14: setFont

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
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);
}
 
開發者ID:Tencao,項目名稱:SAO-UI---1.8.8,代碼行數:12,代碼來源:GLCore.java

示例15: postInit

import net.minecraft.client.resources.IReloadableResourceManager; //導入依賴的package包/類
@Override
public void postInit(FMLPostInitializationEvent event) {
	super.postInit(event);
	if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager)
		((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);

}
 
開發者ID:TeamWizardry,項目名稱:TMT-Refraction,代碼行數:8,代碼來源:ClientProxy.java


注:本文中的net.minecraft.client.resources.IReloadableResourceManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。