本文整理汇总了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);
}
示例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);
}
示例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)
{
}
}
示例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;
示例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;
示例6: craftingRequest
import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
public ICraftRequest craftingRequest( ItemStack what, boolean showInMonitor, boolean enableRecursion ) throws AppEngTileMissingException;
示例7: craftGui
import appeng.api.exceptions.AppEngTileMissingException; //导入依赖的package包/类
public void craftGui( EntityPlayerMP pmp, IGridTileEntity gte, ItemStack s ) throws AppEngTileMissingException;