本文整理匯總了Java中cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui方法的典型用法代碼示例。如果您正苦於以下問題:Java FMLNetworkHandler.openGui方法的具體用法?Java FMLNetworkHandler.openGui怎麽用?Java FMLNetworkHandler.openGui使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cpw.mods.fml.common.network.internal.FMLNetworkHandler
的用法示例。
在下文中一共展示了FMLNetworkHandler.openGui方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (!par5EntityPlayer.isSneaking())
{
if (par5EntityPlayer.inventory.getCurrentItem() != null && par5EntityPlayer.inventory.getCurrentItem().getItem() == RivalRebels.pliers)
{
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, x, y, z);
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.nuclearBombGuiID, par1World, x, y, z);
}
else if (!par1World.isRemote)
{
par5EntityPlayer.addChatMessage(new ChatComponentText("§7[§4Orders§7] §cUse pliers to open."));
}
}
return false;
}
示例2: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
try{if(!w.isRemote){
TileEntity tile = w.getTileEntity(x, y, z);
if(tile!=null && tile instanceof TEPipe){
ItemStack heldItem = player.inventory.mainInventory[player.inventory.currentItem].copy();
if(heldItem != null && heldItem.getItem() instanceof ItemWrench){
if(heldItem.getItemDamage()<1){
if(((TEPipe)tile).itemMod[side].canChange(w, x, y, z, SIDE.getDirFromSide(side)))
FMLNetworkHandler.openGui(player, SmartLines.instance, side, w, x, y, z);
}else{
((TEPipe)tile).itemMod[side].nextMode(w, x, y, z, SIDE.getDirFromSide(side));
player.addChatComponentMessage(new ChatComponentText(((TEPipe)tile).itemMod[side].modes.toString()));
}
return true;
}
}
}}catch(Exception e){}
return false;
}
示例3: onBlockActivated
import cpw.mods.fml.common.network.internal.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) {
return true;
} else if (!player.isSneaking()) {
TileEntityEssenceAltar entity = (TileEntityEssenceAltar) world
.getTileEntity(x, y, z);
if (entity != null) {
FMLNetworkHandler.openGui(player, GaiaMod.instance,
ModGui.guiIDEssenceAltar, world, x, y, z);
}
return true;
} else {
return false;
}
}
示例4: onBlockActivated
import cpw.mods.fml.common.network.internal.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) {
return true;
} else if (!player.isSneaking()) {
TileEntityOrderShrine entity = (TileEntityOrderShrine) world
.getTileEntity(x, y, z);
if (entity != null) {
FMLNetworkHandler.openGui(player, GaiaMod.instance,
ModGui.guiIDOrderShrine, world, x, y, z);
}
return true;
} else {
return false;
}
}
示例5: interactFirst
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
@Override
public boolean interactFirst(EntityPlayer player)
{
if (player.isSneaking() && !player.worldObj.isRemote)
{
FMLNetworkHandler.openGui(player, RivalRebels.instance, 0, player.worldObj, 0, 0, 0);
// player.openGui(RivalRebels.instance, RivalRebels.rrchestGuiID, player.worldObj, 0, 0, 0);
}
if (!player.isSneaking() && player.inventory.addItemStackToInventory(new ItemStack(RivalRebels.controller)))
{
player.swingItem();
setDead();
}
return true;
}
示例6: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int x, int y, int z, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (par5EntityPlayer.inventory.getCurrentItem() != null && par5EntityPlayer.inventory.getCurrentItem().getItem() == RivalRebels.pliers)
{
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, x, y, z);
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.tsarguiID, par1World, x, y, z);
}
else if (!par1World.isRemote)
{
par5EntityPlayer.addChatMessage(new ChatComponentText("§7[§4Orders§7] §cUse pliers to open."));
}
return false;
}
示例7: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (!par1World.isRemote)
{
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.recieverGuiID, par1World, par2, par3, par4);
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, par2, par3, par4);
}
RivalRebelsSoundPlayer.playSound(par1World, 10, 3, par2, par3, par4);
return true;
}
示例8: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (!par1World.isRemote)
{
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, par2, par3, par4);
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.tokamakID, par1World, par2, par3, par4);
}
RivalRebelsSoundPlayer.playSound(par1World, 10, 3, par2, par3, par4);
return true;
}
示例9: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (!par1World.isRemote)
{
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, par2, par3, par4);
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.rrchestGuiID, par1World, par2, par3, par4);
}
RivalRebelsSoundPlayer.playSound(par1World, 10, 3, par2, par3, par4);
return true;
}
示例10: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
/**
* Called upon block activation (right click on the block.)
*/
@Override
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
((TileEntityLaptop) par1World.getTileEntity(par2, par3, par4)).refreshTasks();
if (!par1World.isRemote)
{
FMLNetworkHandler.openGui(par5EntityPlayer, RivalRebels.instance, 0, par1World, par2, par3, par4);
// par5EntityPlayer.openGui(RivalRebels.instance, RivalRebels.rrchestGuiID, par1World, par2, par3, par4);
}
RivalRebelsSoundPlayer.playSound(par1World, 10, 3, par2, par3, par4);
return true;
}
示例11: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(final World world, final int x, final int y, final int z, final EntityPlayer entityPlayer, final int side, final float hitX, final float hitY, final float hitZ)
{
if (!world.isRemote)
FMLNetworkHandler.openGui(entityPlayer, Avaritiaddons.instance, Avaritiaddons.GUI_ID_INFINITY_CHEST, world, x, y, z);
return true;
}
示例12: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float f2, float f3) {
if (!world.isRemote) {
FMLNetworkHandler.openGui(player, FissionWarfare.instance, 0, world, x, y, z);
}
return true;
}
示例13: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World w, int x, int y, int z, EntityPlayer p, int i, float f, float f2, float f3) {
Location loc = new Location(w, x, y, z);
Location tileLoc = loc.add(loc.getMetadata(), true);
if (!w.isRemote) {
FMLNetworkHandler.openGui(p, FissionWarfare.instance, 0, tileLoc.world, tileLoc.x, tileLoc.y, tileLoc.z);
}
return true;
}
示例14: onBlockActivated
import cpw.mods.fml.common.network.internal.FMLNetworkHandler; //導入方法依賴的package包/類
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int metadata, float hitX, float hitY, float hitZ) {
if (!world.isRemote) {
FMLNetworkHandler.openGui(player, RorysMod.instance, RorysMod.GUIS.RILE_TABLE.ordinal(), world, x, y, z);
}
return true;
}
示例15: onBlockActivated
import cpw.mods.fml.common.network.internal.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){
return true;
} else if(!player.isSneaking()) {
TileEntityToolsCompressor te = (TileEntityToolsCompressor) world.getTileEntity(x, y, z);
if(te != null){
FMLNetworkHandler.openGui(player, MainToolsCompressor.instance, MainToolsCompressor.guiIdToolsCompressor, world, x, y, z);
}
return true;
} else {
return false;
}
}