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


Java AppEngTileMissingException类代码示例

本文整理汇总了Java中appeng.api.exceptions.AppEngTileMissingException的典型用法代码示例。如果您正苦于以下问题:Java AppEngTileMissingException类的具体用法?Java AppEngTileMissingException怎么用?Java AppEngTileMissingException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getTile

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public T getTile() throws AppEngTileMissingException
{
	//World w = DimensionManager.getWorld( dimension );
	if (w.getChunkFromBlockCoords( x, z ).isChunkLoaded )
	{
		TileEntity te = w.getBlockTileEntity( x, y, z );
		if ( te != null )
		{
			try
			{
				T ttt = (T) te; // I have no idea if this causes the exception or not...
				return ttt;
			}
			catch( ClassCastException err )
			{
				
			}
		}
	}
	throw new AppEngTileMissingException( w, x,y,z);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:23,代码来源:TileRef.java

示例2: getTile

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public T getTile() throws AppEngTileMissingException
{
	// there might be a possible tick where we have TileRefs for unloaded tiles?
	if ( w.getChunkProvider().chunkExists(x >> 4, z >> 4) )
	{
		TileEntity te = w.getBlockTileEntity( x, y, z );
		if ( te != null && myType.isInstance( te ) )
			return (T)te;
	}
	
	/**
	 * was this a grid tile? if so inform the grid enum that something has derped.
	 */
	if ( wasGrid )
	{
		wasGrid = false; // no need to keep this up..
		MinecraftForge.EVENT_BUS.post( new GridTileUnloadEvent( null, w, this ) );
	}
	
	throw new AppEngTileMissingException( w, x,y,z);
}
 
开发者ID:Sunstrike,项目名称:BuildDimension,代码行数:23,代码来源:TileRef.java

示例3: requestFluid

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
public void requestFluid(FluidStack toOrder)
{
	ItemStack order = new ItemStack(ItemEnum.FLUIDDISPLAY.getItemInstance(), 1, toOrder.fluidID);
	ICraftingPattern pattern = grid.getPatternFor(order);
	System.out.println(pattern == null);
	try
	{
		grid.craftingRequest(order);/*
									 * / ITileCraftingProvider provider = pattern.getProviders().get(0); if (provider instanceof TileEntityInterfaceFluid) ((TileEntityInterfaceFluid) provider).orderFluid(toOrder);//
									 */
	} catch (AppEngTileMissingException wontHappen)
	{
	}
}
 
开发者ID:ExtraCells,项目名称:ExtraCells1,代码行数:15,代码来源:TileEntityTerminalFluid.java

示例4: craftingRequest

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
/**
 * Issue a new crafting request.
 * @param whatToCraft
 * @param showInMonitor
 * @param enableRecursion
 * @return the ICraftRequest
 * @throws AppEngTileMissingException
 */
public ICraftRequest craftingRequest( ItemStack whatToCraft, boolean showInMonitor, boolean enableRecursion ) throws AppEngTileMissingException;
 
开发者ID:Sunstrike,项目名称:BuildDimension,代码行数:10,代码来源:IGridInterface.java

示例5: craftGui

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
/**
 * opens the crafting gui.
 * @param pmp
 * @param gte
 * @param s
 * @throws AppEngTileMissingException
 */
public void craftGui( EntityPlayerMP pmp, IGridTileEntity gte, ItemStack s ) throws AppEngTileMissingException;
 
开发者ID:Sunstrike,项目名称:BuildDimension,代码行数:9,代码来源:IGridInterface.java

示例6: craftingRequest

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
public ICraftRequest craftingRequest( ItemStack what, boolean showInMonitor, boolean enableRecursion ) throws AppEngTileMissingException; 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:2,代码来源:IGridInterface.java

示例7: craftGui

import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
public void craftGui( EntityPlayerMP pmp, IGridTileEntity gte, ItemStack s ) throws AppEngTileMissingException; 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:2,代码来源:IGridInterface.java


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