本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例7: registerGUI
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
public static void registerGUI(IGuiHandler handler) {
NetworkRegistry.INSTANCE.registerGuiHandler(RorysMod.instance, handler);
}
示例8: addHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
public int addHandler(IGuiHandler handler) {
subHandlers.add(handler);
return subHandlers.size() - 1;
}
示例9: getHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
IGuiHandler getHandler() {
return guiHandler;
}
示例10: wrapHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
@Override
public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) {
return new ClientGuiHandler(modSpecificHandler);
}
示例11: wrapHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
@Override
public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) {
return new CommonGuiHandler(modSpecificHandler);
}
示例12: CommonGuiHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
public CommonGuiHandler(IGuiHandler wrappedHandler) {
this.wrappedHandler = wrappedHandler;
}
示例13: ClientGuiHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
public ClientGuiHandler(IGuiHandler wrappedHandler) {
super (wrappedHandler);
}
示例14: getGuiHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
@Override
public IGuiHandler getGuiHandler() {
return new GuiHandlerPipes();
}
示例15: getGuiHandler
import cpw.mods.fml.common.network.IGuiHandler; //导入依赖的package包/类
@Override
public IGuiHandler getGuiHandler() {
return new GuiHandlerFarming();
}