本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}