本文整理匯總了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();
}