本文整理汇总了Java中appeng.api.config.AccessRestriction.READ_WRITE属性的典型用法代码示例。如果您正苦于以下问题:Java AccessRestriction.READ_WRITE属性的具体用法?Java AccessRestriction.READ_WRITE怎么用?Java AccessRestriction.READ_WRITE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类appeng.api.config.AccessRestriction
的用法示例。
在下文中一共展示了AccessRestriction.READ_WRITE属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTotalStored
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
/**
* 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: getAccess
/**
* Mode required to access the cell.
*/
@Override
public AccessRestriction getAccess()
{
return AccessRestriction.READ_WRITE;
}
示例4: getAccess
@Override
public AccessRestriction getAccess()
{
return AccessRestriction.READ_WRITE;
}