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


Java IGuiHandler類代碼示例

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


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

示例1: init

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
public void init(final FMLInitializationEvent event) {
    NetworkRegistry.INSTANCE.registerGuiHandler((Object)ExtraUtilsMod.instance, (IGuiHandler)new GuiHandler());
    if (Loader.isModLoaded("ForgeMultipart")) {
        this.FMPRegisterPassThroughInterfaces();
    }
    ExtraUtilsMod.proxy.registerEventHandler();
    ExtraUtilsMod.proxy.registerRenderInformation();
    if (Loader.isModLoaded("ThermalExpansion")) {
        TE4IMC.addIntegration();
    }
    if (Loader.isModLoaded("MineFactoryReloaded")) {
        MFRIntegration.registerMFRIntegration();
    }
    for (final ILoading loader : this.loaders) {
        loader.init();
    }
    EE3Integration.finalRegister();
}
 
開發者ID:sameer,項目名稱:ExtraUtilities,代碼行數:19,代碼來源:ExtraUtils.java

示例2: nextID

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
static private int nextID() {

    try {
      Field field = EnderIO.guiHandler.getClass().getDeclaredField("guiHandlers");
      field.setAccessible(true);
      Map<Integer, IGuiHandler> guiHandlers = (Map<Integer, IGuiHandler>) field.get(EnderIO.guiHandler);

      while (++lastId > 0) {
        if (!guiHandlers.containsKey(lastId)) {
          return lastId;
        }
      }

    } catch (Exception e) {
      throw new RuntimeException(e);
    }

    return -1;
  }
 
開發者ID:HenryLoenwind,項目名稱:EnderIOAddons,代碼行數:20,代碼來源:GuiIds.java

示例3: getClientGuiElement

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

	if (id < GuiId.values().length) {
		switch (GuiId.values()[id]) {

		case SolderingIronGUI:
			return new GuiSolderingIron(player.inventory, new SolderingInventory());

		default:
			for (IGuiHandler handler : PluginManager.guiHandlers) {
				Object element = handler.getClientGuiElement(id, player, world, x, y, z);
				if (element != null)
					return element;
			}

			return null;
		}
	}

	return null;
}
 
開發者ID:ForestryMC,項目名稱:ForestryLegacy,代碼行數:23,代碼來源:GuiHandler.java

示例4: getServerGuiElement

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) {

	if (id < GuiId.values().length) {
		switch (GuiId.values()[id]) {

		case SolderingIronGUI:
			return new ContainerSolderingIron(player.inventory, new SolderingInventory());

		default:
			for (IGuiHandler handler : PluginManager.guiHandlers) {
				Object element = handler.getServerGuiElement(id, player, world, x, y, z);
				if (element != null)
					return element;
			}

			return null;

		}
	}

	return null;
}
 
開發者ID:ForestryMC,項目名稱:ForestryLegacy,代碼行數:24,代碼來源:GuiHandler.java

示例5: getServerGuiElement

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z){
    for(IThirdParty thirdParty : thirdPartyMods) {
        if(thirdParty instanceof IGuiHandler) {
            Object obj = ((IGuiHandler)thirdParty).getServerGuiElement(ID, player, world, x, y, z);
            if(obj != null) return obj;
        }
    }
    return null;
}
 
開發者ID:MineMaarten,項目名稱:PneumaticCraft,代碼行數:11,代碼來源:ThirdPartyManager.java

示例6: getClientGuiElement

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z){
    for(IThirdParty thirdParty : thirdPartyMods) {
        if(thirdParty instanceof IGuiHandler) {
            Object obj = ((IGuiHandler)thirdParty).getClientGuiElement(ID, player, world, x, y, z);
            if(obj != null) return obj;
        }
    }
    return null;
}
 
開發者ID:MineMaarten,項目名稱:PneumaticCraft,代碼行數:11,代碼來源:ThirdPartyManager.java

示例7: registerGUI

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
public static void registerGUI(IGuiHandler handler) {
	NetworkRegistry.INSTANCE.registerGuiHandler(RorysMod.instance, handler);
}
 
開發者ID:roryclaasen,項目名稱:RorysMod,代碼行數:4,代碼來源:Register.java

示例8: addHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
public int addHandler(IGuiHandler handler) {
    subHandlers.add(handler);
    return subHandlers.size() - 1;
}
 
開發者ID:LambdaInnovation,項目名稱:LambdaLib,代碼行數:5,代碼來源:GuiHandlerRegistration.java

示例9: getHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
IGuiHandler getHandler() {
    return guiHandler;
}
 
開發者ID:LambdaInnovation,項目名稱:LambdaLib,代碼行數:4,代碼來源:GuiHandlerBase.java

示例10: wrapHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) {
    return new ClientGuiHandler(modSpecificHandler);
}
 
開發者ID:awesommist,項目名稱:DynamicLib,代碼行數:5,代碼來源:DynamicClientProxy.java

示例11: wrapHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) {
    return new CommonGuiHandler(modSpecificHandler);
}
 
開發者ID:awesommist,項目名稱:DynamicLib,代碼行數:5,代碼來源:DynamicServerProxy.java

示例12: CommonGuiHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
public CommonGuiHandler(IGuiHandler wrappedHandler) {
    this.wrappedHandler = wrappedHandler;
}
 
開發者ID:awesommist,項目名稱:DynamicLib,代碼行數:4,代碼來源:CommonGuiHandler.java

示例13: ClientGuiHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
public ClientGuiHandler(IGuiHandler wrappedHandler) {
    super (wrappedHandler);
}
 
開發者ID:awesommist,項目名稱:DynamicLib,代碼行數:4,代碼來源:ClientGuiHandler.java

示例14: getGuiHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public IGuiHandler getGuiHandler() {
	return new GuiHandlerPipes();
}
 
開發者ID:ForestryMC,項目名稱:ForestryLegacy,代碼行數:5,代碼來源:PluginPropolisPipe.java

示例15: getGuiHandler

import cpw.mods.fml.common.network.IGuiHandler; //導入依賴的package包/類
@Override
public IGuiHandler getGuiHandler() {
	return new GuiHandlerFarming();
}
 
開發者ID:ForestryMC,項目名稱:ForestryLegacy,代碼行數:5,代碼來源:PluginForestryFarming.java


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