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


Java IEssentiaTransport类代码示例

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


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

示例1: fillJar

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
private void fillJar() {
    TileEntity te = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.DOWN);
    if (te != null) {
        IEssentiaTransport ic = (IEssentiaTransport) te;
        if (!ic.canOutputTo(ForgeDirection.UP)) {
            return;
        }
        Aspect ta = null;
        if (this.aspectFilter != null) {
            ta = this.aspectFilter;
        } else if ((this.aspect != null) && (this.amount > 0)) {
            ta = this.aspect;
        } else if ((ic.getEssentiaAmount(ForgeDirection.UP) > 0) &&
                (ic.getSuctionAmount(ForgeDirection.UP) < getSuctionAmount(ForgeDirection.DOWN)) && (getSuctionAmount(ForgeDirection.DOWN) >= ic.getMinimumSuction())) {
            ta = ic.getEssentiaType(ForgeDirection.UP);
        }
        if ((ta != null) && (ic.getSuctionAmount(ForgeDirection.UP) < getSuctionAmount(ForgeDirection.DOWN))) {
            addToContainer(ta, ic.takeEssentia(ta, 1, ForgeDirection.UP));
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:22,代码来源:TileBlockProtector.java

示例2: fillJar

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
private void fillJar() {
    ForgeDirection inputDir = placedOn.getOpposite();

    TileEntity te = ThaumcraftApiHelper.getConnectableTile(parent.getWorldObj(), parent.xCoord, parent.yCoord, parent.zCoord, inputDir);
    if (te != null)
    {
        IEssentiaTransport ic = (IEssentiaTransport)te;
        if (!ic.canOutputTo(ForgeDirection.DOWN)) {
            return;
        }
        Aspect ta = null;
        if (parent.aspectFilter != null) {
            ta = parent.aspectFilter;
        } else if ((parent.aspect != null) && (parent.amount > 0)) {
            ta = parent.aspect;
        } else if ((ic.getEssentiaAmount(inputDir.getOpposite()) > 0) &&
                (ic.getSuctionAmount(inputDir.getOpposite()) < getSuctionAmount(ForgeDirection.UP)) && (getSuctionAmount(ForgeDirection.UP) >= ic.getMinimumSuction())) {
            ta = ic.getEssentiaType(inputDir.getOpposite());
        }
        if ((ta != null) && (ic.getSuctionAmount(inputDir.getOpposite()) < getSuctionAmount(ForgeDirection.UP))) {
            addToContainer(ta, ic.takeEssentia(ta, 1, inputDir.getOpposite()));
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:25,代码来源:TileStickyJar.java

示例3: getNeighborWantedAspect

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
protected Aspect getNeighborWantedAspect( final ForgeDirection side )
{
	// Get the tile entity next to this side
	TileEntity neighbor = this.worldObj.getTileEntity( this.xCoord + side.offsetX, this.yCoord + side.offsetY, this.zCoord + side.offsetZ );

	// Do we have essentia transport neighbor?
	if( ( neighbor != null ) && ( neighbor instanceof IEssentiaTransport ) )
	{
		// Get the aspect they want
		Aspect wantedAspect = ( (IEssentiaTransport)neighbor ).getSuctionType( side.getOpposite() );

		// Return the aspect they want
		return wantedAspect;
	}

	return null;
}
 
开发者ID:Nividica,项目名称:ThaumicEnergistics,代码行数:18,代码来源:TileEssentiaProvider.java

示例4: getConnectableTile

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
public static TileEntity getConnectableTile(World world, int x, int y, int z, ForgeDirection face) {
	TileEntity te = world.getTileEntity(x + face.offsetX, y + face.offsetY, z + face.offsetZ);
	if ( (te instanceof IEssentiaTransport) && ((IEssentiaTransport) te).isConnectable(face.getOpposite())) {
		return te;
	}
	else {
		return null;
	}
}
 
开发者ID:PrincessRTFM,项目名称:TweakCraft,代码行数:10,代码来源:ThaumcraftApiHelper.java

示例5: getConnectableTile

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
public static TileEntity getConnectableTile(World world, int x, int y, int z, ForgeDirection face) {
	TileEntity te = world.getTileEntity(x+face.offsetX, y+face.offsetY, z+face.offsetZ);
	if (te instanceof IEssentiaTransport && ((IEssentiaTransport)te).isConnectable(face.getOpposite())) 
		return te;
	else
		return null;
}
 
开发者ID:Brandomine,项目名称:Augury,代码行数:8,代码来源:ThaumcraftApiHelper.java

示例6: handleIO

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
private void handleIO() {
    if ((!worldObj.isRemote) && ((ticksExisted & 15) == 0) && (getEssentiaAmount() < getMaxAmount())) {
        TileEntity te = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.DOWN);
        if (te != null) {
            IEssentiaTransport ic = (IEssentiaTransport) te;
            if (!ic.canOutputTo(ForgeDirection.UP)) {
                return;
            }

            if ((holdingAspect != null) && (ic.getSuctionAmount(ForgeDirection.UP) < getSuctionAmount(ForgeDirection.DOWN))) {
                addToContainer(holdingAspect, ic.takeEssentia(holdingAspect, 1, ForgeDirection.UP));
            }
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:16,代码来源:TileAuraPylon.java

示例7: handleIO

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
private void handleIO() {
    if (storedAmount < MAX_AMT) {
        TileEntity te = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.UP);
        if (te != null) {
            IEssentiaTransport ic = (IEssentiaTransport) te;
            if (!ic.canOutputTo(ForgeDirection.DOWN)) {
                return;
            }

            if (ic.getSuctionAmount(ForgeDirection.DOWN) < getSuctionAmount(ForgeDirection.UP)) {
                addToContainer(Aspect.ENTROPY, ic.takeEssentia(Aspect.ENTROPY, 1, ForgeDirection.DOWN));
            }
        }
    }
}
 
开发者ID:makeoo,项目名称:Gadomancy,代码行数:16,代码来源:TileAIShutdown.java

示例8: getConnectableTile

import thaumcraft.api.aspects.IEssentiaTransport; //导入依赖的package包/类
public static TileEntity getConnectableTile(World world, int x, int y, int z, ForgeDirection face) {
    TileEntity te = world.getTileEntity(x + face.offsetX, y + face.offsetY, z + face.offsetZ);
    if (te instanceof IEssentiaTransport && ((IEssentiaTransport) te).isConnectable(face.getOpposite())) {
        return te;
    } else {
        return null;
    }
}
 
开发者ID:AgileMods,项目名称:MateriaMuto,代码行数:9,代码来源:ThaumcraftApiHelper.java


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