public static boolean canFunction(TileEntity tileEntity){
  if (!(tileEntity instanceof IRedstoneControl)) {
    return true;
  }
  IRedstoneControl control=(IRedstoneControl)tileEntity;
switch (control.getControlType()) {
case DISABLED:
    return true;
case HIGH:
  return control.isPowered();
case LOW:
return !control.isPowered();
case PULSE:
return control.isPowered() && !control.wasPowered();
}
return false;
}

public static boolean canFunction ( TileEntity tileEntity ) { if ( ! ( tileEntity instanceof IRedstoneControl ) ) { return true ; } IRedstoneControl control = ( IRedstoneControl ) tileEntity ; switch ( control . getControlType ( ) ) { case DISABLED : return true ; case HIGH : return control . isPowered ( ) ; case LOW : return ! control . isPowered ( ) ; case PULSE : return control . isPowered ( ) && ! control . wasPowered ( ) ; } return false ; }
whether or not a certain tileentity can function with redstone logic . illogical to use unless the defined tileentity implements iredstonecontrol .
