mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 03:36:47 -04:00
cable only checks neighbor blocks if y >= 0 , Fixes #63
This commit is contained in:
parent
c1e283ca87
commit
f4d8f8c51f
@ -91,6 +91,7 @@ object Cable {
|
|||||||
def neighbors(world: IBlockAccess, x: Int, y: Int, z: Int) = {
|
def neighbors(world: IBlockAccess, x: Int, y: Int, z: Int) = {
|
||||||
var result = 0
|
var result = 0
|
||||||
for (side <- ForgeDirection.VALID_DIRECTIONS) {
|
for (side <- ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
if (y + side.offsetY >= 0)
|
||||||
world.getBlockTileEntity(x + side.offsetX, y + side.offsetY, z + side.offsetZ) match {
|
world.getBlockTileEntity(x + side.offsetX, y + side.offsetY, z + side.offsetZ) match {
|
||||||
case robot: tileentity.RobotProxy =>
|
case robot: tileentity.RobotProxy =>
|
||||||
case host: SidedEnvironment =>
|
case host: SidedEnvironment =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user