当前位置: 首页>>代码示例>>Java>>正文


Java FMLNetworkHandler.openGui方法代码示例

本文整理汇总了Java中cpw.mods.fml.common.network.FMLNetworkHandler.openGui方法的典型用法代码示例。如果您正苦于以下问题:Java FMLNetworkHandler.openGui方法的具体用法?Java FMLNetworkHandler.openGui怎么用?Java FMLNetworkHandler.openGui使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cpw.mods.fml.common.network.FMLNetworkHandler的用法示例。


在下文中一共展示了FMLNetworkHandler.openGui方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
/**
    * Called upon block activation (right click on the block.)
    */
@Override
   public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
   {
	if(!world.isRemote){
		if(world.getBlockMetadata(x, y, z) % 4 == 0 && !world.isBlockSolidOnSide(x, y + 1, z, DOWN))
			FMLNetworkHandler.openGui(player, StorageCraft.instance, 0, world, x, y, z);
		else if(world.getBlockMetadata(x, y, z) % 4 == 1 && !world.isBlockSolidOnSide(x, y + 1, z, DOWN))
			FMLNetworkHandler.openGui(player, StorageCraft.instance, 1, world, x, y, z);
		else if(world.getBlockMetadata(x, y, z) % 4 == 2 && !world.isBlockSolidOnSide(x, y + 1, z, DOWN))
			FMLNetworkHandler.openGui(player, StorageCraft.instance, 2, world, x, y, z);
		else if (world.getBlockMetadata(x, y, z) % 4 == 3 && !world.isBlockSolidOnSide(x, y + 1, z, DOWN))
			FMLNetworkHandler.openGui(player, StorageCraft.instance, 3, world, x, y, z);
	}
	
	return true;
   }
 
开发者ID:xandayn,项目名称:StorageCraft,代码行数:20,代码来源:BlockChestMulti.java

示例2: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z,
		EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	// We want the GUI opening to be handled on the serverside
	if (!world.isRemote) {

		/*
		 * Play to open GUI on, Mod instance, ID of the GUI, world of the
		 * player/world to open GUI, xyz coords of the block to open the GUI
		 * on
		 */
		FMLNetworkHandler.openGui(player, IceCraft.instance,
				Ids.refrigerator_gui, world, x, y, z);
	}
	// We want the GUI to open regardless whether it is the client or server
	return true;
}
 
开发者ID:Tommsy64,项目名称:Learning-to-Mod,代码行数:18,代码来源:Refrigerator.java

示例3: interactEvent

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
/**
 * For catching interactions with the Undertaker
 */
@ForgeSubscribe
public void interactEvent(EntityInteractEvent event)
{
    if (event.target instanceof EntityVillager && ((EntityVillager) event.target).getProfession() == BurialServices.getConfig().villagerID)
    {
        if (FMLCommonHandler.instance().getSide().isServer())
        {
            PacketDispatcher.sendPacketToPlayer(NetworkHelper.makeNBTPacket(BSConstants.CHANNEL_GRAVE_UPGRADE, MiscHelper.getPersistentDataTag(event.entityPlayer, BSConstants.NBT_PLAYER_GRAVE_DATA)), (Player) event.entityPlayer);
        }
        event.setCanceled(MinecraftServer.getServer().isSinglePlayer());
        FMLNetworkHandler.openGui(event.entityPlayer, BurialServices.instance, GuiHandler.undertakerID, event.entityPlayer.worldObj, 0, 0, 0);
    }
}
 
开发者ID:CCM-Modding,项目名称:CcmBurialServicesInc,代码行数:17,代码来源:EventHandler.java

示例4: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ){
	if(!world.isRemote){
		FMLNetworkHandler.openGui(player, RunesAndSilver.instance, RunesAndSilver.guiIdSilverFurnace, world, x, y, z);
	}
	
	
	return true;
}
 
开发者ID:MinecraftModArchive,项目名称:Runes-And-Silver,代码行数:9,代码来源:SilverFurnace.java

示例5: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
/**
 * Called upon block activation (right click on the block.)
 */
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int par6, float par7, float par8, float par9)
{
	if(!world.isRemote)
    {
    	FMLNetworkHandler.openGui(entityplayer, mod_Rediscovered.instance, mod_Rediscovered.guiIDLockedChest, world, x, y, z);
    }
    return true;   
}
 
开发者ID:Stormister,项目名称:Rediscovered-Mod-1.6.4,代码行数:12,代码来源:BlockLockedChest.java

示例6: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
{
	if (!world.isRemote){
		FMLNetworkHandler.openGui(player, KingdomKeys.instance, 0, world, x, y, z);
	}
	return true;
}
 
开发者ID:Wehavecookies56,项目名称:Kingdom-Keys,代码行数:8,代码来源:BlockSynthesis.java

示例7: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.ItemInserter, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:ItemInserter.java

示例8: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.PlayerLinkedBlock, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:PlayerLinkedBlock.java

示例9: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.Forge, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:Forge.java

示例10: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.Buffer, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:Buffer.java

示例11: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.VacuumChest, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:VacuumChest.java

示例12: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.SpecificItemInserter, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:SpecificItemInserter.java

示例13: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, TechnicalWizardry.instance, GuiIds.ItemMover, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:ItemMover.java

示例14: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
	if(!world.isRemote) {
		FMLNetworkHandler.openGui(player, ChemicalPhysics.instance, GuiIds.Electrolyser, world, x, y, z);
	}
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:Electrolyser.java

示例15: onBlockActivated

import cpw.mods.fml.common.network.FMLNetworkHandler; //导入方法依赖的package包/类
@Override
public boolean onBlockActivated(World world, int x, int y,int z, EntityPlayer player, int side, float hitx,	float hity, float hitz) {
	if(!world.isRemote){
		FMLNetworkHandler.openGui(player, RedstoneFluxControl.instance, Ids.guiControllerId, world, x, y, z);
	}		
	return true;
}
 
开发者ID:theflogat,项目名称:Theflogats-Mods,代码行数:8,代码来源:RFControllerBlock.java


注:本文中的cpw.mods.fml.common.network.FMLNetworkHandler.openGui方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。