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