当前位置: 首页>>代码示例>>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;未经允许,请勿转载。