本文整理汇总了Java中appeng.api.config.AccessRestriction类的典型用法代码示例。如果您正苦于以下问题:Java AccessRestriction类的具体用法?Java AccessRestriction怎么用?Java AccessRestriction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AccessRestriction类属于appeng.api.config包,在下文中一共展示了AccessRestriction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTotalStored
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
public double getTotalStored() {
double nodePower = 0;
if (node != null) {
for (IGridNode n : node.getGrid().getNodes()) {
if (n != node) {
IGridHost host = n.getGridBlock().getMachine();
if (host instanceof IAEPowerStorage) {
IAEPowerStorage storage = (IAEPowerStorage) host;
if (storage.isAEPublicPowerStorage()
&& (storage.getPowerFlow() == AccessRestriction.READ || storage.getPowerFlow() == AccessRestriction.READ_WRITE))
nodePower += storage.getAECurrentPower();
}
}
}
}
return Math.min(getEnergyBuffer() + nodePower, getEnergyBufferSize());// FIXME
}
示例2: HandlerEssentiaStorageBusBase
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Creates the handler.
*
* @param part
*/
public HandlerEssentiaStorageBusBase( final PartEssentiaStorageBus part )
{
// Set the part
this.partStorageBus = part;
// Set to full read/write access.
this.access = AccessRestriction.READ_WRITE;
if( part != null )
{
// Set the source
this.machineSource = new MachineSource( part );
}
}
示例3: hasSecurityPermission
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
protected boolean hasSecurityPermission()
{
// Is our access restricted to read-only or no access?
if( ( this.access == AccessRestriction.READ ) || ( this.access == AccessRestriction.NO_ACCESS ) )
{
// Not allowed to insert
return false;
}
return true;
}
示例4: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
@Optional.Method(modid = ModIds.AE2)
public AccessRestriction getAccess(){
return AccessRestriction.READ;
}
示例5: getPowerFlow
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
public AccessRestriction getPowerFlow() {
return AccessRestriction.WRITE;
}
示例6: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
public AccessRestriction getAccess()
{
return getHandler().getAccess();
}
示例7: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
public AccessRestriction getAccess()
{
return this.getHandler().getAccess();
}
示例8: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
public AccessRestriction getAccess() {
return getHandler().getAccess();
}
示例9: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Returns the access restrictions, if any, imposed on the storage bus.
*/
@Override
public AccessRestriction getAccess()
{
return this.access;
}
示例10: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Mode required to access the cell.
*/
@Override
public AccessRestriction getAccess()
{
return AccessRestriction.READ_WRITE;
}
示例11: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
@Override
public AccessRestriction getAccess()
{
return AccessRestriction.READ_WRITE;
}
示例12: getPowerFlow
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Control the power flow by telling what the network can do, either add? or subtract? or both!
*
* @return access restriction what the network can do
*/
public AccessRestriction getPowerFlow();
示例13: getPowerFlow
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Control the power flow by telling what the network can do, either add? or
* subtract? or both!
*
* @return access restriction of network
*/
public AccessRestriction getPowerFlow(ItemStack is);
示例14: getAccess
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* determine if items can be injected/extracted.
*
* @return the access
*/
public AccessRestriction getAccess();
示例15: getPowerFlow
import appeng.api.config.AccessRestriction; //导入依赖的package包/类
/**
* Control the power flow by telling what the network can do, either add? or subtract? or both!
*
* @return
*/
public AccessRestriction getPowerFlow();