Update RedstoneAware.scala

comparison should be checking if array length is bigger than and *not* equal to the ordinal
This commit is contained in:
SanAndreasP 2021-12-27 11:34:54 +01:00 committed by GitHub
parent 59d63fe57e
commit 178ad0131f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ trait RedstoneAware extends RotationAware {
def getOutput: Array[Int] = EnumFacing.values.map{ side: EnumFacing => _output(toLocal(side).ordinal) } def getOutput: Array[Int] = EnumFacing.values.map{ side: EnumFacing => _output(toLocal(side).ordinal) }
def getOutput(side: EnumFacing) = if (_output != null && _output.length >= toLocal(side).ordinal()) def getOutput(side: EnumFacing) = if (_output != null && _output.length > toLocal(side).ordinal())
_output(toLocal(side).ordinal()) _output(toLocal(side).ordinal())
else 0 else 0