mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 01:10:19 -04:00
Merge branch 'master-MC1.7.10' of github.com:MightyPirates/OpenComputers into master-MC1.8
Conflicts: src/main/scala/li/cil/oc/common/item/data/PrintData.scala src/main/scala/li/cil/oc/util/ExtendedWorld.scala
This commit is contained in:
commit
7f56153be6
@ -31,7 +31,7 @@ class PrintData extends ItemData {
|
||||
var isBeaconBase = false
|
||||
var lightLevel = 0
|
||||
|
||||
def hasActiveState = stateOn.size > 0
|
||||
def hasActiveState = stateOn.nonEmpty
|
||||
|
||||
def emitLight = lightLevel > 0
|
||||
|
||||
@ -111,7 +111,7 @@ object PrintData {
|
||||
|
||||
def computeApproximateOpacity(shapes: Iterable[PrintData.Shape]) = {
|
||||
var volume = 1f
|
||||
if (shapes.size > 0) for (x <- 0 until 16 / stepping; y <- 0 until 16 / stepping; z <- 0 until 16 / stepping) {
|
||||
if (shapes.nonEmpty) for (x <- 0 until 16 / stepping; y <- 0 until 16 / stepping; z <- 0 until 16 / stepping) {
|
||||
val bounds = AxisAlignedBB.fromBounds(
|
||||
x * step, y * step, z * step,
|
||||
(x + 1) * step, (y + 1) * step, (z + 1) * step)
|
||||
|
@ -38,7 +38,7 @@ trait RedstoneAware extends RotationAware /* with IConnectable with IRedstoneEmi
|
||||
if (value != isOutputEnabled) {
|
||||
_isOutputEnabled = value
|
||||
if (!value) {
|
||||
for (i <- 0 until _output.length) {
|
||||
for (i <- _output.indices) {
|
||||
_output(i) = 0
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ object ExtendedWorld {
|
||||
|
||||
def getBlockHarvestTool(position: BlockPosition) = getBlock(position).getHarvestTool(getBlockMetadata(position))
|
||||
|
||||
def computeRedstoneSignal(position: BlockPosition, side: EnumFacing) = math.max(world.isBlockProvidingPowerTo(position.offset(side), side.getOpposite), world.getIndirectPowerLevelTo(position.offset(side), side.getOpposite))
|
||||
def computeRedstoneSignal(position: BlockPosition, side: EnumFacing) = math.max(world.isBlockProvidingPowerTo(position.offset(side), side), world.getIndirectPowerLevelTo(position.offset(side), side))
|
||||
|
||||
def isBlockProvidingPowerTo(position: BlockPosition, side: EnumFacing) = world.getStrongPower(position.toBlockPos, side)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user